From 2f6c3c820613ea26afed8e6fabe10ac9a2298d3b Mon Sep 17 00:00:00 2001 From: Stuart Henderson Date: Tue, 3 May 2011 16:11:55 +0000 Subject: [PATCH] builtins: Created. 2011-05-03 Stuart Henderson * gcc.target/bfin/builtins: Created. * gcc.target/bfin/hisilh-O0.c: Deleted. * gcc.target/bfin/hisilh.c: Moved to... * gcc.target/bfin/builtins/hisilh.c: ...here. * gcc.target/bfin/builtins/shl_fr1x16-6.c: New test. * gcc.target/bfin/builtins/shr_fr1x16-1.c: Ditto. * gcc.target/bfin/builtins/shl_fr1x32-9.c: Ditto. * gcc.target/bfin/builtins/shr_fr1x32-4.c: Ditto. * gcc.target/bfin/builtins/shr_fr1x32-8.c: Ditto. * gcc.target/bfin/builtins/lshl_fr2x16-1.c: Ditto. * gcc.target/bfin/builtins/abs_fr1x16-1.c: Ditto. * gcc.target/bfin/builtins/norm32-1.c: Ditto. * gcc.target/bfin/builtins/shrl_fr1x16-3.c: Ditto. * gcc.target/bfin/builtins/norm_fr1x32-2.c: Ditto. * gcc.target/bfin/builtins/bfin-builtins.exp: Ditto. * gcc.target/bfin/builtins/norm16-2.c: Ditto. * gcc.target/bfin/builtins/norm32-5.c: Ditto. * gcc.target/bfin/builtins/norm_fr1x16-3.c: Ditto. * gcc.target/bfin/builtins/mult_fr1x32x32-2.c: Ditto. * gcc.target/bfin/builtins/norm16-6.c: Ditto. * gcc.target/bfin/builtins/norm32-9.c: Ditto. * gcc.target/bfin/builtins/mult_fr2x16-1.c: Ditto. * gcc.target/bfin/builtins/dspsubaddsat_fr2x16-2.c: Ditto. * gcc.target/bfin/builtins/min_fr2x16-1.c: Ditto. * gcc.target/bfin/builtins/max_fr2x16-2.c: Ditto. * gcc.target/bfin/builtins/norm32-10.c: Ditto. * gcc.target/bfin/builtins/shl_fr2x16-3.c: Ditto. * gcc.target/bfin/builtins/mulhisihh_fr2x16-1.c: Ditto. * gcc.target/bfin/builtins/diff_hl_fr2x16-2.c: Ditto. * gcc.target/bfin/builtins/shl_fr2x16-7.c: Ditto. * gcc.target/bfin/builtins/shr_fr2x16-2.c: Ditto. * gcc.target/bfin/builtins/mulhisilh_fr2x16-1.c: Ditto. * gcc.target/bfin/builtins/lshl_fr1x16-1.c: Ditto. * gcc.target/bfin/builtins/cpmlx_mul_fr2x16-2.c: Ditto. * gcc.target/bfin/builtins/negate_fr1x32-2.c: Ditto. * gcc.target/bfin/builtins/negate_fr1x16-3.c: Ditto. * gcc.target/bfin/builtins/abs_fr2x16-2.c: Ditto. * gcc.target/bfin/builtins/shrl_fr2x16-4.c: Ditto. * gcc.target/bfin/builtins/mult_fr1x16-1.c: Ditto. * gcc.target/bfin/builtins/max_fr1x32-1.c: Ditto. * gcc.target/bfin/builtins/min_fr1x16-1.c: Ditto. * gcc.target/bfin/builtins/shl_fr1x32-2.c: Ditto. * gcc.target/bfin/builtins/max_fr1x16-2.c: Ditto. * gcc.target/bfin/builtins/shl_fr1x16-3.c: Ditto. * gcc.target/bfin/builtins/add_fr2x16-1.c: Ditto. * gcc.target/bfin/builtins/shl_fr1x32-6.c: Ditto. * gcc.target/bfin/builtins/shr_fr1x32-1.c: Ditto. * gcc.target/bfin/builtins/shr_fr1x32.c: Ditto. * gcc.target/bfin/builtins/shl_fr1x16-7.c: Ditto. * gcc.target/bfin/builtins/shr_fr1x16-2.c: Ditto. * gcc.target/bfin/builtins/shr_fr1x32-5.c: Ditto. * gcc.target/bfin/builtins/shr_fr1x32-9.c: Ditto. * gcc.target/bfin/builtins/abs_fr1x32-1.c: Ditto. * gcc.target/bfin/builtins/lshl_fr2x16-2.c: Ditto. * gcc.target/bfin/builtins/abs_fr1x16-2.c: Ditto. * gcc.target/bfin/builtins/cpmlx_msu_fr2x16-1.c: Ditto. * gcc.target/bfin/builtins/norm32-2.c: Ditto. * gcc.target/bfin/builtins/shrl_fr1x16-4.c: Ditto. * gcc.target/bfin/builtins/norm16-3.c: Ditto. * gcc.target/bfin/builtins/norm32-6.c: Ditto. * gcc.target/bfin/builtins/norm16-7.c: Ditto. * gcc.target/bfin/builtins/mult_fr2x16-2.c: Ditto. * gcc.target/bfin/builtins/min_fr2x16-2.c: Ditto. * gcc.target/bfin/builtins/add_fr1x16-1.c: Ditto. * gcc.target/bfin/builtins/norm32-11.c: Ditto. * gcc.target/bfin/builtins/sub_fr2x16-1.c: Ditto. * gcc.target/bfin/builtins/shl_fr2x16-4.c: Ditto. * gcc.target/bfin/builtins/mulhisihh_fr2x16-2.c: Ditto. * gcc.target/bfin/builtins/diff_lh_fr2x16-1.c: Ditto. * gcc.target/bfin/builtins/shl_fr2x16-8.c: Ditto. * gcc.target/bfin/builtins/shr_fr2x16-3.c: Ditto. * gcc.target/bfin/builtins/mulhisilh_fr2x16-2.c: Ditto. * gcc.target/bfin/builtins/lshl_fr1x16-2.c: Ditto. * gcc.target/bfin/builtins/cpmlx_mac_fr2x16-1.c: Ditto. * gcc.target/bfin/builtins/shrl_fr2x16-1.c: Ditto. * gcc.target/bfin/builtins/mult_fr1x32-1.c: Ditto. * gcc.target/bfin/builtins/min_fr1x32-1.c: Ditto. * gcc.target/bfin/builtins/dspaddsubsat_fr2x16-1.c: Ditto. * gcc.target/bfin/builtins/mult_fr1x16-2.c: Ditto. * gcc.target/bfin/builtins/max_fr1x32-2.c: Ditto. * gcc.target/bfin/builtins/min_fr1x16-2.c: Ditto. * gcc.target/bfin/builtins/shl_fr1x32.c: Ditto. * gcc.target/bfin/builtins/shl_fr1x32-3.c: Ditto. * gcc.target/bfin/builtins/shl_fr1x16-4.c: Ditto. * gcc.target/bfin/builtins/sub_fr1x16-1.c: Ditto. * gcc.target/bfin/builtins/add_fr2x16-2.c: Ditto. * gcc.target/bfin/builtins/shl_fr1x32-7.c: Ditto. * gcc.target/bfin/builtins/shr_fr1x32-2.c: Ditto. * gcc.target/bfin/builtins/shl_fr1x16-8.c: Ditto. * gcc.target/bfin/builtins/shr_fr1x16-3.c: Ditto. * gcc.target/bfin/builtins/shr_fr1x32-6.c: Ditto. * gcc.target/bfin/builtins/circptr.c: Ditto. * gcc.target/bfin/builtins/negate_fr2x16-1.c: Ditto. * gcc.target/bfin/builtins/abs_fr1x32-2.c: Ditto. * gcc.target/bfin/builtins/multr_fr2x16-1.c: Ditto. * gcc.target/bfin/builtins/sum_fr2x16-1.c: Ditto. * gcc.target/bfin/builtins/shrl_fr1x16-1.c: Ditto. * gcc.target/bfin/builtins/cpmlx_msu_fr2x16-2.c: Ditto. * gcc.target/bfin/builtins/norm32-3.c: Ditto. * gcc.target/bfin/builtins/norm_fr1x16-1.c: Ditto. * gcc.target/bfin/builtins/norm16-4.c: Ditto. * gcc.target/bfin/builtins/norm32-7.c: Ditto. * gcc.target/bfin/builtins/norm16-8.c: Ditto. * gcc.target/bfin/builtins/add_fr1x32-1.c: Ditto. * gcc.target/bfin/builtins/shl_fr2x16-1.c: Ditto. * gcc.target/bfin/builtins/add_fr1x16-2.c: Ditto. * gcc.target/bfin/builtins/shl_fr2x16-5.c: Ditto. * gcc.target/bfin/builtins/norm32-12.c: Ditto. * gcc.target/bfin/builtins/sub_fr2x16-2.c: Ditto. * gcc.target/bfin/builtins/diff_lh_fr2x16-2.c: Ditto. * gcc.target/bfin/builtins/mulhisihl_fr2x16-1.c: Ditto. * gcc.target/bfin/builtins/shr_fr2x16-4.c: Ditto. * gcc.target/bfin/builtins/mulhisill_fr2x16-1.c: Ditto. * gcc.target/bfin/builtins/negate_fr1x16-1.c: Ditto. * gcc.target/bfin/builtins/multr_fr1x16-1.c: Ditto. * gcc.target/bfin/builtins/cpmlx_mac_fr2x16-2.c: Ditto. * gcc.target/bfin/builtins/shrl_fr2x16-2.c: Ditto. * gcc.target/bfin/builtins/mult_fr1x32x32NS-1.c: Ditto. * gcc.target/bfin/builtins/mult_fr1x32-2.c: Ditto. * gcc.target/bfin/builtins/min_fr1x32-2.c: Ditto. * gcc.target/bfin/builtins/dspaddsubsat_fr2x16-2.c: Ditto. * gcc.target/bfin/builtins/shl_fr1x16-1.c: Ditto. * gcc.target/bfin/builtins/sub_fr1x32-1.c: Ditto. * gcc.target/bfin/builtins/shl_fr1x32-4.c: Ditto. * gcc.target/bfin/builtins/sub_fr1x16-2.c: Ditto. * gcc.target/bfin/builtins/shl_fr1x16-5.c: Ditto. * gcc.target/bfin/builtins/shl_fr1x32-8.c: Ditto. * gcc.target/bfin/builtins/shr_fr1x32-3.c: Ditto. * gcc.target/bfin/builtins/shr_fr1x16-4.c: Ditto. * gcc.target/bfin/builtins/shr_fr1x32-7.c: Ditto. * gcc.target/bfin/builtins/negate_fr2x16-2.c: Ditto. * gcc.target/bfin/builtins/multr_fr2x16-2.c: Ditto. * gcc.target/bfin/builtins/sum_fr2x16-2.c: Ditto. * gcc.target/bfin/builtins/shrl_fr1x16-2.c: Ditto. * gcc.target/bfin/builtins/norm_fr1x32-1.c: Ditto. * gcc.target/bfin/builtins/norm16-1.c: Ditto. * gcc.target/bfin/builtins/norm_fr1x16-2.c: Ditto. * gcc.target/bfin/builtins/mult_fr1x32x32-1.c: Ditto. * gcc.target/bfin/builtins/norm32-4.c: Ditto. * gcc.target/bfin/builtins/norm16-5.c: Ditto. * gcc.target/bfin/builtins/norm32-8.c: Ditto. * gcc.target/bfin/builtins/dspsubaddsat_fr2x16-1.c: Ditto. * gcc.target/bfin/builtins/max_fr2x16-1.c: Ditto. * gcc.target/bfin/builtins/add_fr1x32-2.c: Ditto. * gcc.target/bfin/builtins/shl_fr2x16-2.c: Ditto. * gcc.target/bfin/builtins/shl_fr2x16-6.c: Ditto. * gcc.target/bfin/builtins/diff_hl_fr2x16-1.c: Ditto. * gcc.target/bfin/builtins/shr_fr2x16-1.c: Ditto. * gcc.target/bfin/builtins/mulhisihl_fr2x16-2.c: Ditto. * gcc.target/bfin/builtins/negate_fr1x32-1.c: Ditto. * gcc.target/bfin/builtins/cpmlx_mul_fr2x16-1.c: Ditto. * gcc.target/bfin/builtins/multr_fr1x16-2.c: Ditto. * gcc.target/bfin/builtins/mulhisill_fr2x16-2.c: Ditto. * gcc.target/bfin/builtins/negate_fr1x16-2.c: Ditto. * gcc.target/bfin/builtins/abs_fr2x16-1.c: Ditto. * gcc.target/bfin/builtins/shrl_fr2x16-3.c: Ditto. * gcc.target/bfin/builtins/mult_fr1x32x32NS-2.c: Ditto. * gcc.target/bfin/builtins/shl_fr1x32-1.c: Ditto. * gcc.target/bfin/builtins/max_fr1x16-1.c: Ditto. * gcc.target/bfin/builtins/shl_fr1x16-2.c: Ditto. * gcc.target/bfin/builtins/sub_fr1x32-2.c: Ditto. * gcc.target/bfin/builtins/shl_fr1x32-5.c: Ditto. From-SVN: r173322 --- gcc/testsuite/ChangeLog | 165 ++++++++++++++++++ .../gcc.target/bfin/builtins/abs_fr1x16-1.c | 15 ++ .../gcc.target/bfin/builtins/abs_fr1x16-2.c | 15 ++ .../gcc.target/bfin/builtins/abs_fr1x32-1.c | 15 ++ .../gcc.target/bfin/builtins/abs_fr1x32-2.c | 15 ++ .../gcc.target/bfin/builtins/abs_fr2x16-1.c | 22 +++ .../gcc.target/bfin/builtins/abs_fr2x16-2.c | 22 +++ .../gcc.target/bfin/builtins/add_fr1x16-1.c | 14 ++ .../gcc.target/bfin/builtins/add_fr1x16-2.c | 14 ++ .../gcc.target/bfin/builtins/add_fr1x32-1.c | 15 ++ .../gcc.target/bfin/builtins/add_fr1x32-2.c | 15 ++ .../gcc.target/bfin/builtins/add_fr2x16-1.c | 23 +++ .../gcc.target/bfin/builtins/add_fr2x16-2.c | 22 +++ .../bfin/builtins/bfin-builtins.exp | 39 +++++ .../gcc.target/bfin/builtins/circptr.c | 29 +++ .../bfin/builtins/cpmlx_mac_fr2x16-1.c | 23 +++ .../bfin/builtins/cpmlx_mac_fr2x16-2.c | 23 +++ .../bfin/builtins/cpmlx_msu_fr2x16-1.c | 23 +++ .../bfin/builtins/cpmlx_msu_fr2x16-2.c | 23 +++ .../bfin/builtins/cpmlx_mul_fr2x16-1.c | 22 +++ .../bfin/builtins/cpmlx_mul_fr2x16-2.c | 22 +++ .../bfin/builtins/diff_hl_fr2x16-1.c | 20 +++ .../bfin/builtins/diff_hl_fr2x16-2.c | 20 +++ .../bfin/builtins/diff_lh_fr2x16-1.c | 20 +++ .../bfin/builtins/diff_lh_fr2x16-2.c | 20 +++ .../bfin/builtins/dspaddsubsat_fr2x16-1.c | 22 +++ .../bfin/builtins/dspaddsubsat_fr2x16-2.c | 22 +++ .../bfin/builtins/dspsubaddsat_fr2x16-1.c | 22 +++ .../bfin/builtins/dspsubaddsat_fr2x16-2.c | 22 +++ .../gcc.target/bfin/{ => builtins}/hisilh.c | 0 .../gcc.target/bfin/builtins/lshl_fr1x16-1.c | 15 ++ .../gcc.target/bfin/builtins/lshl_fr1x16-2.c | 15 ++ .../gcc.target/bfin/builtins/lshl_fr2x16-1.c | 22 +++ .../gcc.target/bfin/builtins/lshl_fr2x16-2.c | 22 +++ .../gcc.target/bfin/builtins/max_fr1x16-1.c | 15 ++ .../gcc.target/bfin/builtins/max_fr1x16-2.c | 15 ++ .../gcc.target/bfin/builtins/max_fr1x32-1.c | 15 ++ .../gcc.target/bfin/builtins/max_fr1x32-2.c | 15 ++ .../gcc.target/bfin/builtins/max_fr2x16-1.c | 23 +++ .../gcc.target/bfin/builtins/max_fr2x16-2.c | 23 +++ .../gcc.target/bfin/builtins/min_fr1x16-1.c | 15 ++ .../gcc.target/bfin/builtins/min_fr1x16-2.c | 15 ++ .../gcc.target/bfin/builtins/min_fr1x32-1.c | 15 ++ .../gcc.target/bfin/builtins/min_fr1x32-2.c | 15 ++ .../gcc.target/bfin/builtins/min_fr2x16-1.c | 23 +++ .../gcc.target/bfin/builtins/min_fr2x16-2.c | 23 +++ .../bfin/builtins/mulhisihh_fr2x16-1.c | 20 +++ .../bfin/builtins/mulhisihh_fr2x16-2.c | 20 +++ .../bfin/builtins/mulhisihl_fr2x16-1.c | 20 +++ .../bfin/builtins/mulhisihl_fr2x16-2.c | 20 +++ .../bfin/builtins/mulhisilh_fr2x16-1.c | 20 +++ .../bfin/builtins/mulhisilh_fr2x16-2.c | 20 +++ .../bfin/builtins/mulhisill_fr2x16-1.c | 20 +++ .../bfin/builtins/mulhisill_fr2x16-2.c | 20 +++ .../gcc.target/bfin/builtins/mult_fr1x16-1.c | 15 ++ .../gcc.target/bfin/builtins/mult_fr1x16-2.c | 15 ++ .../gcc.target/bfin/builtins/mult_fr1x32-1.c | 15 ++ .../gcc.target/bfin/builtins/mult_fr1x32-2.c | 15 ++ .../bfin/builtins/mult_fr1x32x32-1.c | 15 ++ .../bfin/builtins/mult_fr1x32x32-2.c | 15 ++ .../bfin/builtins/mult_fr1x32x32NS-1.c | 15 ++ .../bfin/builtins/mult_fr1x32x32NS-2.c | 15 ++ .../gcc.target/bfin/builtins/mult_fr2x16-1.c | 23 +++ .../gcc.target/bfin/builtins/mult_fr2x16-2.c | 23 +++ .../gcc.target/bfin/builtins/multr_fr1x16-1.c | 15 ++ .../gcc.target/bfin/builtins/multr_fr1x16-2.c | 15 ++ .../gcc.target/bfin/builtins/multr_fr2x16-1.c | 23 +++ .../gcc.target/bfin/builtins/multr_fr2x16-2.c | 23 +++ .../bfin/builtins/negate_fr1x16-1.c | 15 ++ .../bfin/builtins/negate_fr1x16-2.c | 15 ++ .../bfin/builtins/negate_fr1x16-3.c | 15 ++ .../bfin/builtins/negate_fr1x32-1.c | 15 ++ .../bfin/builtins/negate_fr1x32-2.c | 15 ++ .../bfin/builtins/negate_fr2x16-1.c | 22 +++ .../bfin/builtins/negate_fr2x16-2.c | 21 +++ .../gcc.target/bfin/builtins/norm16-1.c | 14 ++ .../gcc.target/bfin/builtins/norm16-2.c | 18 ++ .../gcc.target/bfin/builtins/norm16-3.c | 14 ++ .../gcc.target/bfin/builtins/norm16-4.c | 18 ++ .../gcc.target/bfin/builtins/norm16-5.c | 14 ++ .../gcc.target/bfin/builtins/norm16-6.c | 18 ++ .../gcc.target/bfin/builtins/norm16-7.c | 14 ++ .../gcc.target/bfin/builtins/norm16-8.c | 18 ++ .../gcc.target/bfin/builtins/norm32-1.c | 14 ++ .../gcc.target/bfin/builtins/norm32-10.c | 18 ++ .../gcc.target/bfin/builtins/norm32-11.c | 14 ++ .../gcc.target/bfin/builtins/norm32-12.c | 18 ++ .../gcc.target/bfin/builtins/norm32-2.c | 18 ++ .../gcc.target/bfin/builtins/norm32-3.c | 14 ++ .../gcc.target/bfin/builtins/norm32-4.c | 18 ++ .../gcc.target/bfin/builtins/norm32-5.c | 14 ++ .../gcc.target/bfin/builtins/norm32-6.c | 18 ++ .../gcc.target/bfin/builtins/norm32-7.c | 14 ++ .../gcc.target/bfin/builtins/norm32-8.c | 18 ++ .../gcc.target/bfin/builtins/norm32-9.c | 14 ++ .../gcc.target/bfin/builtins/norm_fr1x16-1.c | 15 ++ .../gcc.target/bfin/builtins/norm_fr1x16-2.c | 15 ++ .../gcc.target/bfin/builtins/norm_fr1x16-3.c | 15 ++ .../gcc.target/bfin/builtins/norm_fr1x32-1.c | 13 ++ .../gcc.target/bfin/builtins/norm_fr1x32-2.c | 13 ++ .../gcc.target/bfin/builtins/shl_fr1x16-1.c | 15 ++ .../gcc.target/bfin/builtins/shl_fr1x16-2.c | 15 ++ .../gcc.target/bfin/builtins/shl_fr1x16-3.c | 15 ++ .../gcc.target/bfin/builtins/shl_fr1x16-4.c | 15 ++ .../gcc.target/bfin/builtins/shl_fr1x16-5.c | 20 +++ .../gcc.target/bfin/builtins/shl_fr1x16-6.c | 20 +++ .../gcc.target/bfin/builtins/shl_fr1x16-7.c | 20 +++ .../gcc.target/bfin/builtins/shl_fr1x16-8.c | 20 +++ .../gcc.target/bfin/builtins/shl_fr1x32-1.c | 15 ++ .../gcc.target/bfin/builtins/shl_fr1x32-2.c | 15 ++ .../gcc.target/bfin/builtins/shl_fr1x32-3.c | 15 ++ .../gcc.target/bfin/builtins/shl_fr1x32-4.c | 15 ++ .../gcc.target/bfin/builtins/shl_fr1x32-5.c | 20 +++ .../gcc.target/bfin/builtins/shl_fr1x32-6.c | 20 +++ .../gcc.target/bfin/builtins/shl_fr1x32-7.c | 20 +++ .../gcc.target/bfin/builtins/shl_fr1x32-8.c | 20 +++ .../gcc.target/bfin/builtins/shl_fr1x32-9.c | 19 ++ .../gcc.target/bfin/builtins/shl_fr1x32.c | 16 ++ .../gcc.target/bfin/builtins/shl_fr2x16-1.c | 22 +++ .../gcc.target/bfin/builtins/shl_fr2x16-2.c | 22 +++ .../gcc.target/bfin/builtins/shl_fr2x16-3.c | 22 +++ .../gcc.target/bfin/builtins/shl_fr2x16-4.c | 22 +++ .../gcc.target/bfin/builtins/shl_fr2x16-5.c | 27 +++ .../gcc.target/bfin/builtins/shl_fr2x16-6.c | 27 +++ .../gcc.target/bfin/builtins/shl_fr2x16-7.c | 27 +++ .../gcc.target/bfin/builtins/shl_fr2x16-8.c | 27 +++ .../gcc.target/bfin/builtins/shr_fr1x16-1.c | 15 ++ .../gcc.target/bfin/builtins/shr_fr1x16-2.c | 15 ++ .../gcc.target/bfin/builtins/shr_fr1x16-3.c | 20 +++ .../gcc.target/bfin/builtins/shr_fr1x16-4.c | 20 +++ .../gcc.target/bfin/builtins/shr_fr1x32-1.c | 15 ++ .../gcc.target/bfin/builtins/shr_fr1x32-2.c | 15 ++ .../gcc.target/bfin/builtins/shr_fr1x32-3.c | 15 ++ .../gcc.target/bfin/builtins/shr_fr1x32-4.c | 15 ++ .../gcc.target/bfin/builtins/shr_fr1x32-5.c | 20 +++ .../gcc.target/bfin/builtins/shr_fr1x32-6.c | 20 +++ .../gcc.target/bfin/builtins/shr_fr1x32-7.c | 20 +++ .../gcc.target/bfin/builtins/shr_fr1x32-8.c | 20 +++ .../gcc.target/bfin/builtins/shr_fr1x32-9.c | 19 ++ .../gcc.target/bfin/builtins/shr_fr1x32.c | 16 ++ .../gcc.target/bfin/builtins/shr_fr2x16-1.c | 22 +++ .../gcc.target/bfin/builtins/shr_fr2x16-2.c | 22 +++ .../gcc.target/bfin/builtins/shr_fr2x16-3.c | 27 +++ .../gcc.target/bfin/builtins/shr_fr2x16-4.c | 27 +++ .../gcc.target/bfin/builtins/shrl_fr1x16-1.c | 15 ++ .../gcc.target/bfin/builtins/shrl_fr1x16-2.c | 15 ++ .../gcc.target/bfin/builtins/shrl_fr1x16-3.c | 20 +++ .../gcc.target/bfin/builtins/shrl_fr1x16-4.c | 20 +++ .../gcc.target/bfin/builtins/shrl_fr2x16-1.c | 22 +++ .../gcc.target/bfin/builtins/shrl_fr2x16-2.c | 22 +++ .../gcc.target/bfin/builtins/shrl_fr2x16-3.c | 27 +++ .../gcc.target/bfin/builtins/shrl_fr2x16-4.c | 27 +++ .../gcc.target/bfin/builtins/sub_fr1x16-1.c | 14 ++ .../gcc.target/bfin/builtins/sub_fr1x16-2.c | 14 ++ .../gcc.target/bfin/builtins/sub_fr1x32-1.c | 15 ++ .../gcc.target/bfin/builtins/sub_fr1x32-2.c | 15 ++ .../gcc.target/bfin/builtins/sub_fr2x16-1.c | 23 +++ .../gcc.target/bfin/builtins/sub_fr2x16-2.c | 23 +++ .../gcc.target/bfin/builtins/sum_fr2x16-1.c | 20 +++ .../gcc.target/bfin/builtins/sum_fr2x16-2.c | 20 +++ gcc/testsuite/gcc.target/bfin/hisilh-O0.c | 46 ----- 161 files changed, 3107 insertions(+), 46 deletions(-) create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/abs_fr1x16-1.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/abs_fr1x16-2.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/abs_fr1x32-1.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/abs_fr1x32-2.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/abs_fr2x16-1.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/abs_fr2x16-2.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/add_fr1x16-1.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/add_fr1x16-2.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/add_fr1x32-1.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/add_fr1x32-2.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/add_fr2x16-1.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/add_fr2x16-2.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/bfin-builtins.exp create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/circptr.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/cpmlx_mac_fr2x16-1.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/cpmlx_mac_fr2x16-2.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/cpmlx_msu_fr2x16-1.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/cpmlx_msu_fr2x16-2.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/cpmlx_mul_fr2x16-1.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/cpmlx_mul_fr2x16-2.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/diff_hl_fr2x16-1.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/diff_hl_fr2x16-2.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/diff_lh_fr2x16-1.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/diff_lh_fr2x16-2.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/dspaddsubsat_fr2x16-1.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/dspaddsubsat_fr2x16-2.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/dspsubaddsat_fr2x16-1.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/dspsubaddsat_fr2x16-2.c rename gcc/testsuite/gcc.target/bfin/{ => builtins}/hisilh.c (100%) create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/lshl_fr1x16-1.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/lshl_fr1x16-2.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/lshl_fr2x16-1.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/lshl_fr2x16-2.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/max_fr1x16-1.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/max_fr1x16-2.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/max_fr1x32-1.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/max_fr1x32-2.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/max_fr2x16-1.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/max_fr2x16-2.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/min_fr1x16-1.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/min_fr1x16-2.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/min_fr1x32-1.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/min_fr1x32-2.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/min_fr2x16-1.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/min_fr2x16-2.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/mulhisihh_fr2x16-1.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/mulhisihh_fr2x16-2.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/mulhisihl_fr2x16-1.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/mulhisihl_fr2x16-2.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/mulhisilh_fr2x16-1.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/mulhisilh_fr2x16-2.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/mulhisill_fr2x16-1.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/mulhisill_fr2x16-2.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/mult_fr1x16-1.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/mult_fr1x16-2.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/mult_fr1x32-1.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/mult_fr1x32-2.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/mult_fr1x32x32-1.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/mult_fr1x32x32-2.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/mult_fr1x32x32NS-1.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/mult_fr1x32x32NS-2.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/mult_fr2x16-1.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/mult_fr2x16-2.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/multr_fr1x16-1.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/multr_fr1x16-2.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/multr_fr2x16-1.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/multr_fr2x16-2.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/negate_fr1x16-1.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/negate_fr1x16-2.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/negate_fr1x16-3.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/negate_fr1x32-1.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/negate_fr1x32-2.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/negate_fr2x16-1.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/negate_fr2x16-2.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/norm16-1.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/norm16-2.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/norm16-3.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/norm16-4.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/norm16-5.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/norm16-6.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/norm16-7.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/norm16-8.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/norm32-1.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/norm32-10.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/norm32-11.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/norm32-12.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/norm32-2.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/norm32-3.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/norm32-4.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/norm32-5.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/norm32-6.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/norm32-7.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/norm32-8.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/norm32-9.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/norm_fr1x16-1.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/norm_fr1x16-2.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/norm_fr1x16-3.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/norm_fr1x32-1.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/norm_fr1x32-2.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x16-1.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x16-2.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x16-3.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x16-4.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x16-5.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x16-6.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x16-7.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x16-8.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x32-1.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x32-2.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x32-3.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x32-4.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x32-5.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x32-6.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x32-7.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x32-8.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x32-9.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x32.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/shl_fr2x16-1.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/shl_fr2x16-2.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/shl_fr2x16-3.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/shl_fr2x16-4.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/shl_fr2x16-5.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/shl_fr2x16-6.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/shl_fr2x16-7.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/shl_fr2x16-8.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x16-1.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x16-2.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x16-3.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x16-4.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x32-1.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x32-2.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x32-3.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x32-4.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x32-5.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x32-6.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x32-7.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x32-8.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x32-9.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x32.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/shr_fr2x16-1.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/shr_fr2x16-2.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/shr_fr2x16-3.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/shr_fr2x16-4.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/shrl_fr1x16-1.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/shrl_fr1x16-2.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/shrl_fr1x16-3.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/shrl_fr1x16-4.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/shrl_fr2x16-1.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/shrl_fr2x16-2.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/shrl_fr2x16-3.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/shrl_fr2x16-4.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/sub_fr1x16-1.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/sub_fr1x16-2.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/sub_fr1x32-1.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/sub_fr1x32-2.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/sub_fr2x16-1.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/sub_fr2x16-2.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/sum_fr2x16-1.c create mode 100644 gcc/testsuite/gcc.target/bfin/builtins/sum_fr2x16-2.c delete mode 100644 gcc/testsuite/gcc.target/bfin/hisilh-O0.c diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c1c1fbe5e60..b7d837573f9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,168 @@ +2011-05-03 Stuart Henderson + + * gcc.target/bfin/builtins: Created. + * gcc.target/bfin/hisilh-O0.c: Deleted. + * gcc.target/bfin/hisilh.c: Moved to... + * gcc.target/bfin/builtins/hisilh.c: ...here. + * gcc.target/bfin/builtins/shl_fr1x16-6.c: New test. + * gcc.target/bfin/builtins/shr_fr1x16-1.c: Ditto. + * gcc.target/bfin/builtins/shl_fr1x32-9.c: Ditto. + * gcc.target/bfin/builtins/shr_fr1x32-4.c: Ditto. + * gcc.target/bfin/builtins/shr_fr1x32-8.c: Ditto. + * gcc.target/bfin/builtins/lshl_fr2x16-1.c: Ditto. + * gcc.target/bfin/builtins/abs_fr1x16-1.c: Ditto. + * gcc.target/bfin/builtins/norm32-1.c: Ditto. + * gcc.target/bfin/builtins/shrl_fr1x16-3.c: Ditto. + * gcc.target/bfin/builtins/norm_fr1x32-2.c: Ditto. + * gcc.target/bfin/builtins/bfin-builtins.exp: Ditto. + * gcc.target/bfin/builtins/norm16-2.c: Ditto. + * gcc.target/bfin/builtins/norm32-5.c: Ditto. + * gcc.target/bfin/builtins/norm_fr1x16-3.c: Ditto. + * gcc.target/bfin/builtins/mult_fr1x32x32-2.c: Ditto. + * gcc.target/bfin/builtins/norm16-6.c: Ditto. + * gcc.target/bfin/builtins/norm32-9.c: Ditto. + * gcc.target/bfin/builtins/mult_fr2x16-1.c: Ditto. + * gcc.target/bfin/builtins/dspsubaddsat_fr2x16-2.c: Ditto. + * gcc.target/bfin/builtins/min_fr2x16-1.c: Ditto. + * gcc.target/bfin/builtins/max_fr2x16-2.c: Ditto. + * gcc.target/bfin/builtins/norm32-10.c: Ditto. + * gcc.target/bfin/builtins/shl_fr2x16-3.c: Ditto. + * gcc.target/bfin/builtins/mulhisihh_fr2x16-1.c: Ditto. + * gcc.target/bfin/builtins/diff_hl_fr2x16-2.c: Ditto. + * gcc.target/bfin/builtins/shl_fr2x16-7.c: Ditto. + * gcc.target/bfin/builtins/shr_fr2x16-2.c: Ditto. + * gcc.target/bfin/builtins/mulhisilh_fr2x16-1.c: Ditto. + * gcc.target/bfin/builtins/lshl_fr1x16-1.c: Ditto. + * gcc.target/bfin/builtins/cpmlx_mul_fr2x16-2.c: Ditto. + * gcc.target/bfin/builtins/negate_fr1x32-2.c: Ditto. + * gcc.target/bfin/builtins/negate_fr1x16-3.c: Ditto. + * gcc.target/bfin/builtins/abs_fr2x16-2.c: Ditto. + * gcc.target/bfin/builtins/shrl_fr2x16-4.c: Ditto. + * gcc.target/bfin/builtins/mult_fr1x16-1.c: Ditto. + * gcc.target/bfin/builtins/max_fr1x32-1.c: Ditto. + * gcc.target/bfin/builtins/min_fr1x16-1.c: Ditto. + * gcc.target/bfin/builtins/shl_fr1x32-2.c: Ditto. + * gcc.target/bfin/builtins/max_fr1x16-2.c: Ditto. + * gcc.target/bfin/builtins/shl_fr1x16-3.c: Ditto. + * gcc.target/bfin/builtins/add_fr2x16-1.c: Ditto. + * gcc.target/bfin/builtins/shl_fr1x32-6.c: Ditto. + * gcc.target/bfin/builtins/shr_fr1x32-1.c: Ditto. + * gcc.target/bfin/builtins/shr_fr1x32.c: Ditto. + * gcc.target/bfin/builtins/shl_fr1x16-7.c: Ditto. + * gcc.target/bfin/builtins/shr_fr1x16-2.c: Ditto. + * gcc.target/bfin/builtins/shr_fr1x32-5.c: Ditto. + * gcc.target/bfin/builtins/shr_fr1x32-9.c: Ditto. + * gcc.target/bfin/builtins/abs_fr1x32-1.c: Ditto. + * gcc.target/bfin/builtins/lshl_fr2x16-2.c: Ditto. + * gcc.target/bfin/builtins/abs_fr1x16-2.c: Ditto. + * gcc.target/bfin/builtins/cpmlx_msu_fr2x16-1.c: Ditto. + * gcc.target/bfin/builtins/norm32-2.c: Ditto. + * gcc.target/bfin/builtins/shrl_fr1x16-4.c: Ditto. + * gcc.target/bfin/builtins/norm16-3.c: Ditto. + * gcc.target/bfin/builtins/norm32-6.c: Ditto. + * gcc.target/bfin/builtins/norm16-7.c: Ditto. + * gcc.target/bfin/builtins/mult_fr2x16-2.c: Ditto. + * gcc.target/bfin/builtins/min_fr2x16-2.c: Ditto. + * gcc.target/bfin/builtins/add_fr1x16-1.c: Ditto. + * gcc.target/bfin/builtins/norm32-11.c: Ditto. + * gcc.target/bfin/builtins/sub_fr2x16-1.c: Ditto. + * gcc.target/bfin/builtins/shl_fr2x16-4.c: Ditto. + * gcc.target/bfin/builtins/mulhisihh_fr2x16-2.c: Ditto. + * gcc.target/bfin/builtins/diff_lh_fr2x16-1.c: Ditto. + * gcc.target/bfin/builtins/shl_fr2x16-8.c: Ditto. + * gcc.target/bfin/builtins/shr_fr2x16-3.c: Ditto. + * gcc.target/bfin/builtins/mulhisilh_fr2x16-2.c: Ditto. + * gcc.target/bfin/builtins/lshl_fr1x16-2.c: Ditto. + * gcc.target/bfin/builtins/cpmlx_mac_fr2x16-1.c: Ditto. + * gcc.target/bfin/builtins/shrl_fr2x16-1.c: Ditto. + * gcc.target/bfin/builtins/mult_fr1x32-1.c: Ditto. + * gcc.target/bfin/builtins/min_fr1x32-1.c: Ditto. + * gcc.target/bfin/builtins/dspaddsubsat_fr2x16-1.c: Ditto. + * gcc.target/bfin/builtins/mult_fr1x16-2.c: Ditto. + * gcc.target/bfin/builtins/max_fr1x32-2.c: Ditto. + * gcc.target/bfin/builtins/min_fr1x16-2.c: Ditto. + * gcc.target/bfin/builtins/shl_fr1x32.c: Ditto. + * gcc.target/bfin/builtins/shl_fr1x32-3.c: Ditto. + * gcc.target/bfin/builtins/shl_fr1x16-4.c: Ditto. + * gcc.target/bfin/builtins/sub_fr1x16-1.c: Ditto. + * gcc.target/bfin/builtins/add_fr2x16-2.c: Ditto. + * gcc.target/bfin/builtins/shl_fr1x32-7.c: Ditto. + * gcc.target/bfin/builtins/shr_fr1x32-2.c: Ditto. + * gcc.target/bfin/builtins/shl_fr1x16-8.c: Ditto. + * gcc.target/bfin/builtins/shr_fr1x16-3.c: Ditto. + * gcc.target/bfin/builtins/shr_fr1x32-6.c: Ditto. + * gcc.target/bfin/builtins/circptr.c: Ditto. + * gcc.target/bfin/builtins/negate_fr2x16-1.c: Ditto. + * gcc.target/bfin/builtins/abs_fr1x32-2.c: Ditto. + * gcc.target/bfin/builtins/multr_fr2x16-1.c: Ditto. + * gcc.target/bfin/builtins/sum_fr2x16-1.c: Ditto. + * gcc.target/bfin/builtins/shrl_fr1x16-1.c: Ditto. + * gcc.target/bfin/builtins/cpmlx_msu_fr2x16-2.c: Ditto. + * gcc.target/bfin/builtins/norm32-3.c: Ditto. + * gcc.target/bfin/builtins/norm_fr1x16-1.c: Ditto. + * gcc.target/bfin/builtins/norm16-4.c: Ditto. + * gcc.target/bfin/builtins/norm32-7.c: Ditto. + * gcc.target/bfin/builtins/norm16-8.c: Ditto. + * gcc.target/bfin/builtins/add_fr1x32-1.c: Ditto. + * gcc.target/bfin/builtins/shl_fr2x16-1.c: Ditto. + * gcc.target/bfin/builtins/add_fr1x16-2.c: Ditto. + * gcc.target/bfin/builtins/shl_fr2x16-5.c: Ditto. + * gcc.target/bfin/builtins/norm32-12.c: Ditto. + * gcc.target/bfin/builtins/sub_fr2x16-2.c: Ditto. + * gcc.target/bfin/builtins/diff_lh_fr2x16-2.c: Ditto. + * gcc.target/bfin/builtins/mulhisihl_fr2x16-1.c: Ditto. + * gcc.target/bfin/builtins/shr_fr2x16-4.c: Ditto. + * gcc.target/bfin/builtins/mulhisill_fr2x16-1.c: Ditto. + * gcc.target/bfin/builtins/negate_fr1x16-1.c: Ditto. + * gcc.target/bfin/builtins/multr_fr1x16-1.c: Ditto. + * gcc.target/bfin/builtins/cpmlx_mac_fr2x16-2.c: Ditto. + * gcc.target/bfin/builtins/shrl_fr2x16-2.c: Ditto. + * gcc.target/bfin/builtins/mult_fr1x32x32NS-1.c: Ditto. + * gcc.target/bfin/builtins/mult_fr1x32-2.c: Ditto. + * gcc.target/bfin/builtins/min_fr1x32-2.c: Ditto. + * gcc.target/bfin/builtins/dspaddsubsat_fr2x16-2.c: Ditto. + * gcc.target/bfin/builtins/shl_fr1x16-1.c: Ditto. + * gcc.target/bfin/builtins/sub_fr1x32-1.c: Ditto. + * gcc.target/bfin/builtins/shl_fr1x32-4.c: Ditto. + * gcc.target/bfin/builtins/sub_fr1x16-2.c: Ditto. + * gcc.target/bfin/builtins/shl_fr1x16-5.c: Ditto. + * gcc.target/bfin/builtins/shl_fr1x32-8.c: Ditto. + * gcc.target/bfin/builtins/shr_fr1x32-3.c: Ditto. + * gcc.target/bfin/builtins/shr_fr1x16-4.c: Ditto. + * gcc.target/bfin/builtins/shr_fr1x32-7.c: Ditto. + * gcc.target/bfin/builtins/negate_fr2x16-2.c: Ditto. + * gcc.target/bfin/builtins/multr_fr2x16-2.c: Ditto. + * gcc.target/bfin/builtins/sum_fr2x16-2.c: Ditto. + * gcc.target/bfin/builtins/shrl_fr1x16-2.c: Ditto. + * gcc.target/bfin/builtins/norm_fr1x32-1.c: Ditto. + * gcc.target/bfin/builtins/norm16-1.c: Ditto. + * gcc.target/bfin/builtins/norm_fr1x16-2.c: Ditto. + * gcc.target/bfin/builtins/mult_fr1x32x32-1.c: Ditto. + * gcc.target/bfin/builtins/norm32-4.c: Ditto. + * gcc.target/bfin/builtins/norm16-5.c: Ditto. + * gcc.target/bfin/builtins/norm32-8.c: Ditto. + * gcc.target/bfin/builtins/dspsubaddsat_fr2x16-1.c: Ditto. + * gcc.target/bfin/builtins/max_fr2x16-1.c: Ditto. + * gcc.target/bfin/builtins/add_fr1x32-2.c: Ditto. + * gcc.target/bfin/builtins/shl_fr2x16-2.c: Ditto. + * gcc.target/bfin/builtins/shl_fr2x16-6.c: Ditto. + * gcc.target/bfin/builtins/diff_hl_fr2x16-1.c: Ditto. + * gcc.target/bfin/builtins/shr_fr2x16-1.c: Ditto. + * gcc.target/bfin/builtins/mulhisihl_fr2x16-2.c: Ditto. + * gcc.target/bfin/builtins/negate_fr1x32-1.c: Ditto. + * gcc.target/bfin/builtins/cpmlx_mul_fr2x16-1.c: Ditto. + * gcc.target/bfin/builtins/multr_fr1x16-2.c: Ditto. + * gcc.target/bfin/builtins/mulhisill_fr2x16-2.c: Ditto. + * gcc.target/bfin/builtins/negate_fr1x16-2.c: Ditto. + * gcc.target/bfin/builtins/abs_fr2x16-1.c: Ditto. + * gcc.target/bfin/builtins/shrl_fr2x16-3.c: Ditto. + * gcc.target/bfin/builtins/mult_fr1x32x32NS-2.c: Ditto. + * gcc.target/bfin/builtins/shl_fr1x32-1.c: Ditto. + * gcc.target/bfin/builtins/max_fr1x16-1.c: Ditto. + * gcc.target/bfin/builtins/shl_fr1x16-2.c: Ditto. + * gcc.target/bfin/builtins/sub_fr1x32-2.c: Ditto. + * gcc.target/bfin/builtins/shl_fr1x32-5.c: Ditto. + 2011-05-03 Bernd Schmidt * gcc.target/arm/cold-lc.c: New test. diff --git a/gcc/testsuite/gcc.target/bfin/builtins/abs_fr1x16-1.c b/gcc/testsuite/gcc.target/bfin/builtins/abs_fr1x16-1.c new file mode 100644 index 00000000000..9ca524d29f9 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/abs_fr1x16-1.c @@ -0,0 +1,15 @@ +extern void abort (void); + +typedef short fract16; + +int main () +{ + fract16 t1; + + t1 = __builtin_bfin_abs_fr1x16 (0x7777); + if (t1 != 0x7777) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/abs_fr1x16-2.c b/gcc/testsuite/gcc.target/bfin/builtins/abs_fr1x16-2.c new file mode 100644 index 00000000000..00ef1dc1699 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/abs_fr1x16-2.c @@ -0,0 +1,15 @@ +extern void abort (void); + +typedef short fract16; + +int main () +{ + fract16 t1; + + t1 = __builtin_bfin_abs_fr1x16 (0x8000); + if (t1 != 0x7fff) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/abs_fr1x32-1.c b/gcc/testsuite/gcc.target/bfin/builtins/abs_fr1x32-1.c new file mode 100644 index 00000000000..a464c02d58a --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/abs_fr1x32-1.c @@ -0,0 +1,15 @@ +extern void abort (void); + +typedef long fract32; + +int main () +{ + fract32 t; + + t = __builtin_bfin_abs_fr1x32 (0x77777777); + if (t != 0x77777777) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/abs_fr1x32-2.c b/gcc/testsuite/gcc.target/bfin/builtins/abs_fr1x32-2.c new file mode 100644 index 00000000000..9d642b1231f --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/abs_fr1x32-2.c @@ -0,0 +1,15 @@ +extern void abort (void); + +typedef long fract32; + +int main () +{ + fract32 t; + + t = __builtin_bfin_abs_fr1x32 (0x80000000); + if (t != 0x7fffffff) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/abs_fr2x16-1.c b/gcc/testsuite/gcc.target/bfin/builtins/abs_fr2x16-1.c new file mode 100644 index 00000000000..86badedce1f --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/abs_fr2x16-1.c @@ -0,0 +1,22 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +int main () +{ + fract2x16 a, t; + fract16 t1, t2; + + a = __builtin_bfin_compose_2x16 (0x5fff, 0xffff); + + t = __builtin_bfin_abs_fr2x16 (a); + t1 = __builtin_bfin_extract_hi (t); + t2 = __builtin_bfin_extract_lo (t); + if (t1 != 0x5fff || t2 != 0x1) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/abs_fr2x16-2.c b/gcc/testsuite/gcc.target/bfin/builtins/abs_fr2x16-2.c new file mode 100644 index 00000000000..80844bdaf69 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/abs_fr2x16-2.c @@ -0,0 +1,22 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +int main () +{ + fract2x16 a, t; + fract16 t1, t2; + + a = __builtin_bfin_compose_2x16 (0x1001, 0x0001); + + t = __builtin_bfin_abs_fr2x16 (a); + t1 = __builtin_bfin_extract_hi (t); + t2 = __builtin_bfin_extract_lo (t); + if (t1 != 0x1001 || t2 != 0x0001) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/add_fr1x16-1.c b/gcc/testsuite/gcc.target/bfin/builtins/add_fr1x16-1.c new file mode 100644 index 00000000000..bd8f46d838d --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/add_fr1x16-1.c @@ -0,0 +1,14 @@ +extern void abort (void); + +typedef short fract16; + +int main () +{ + fract16 t1; + + t1 = __builtin_bfin_add_fr1x16 (0x3000, 0x2000); + if (t1 != 0x5000) + abort (); + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/add_fr1x16-2.c b/gcc/testsuite/gcc.target/bfin/builtins/add_fr1x16-2.c new file mode 100644 index 00000000000..1054e95aa46 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/add_fr1x16-2.c @@ -0,0 +1,14 @@ +extern void abort (void); + +typedef short fract16; + +int main () +{ + fract16 t1; + + t1 = __builtin_bfin_add_fr1x16 (0x3000, 0xd000); + if (t1 != 0x0) + abort (); + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/add_fr1x32-1.c b/gcc/testsuite/gcc.target/bfin/builtins/add_fr1x32-1.c new file mode 100644 index 00000000000..a14ad688dd4 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/add_fr1x32-1.c @@ -0,0 +1,15 @@ +extern void abort (void); + +typedef long fract32; + +int main () +{ + fract32 t; + + t = __builtin_bfin_add_fr1x32 (0x40003000, 0x50002000); + if (t != 0x7fffffff) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/add_fr1x32-2.c b/gcc/testsuite/gcc.target/bfin/builtins/add_fr1x32-2.c new file mode 100644 index 00000000000..2345cb09e96 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/add_fr1x32-2.c @@ -0,0 +1,15 @@ +extern void abort (void); + +typedef long fract32; + +int main () +{ + fract32 t; + + t = __builtin_bfin_add_fr1x32 (0x40003000, 0xc000d000); + if (t != 0x00010000) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/add_fr2x16-1.c b/gcc/testsuite/gcc.target/bfin/builtins/add_fr2x16-1.c new file mode 100644 index 00000000000..69736978bcc --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/add_fr2x16-1.c @@ -0,0 +1,23 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +int main () +{ + fract2x16 a, b, t; + fract16 t1, t2; + + a = __builtin_bfin_compose_2x16 (0x4000, 0x2000); + b = __builtin_bfin_compose_2x16 (0x8000, 0x5000); + + t = __builtin_bfin_add_fr2x16 (a, b); + t1 = __builtin_bfin_extract_hi (t); + t2 = __builtin_bfin_extract_lo (t); + if (t1 != 0xffffc000 || t2 != 0x7000) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/add_fr2x16-2.c b/gcc/testsuite/gcc.target/bfin/builtins/add_fr2x16-2.c new file mode 100644 index 00000000000..f7a309b8c9c --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/add_fr2x16-2.c @@ -0,0 +1,22 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +int main () +{ + fract2x16 a, b, t; + fract16 t1, t2; + + a = __builtin_bfin_compose_2x16 (0x7000, 0xc000); + b = __builtin_bfin_compose_2x16 (0x8000, 0xc000); + + t = __builtin_bfin_add_fr2x16 (a, b); + t1 = __builtin_bfin_extract_hi (t); + t2 = __builtin_bfin_extract_lo (t); + if (t1 != 0xfffff000 || t2 != 0xffff8000) + abort (); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/bfin/builtins/bfin-builtins.exp b/gcc/testsuite/gcc.target/bfin/builtins/bfin-builtins.exp new file mode 100644 index 00000000000..645460e03c6 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/bfin-builtins.exp @@ -0,0 +1,39 @@ +# Copyright (C) 2009 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GCC; see the file COPYING3. If not see +# . + +# GCC testsuite that uses the `c-torture.exp' driver, looping over +# optimization options. + +load_lib c-torture.exp +load_lib target-supports.exp +load_lib torture-options.exp + +if { ![istarget bfin-*-*] } then { + return +} + + +torture-init +set-torture-options [list {} -Os -O0 -O1 -O2 -O3 {-ffast-math -mfast-fp -O2} {-mfast-fp -O2} {-ffast-math -O2}] +set additional_flags "-W -Wall" + +foreach src [lsort [find $srcdir/$subdir *.c]] { + if {[runtest_file_p $runtests $src]} { + c-torture-execute [list $src] $additional_flags + } +} + +torture-finish diff --git a/gcc/testsuite/gcc.target/bfin/builtins/circptr.c b/gcc/testsuite/gcc.target/bfin/builtins/circptr.c new file mode 100644 index 00000000000..8419aa680cc --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/circptr.c @@ -0,0 +1,29 @@ +#include + +int t[] = { 1, 2, 3, 4, 5, 6, 7 }; +int expect[] = { 1, 3, 6, 10, 15, 21, 28, 29, 31, 34, 38, 43, 49, 56 }; + +int foo (int n) +{ + int *p = t; + int sum = 0; + int i; + for (i = 0; i < n; i++) { + sum += *p; + p = __builtin_bfin_circptr (p, sizeof *p, t, sizeof t); + } + return sum; +} + +int main () +{ + int i; + int *p = expect; + for (i = 0; i < 14; i++) { + int sum = foo (i + 1); + if (sum != *p) + abort (); + p = __builtin_bfin_circptr (p, sizeof *p, expect, sizeof expect); + } + return 0; +} diff --git a/gcc/testsuite/gcc.target/bfin/builtins/cpmlx_mac_fr2x16-1.c b/gcc/testsuite/gcc.target/bfin/builtins/cpmlx_mac_fr2x16-1.c new file mode 100644 index 00000000000..17344bf06e0 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/cpmlx_mac_fr2x16-1.c @@ -0,0 +1,23 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +int main () +{ + fract2x16 a, b, c, t; + fract16 t1, t2; + + a = __builtin_bfin_compose_2x16 (0x2000, 0x1000); + b = __builtin_bfin_compose_2x16 (0x2000, 0x1000); + c = __builtin_bfin_compose_2x16 (0x2000, 0x1000); + + t = __builtin_bfin_cmplx_mac (a, b, c); + t1 = __builtin_bfin_extract_hi (t); + t2 = __builtin_bfin_extract_lo (t); + if (t1 != 0x2800 || t2 != 0x0a00) + abort (); + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/cpmlx_mac_fr2x16-2.c b/gcc/testsuite/gcc.target/bfin/builtins/cpmlx_mac_fr2x16-2.c new file mode 100644 index 00000000000..99471165195 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/cpmlx_mac_fr2x16-2.c @@ -0,0 +1,23 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +int main () +{ + fract2x16 a, b, c, t; + fract16 t1, t2; + + a = __builtin_bfin_compose_2x16 (0x2000, 0x1000); + b = __builtin_bfin_compose_2x16 (0xb000, 0xe000); + c = __builtin_bfin_compose_2x16 (0xa000, 0x8000); + + t = __builtin_bfin_cmplx_mac (a, b, c); + t1 = __builtin_bfin_extract_hi (t); + t2 = __builtin_bfin_extract_lo (t); + if (t1 != 0x7fff || t2 != 0xfffff400) + abort (); + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/cpmlx_msu_fr2x16-1.c b/gcc/testsuite/gcc.target/bfin/builtins/cpmlx_msu_fr2x16-1.c new file mode 100644 index 00000000000..10fcd4ca4fb --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/cpmlx_msu_fr2x16-1.c @@ -0,0 +1,23 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +int main () +{ + fract2x16 a, b, c, t; + fract16 t1, t2; + + a = __builtin_bfin_compose_2x16 (0x0000, 0x0000); + b = __builtin_bfin_compose_2x16 (0x2000, 0x1000); + c = __builtin_bfin_compose_2x16 (0x2000, 0x1000); + + t = __builtin_bfin_cmplx_msu (a, b, c); + t1 = __builtin_bfin_extract_hi (t); + t2 = __builtin_bfin_extract_lo (t); + if (t1 != 0xfffff800 || t2 != 0x600) + abort (); + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/cpmlx_msu_fr2x16-2.c b/gcc/testsuite/gcc.target/bfin/builtins/cpmlx_msu_fr2x16-2.c new file mode 100644 index 00000000000..b2a7c5db397 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/cpmlx_msu_fr2x16-2.c @@ -0,0 +1,23 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +int main () +{ + fract2x16 a, b, c, t; + fract16 t1, t2; + + a = __builtin_bfin_compose_2x16 (0x2000, 0x1000); + b = __builtin_bfin_compose_2x16 (0xb000, 0xe000); + c = __builtin_bfin_compose_2x16 (0xa000, 0x8000); + + t = __builtin_bfin_cmplx_msu (a, b, c); + t1 = __builtin_bfin_extract_hi (t); + t2 = __builtin_bfin_extract_lo (t); + if (t1 != 0xffffb800 || t2 != 0x2c00) + abort (); + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/cpmlx_mul_fr2x16-1.c b/gcc/testsuite/gcc.target/bfin/builtins/cpmlx_mul_fr2x16-1.c new file mode 100644 index 00000000000..c6b12257e17 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/cpmlx_mul_fr2x16-1.c @@ -0,0 +1,22 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +int main () +{ + fract2x16 a, b, t; + fract16 t1, t2; + + a = __builtin_bfin_compose_2x16 (0x2000, 0x1000); + b = __builtin_bfin_compose_2x16 (0x2000, 0x1000); + + t = __builtin_bfin_cmplx_mul (a, b); + t1 = __builtin_bfin_extract_hi (t); + t2 = __builtin_bfin_extract_lo (t); + if (t1 != 0x800 || t2 != 0xfffffa00) + abort (); + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/cpmlx_mul_fr2x16-2.c b/gcc/testsuite/gcc.target/bfin/builtins/cpmlx_mul_fr2x16-2.c new file mode 100644 index 00000000000..d31fc15676a --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/cpmlx_mul_fr2x16-2.c @@ -0,0 +1,22 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +int main () +{ + fract2x16 a, b, t; + fract16 t1, t2; + + a = __builtin_bfin_compose_2x16 (0xa000, 0x8000); + b = __builtin_bfin_compose_2x16 (0xb000, 0xe000); + + t = __builtin_bfin_cmplx_mul (a, b); + t1 = __builtin_bfin_extract_hi (t); + t2 = __builtin_bfin_extract_lo (t); + if (t1 != 0x6800 || t2 != 0xffffe400) + abort (); + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/diff_hl_fr2x16-1.c b/gcc/testsuite/gcc.target/bfin/builtins/diff_hl_fr2x16-1.c new file mode 100644 index 00000000000..1d1c0f701a4 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/diff_hl_fr2x16-1.c @@ -0,0 +1,20 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +int main () +{ + fract2x16 a; + fract16 t; + + a = __builtin_bfin_compose_2x16 (0x5fff, 0xffff); + + t = __builtin_bfin_diff_hl_fr2x16 (a); + if (t != 0x6000) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/diff_hl_fr2x16-2.c b/gcc/testsuite/gcc.target/bfin/builtins/diff_hl_fr2x16-2.c new file mode 100644 index 00000000000..329ff2eb8a8 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/diff_hl_fr2x16-2.c @@ -0,0 +1,20 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +int main () +{ + fract2x16 a; + fract16 t; + + a = __builtin_bfin_compose_2x16 (0x1001, 0x0001); + + t = __builtin_bfin_diff_hl_fr2x16 (a); + if (t != 0x1000) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/diff_lh_fr2x16-1.c b/gcc/testsuite/gcc.target/bfin/builtins/diff_lh_fr2x16-1.c new file mode 100644 index 00000000000..02d93e758f0 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/diff_lh_fr2x16-1.c @@ -0,0 +1,20 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +int main () +{ + fract2x16 a; + fract16 t; + + a = __builtin_bfin_compose_2x16 (0x5fff, 0xffff); + + t = __builtin_bfin_diff_lh_fr2x16 (a); + if (t != 0xffffa000) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/diff_lh_fr2x16-2.c b/gcc/testsuite/gcc.target/bfin/builtins/diff_lh_fr2x16-2.c new file mode 100644 index 00000000000..1e5dc699f43 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/diff_lh_fr2x16-2.c @@ -0,0 +1,20 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +int main () +{ + fract2x16 a; + fract16 t; + + a = __builtin_bfin_compose_2x16 (0x1001, 0x0001); + + t = __builtin_bfin_diff_lh_fr2x16 (a); + if (t != -0x1000) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/dspaddsubsat_fr2x16-1.c b/gcc/testsuite/gcc.target/bfin/builtins/dspaddsubsat_fr2x16-1.c new file mode 100644 index 00000000000..cb66ecfb366 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/dspaddsubsat_fr2x16-1.c @@ -0,0 +1,22 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +int main () +{ + fract2x16 a, b, t; + fract16 t1, t2; + + a = __builtin_bfin_compose_2x16 (0x5000, 0x3000); + b = __builtin_bfin_compose_2x16 (0x4000, 0x2000); + + t = __builtin_bfin_dspaddsubsat (a, b); + t1 = __builtin_bfin_extract_hi (t); + t2 = __builtin_bfin_extract_lo (t); + if (t1 != 0x7fff || t2 != 0x1000) + abort (); + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/dspaddsubsat_fr2x16-2.c b/gcc/testsuite/gcc.target/bfin/builtins/dspaddsubsat_fr2x16-2.c new file mode 100644 index 00000000000..8d6cab6913d --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/dspaddsubsat_fr2x16-2.c @@ -0,0 +1,22 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +int main () +{ + fract2x16 a, b, t; + fract16 t1, t2; + + a = __builtin_bfin_compose_2x16 (0xd000, 0x8000); + b = __builtin_bfin_compose_2x16 (0x1000, 0x5000); + + t = __builtin_bfin_dspaddsubsat (a, b); + t1 = __builtin_bfin_extract_hi (t); + t2 = __builtin_bfin_extract_lo (t); + if (t1 != 0xffffe000 || t2 != 0xffff8000) + abort (); + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/dspsubaddsat_fr2x16-1.c b/gcc/testsuite/gcc.target/bfin/builtins/dspsubaddsat_fr2x16-1.c new file mode 100644 index 00000000000..0a16a4894e6 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/dspsubaddsat_fr2x16-1.c @@ -0,0 +1,22 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +int main () +{ + fract2x16 a, b, t; + fract16 t1, t2; + + a = __builtin_bfin_compose_2x16 (0x5000, 0x3000); + b = __builtin_bfin_compose_2x16 (0x6000, 0x6000); + + t = __builtin_bfin_dspsubaddsat (a, b); + t1 = __builtin_bfin_extract_hi (t); + t2 = __builtin_bfin_extract_lo (t); + if (t1 != -0x1000 || t2 != 0x7fff) + abort (); + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/dspsubaddsat_fr2x16-2.c b/gcc/testsuite/gcc.target/bfin/builtins/dspsubaddsat_fr2x16-2.c new file mode 100644 index 00000000000..a69451ebaca --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/dspsubaddsat_fr2x16-2.c @@ -0,0 +1,22 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +int main () +{ + fract2x16 a, b, t; + fract16 t1, t2; + + a = __builtin_bfin_compose_2x16 (0xd000, 0xa000); + b = __builtin_bfin_compose_2x16 (0x1000, 0xc000); + + t = __builtin_bfin_dspsubaddsat (a, b); + t1 = __builtin_bfin_extract_hi (t); + t2 = __builtin_bfin_extract_lo (t); + if (t1 != 0xffffc000 || t2 != 0xffff8000) + abort (); + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/hisilh.c b/gcc/testsuite/gcc.target/bfin/builtins/hisilh.c similarity index 100% rename from gcc/testsuite/gcc.target/bfin/hisilh.c rename to gcc/testsuite/gcc.target/bfin/builtins/hisilh.c diff --git a/gcc/testsuite/gcc.target/bfin/builtins/lshl_fr1x16-1.c b/gcc/testsuite/gcc.target/bfin/builtins/lshl_fr1x16-1.c new file mode 100644 index 00000000000..c27d56a96df --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/lshl_fr1x16-1.c @@ -0,0 +1,15 @@ +extern void abort (void); + +typedef short fract16; + +int main () +{ + fract16 t1; + + t1 = __builtin_bfin_lshl_fr1x16 (0x1101, 4); + if (t1 != 0x1010) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/lshl_fr1x16-2.c b/gcc/testsuite/gcc.target/bfin/builtins/lshl_fr1x16-2.c new file mode 100644 index 00000000000..9be2abf8888 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/lshl_fr1x16-2.c @@ -0,0 +1,15 @@ +extern void abort (void); + +typedef short fract16; + +int main () +{ + fract16 t1; + + t1 = __builtin_bfin_lshl_fr1x16 (0x4004, -4); + if (t1 != 0x0400) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/lshl_fr2x16-1.c b/gcc/testsuite/gcc.target/bfin/builtins/lshl_fr2x16-1.c new file mode 100644 index 00000000000..b9cf84f1874 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/lshl_fr2x16-1.c @@ -0,0 +1,22 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +int main () +{ + fract2x16 a, t; + fract16 t1, t2; + + a = __builtin_bfin_compose_2x16 (0xcfff, 0xffff); + + t = __builtin_bfin_lshl_fr2x16 (a, 4); + t1 = __builtin_bfin_extract_hi (t); + t2 = __builtin_bfin_extract_lo (t); + if (t1 != 0xfffffff0 || t2 != 0xfffffff0) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/lshl_fr2x16-2.c b/gcc/testsuite/gcc.target/bfin/builtins/lshl_fr2x16-2.c new file mode 100644 index 00000000000..c2f13d57e07 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/lshl_fr2x16-2.c @@ -0,0 +1,22 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +int main () +{ + fract2x16 a, t; + fract16 t1, t2; + + a = __builtin_bfin_compose_2x16 (0xcfff, 0xffff); + + t = __builtin_bfin_lshl_fr2x16 (a, -4); + t1 = __builtin_bfin_extract_hi (t); + t2 = __builtin_bfin_extract_lo (t); + if (t1 != 0x0cff || t2 != 0x0fff) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/max_fr1x16-1.c b/gcc/testsuite/gcc.target/bfin/builtins/max_fr1x16-1.c new file mode 100644 index 00000000000..1d364b28a55 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/max_fr1x16-1.c @@ -0,0 +1,15 @@ +extern void abort (void); + +typedef short fract16; + +int main () +{ + fract16 t1; + + t1 = __builtin_bfin_max_fr1x16 (0x7777, 0x7000); + if (t1 != 0x7777) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/max_fr1x16-2.c b/gcc/testsuite/gcc.target/bfin/builtins/max_fr1x16-2.c new file mode 100644 index 00000000000..eadf2fb050c --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/max_fr1x16-2.c @@ -0,0 +1,15 @@ +extern void abort (void); + +typedef short fract16; + +int main () +{ + fract16 t1; + + t1 = __builtin_bfin_max_fr1x16 (0x8000, 0xc000); + if (t1 != -0x4000) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/max_fr1x32-1.c b/gcc/testsuite/gcc.target/bfin/builtins/max_fr1x32-1.c new file mode 100644 index 00000000000..90adcef064b --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/max_fr1x32-1.c @@ -0,0 +1,15 @@ +extern void abort (void); + +typedef long fract32; + +int main () +{ + fract32 t; + + t = __builtin_bfin_max_fr1x32 (0x77777777, 0x70007000); + if (t != 0x77777777) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/max_fr1x32-2.c b/gcc/testsuite/gcc.target/bfin/builtins/max_fr1x32-2.c new file mode 100644 index 00000000000..b2ed2afa8ec --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/max_fr1x32-2.c @@ -0,0 +1,15 @@ +extern void abort (void); + +typedef long fract32; + +int main () +{ + fract32 t; + + t = __builtin_bfin_max_fr1x32 (0x80000000, 0xc0000000); + if (t != 0xc0000000) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/max_fr2x16-1.c b/gcc/testsuite/gcc.target/bfin/builtins/max_fr2x16-1.c new file mode 100644 index 00000000000..2d968fd3338 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/max_fr2x16-1.c @@ -0,0 +1,23 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +int main () +{ + fract2x16 a, b, t; + fract16 t1, t2; + + a = __builtin_bfin_compose_2x16 (0x5fff, 0xffff); + b = __builtin_bfin_compose_2x16 (0x1001, 0x0001); + + t = __builtin_bfin_max_fr2x16 (a, b); + t1 = __builtin_bfin_extract_hi (t); + t2 = __builtin_bfin_extract_lo (t); + if (t1 != 0x5fff || t2 != 0x0001) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/max_fr2x16-2.c b/gcc/testsuite/gcc.target/bfin/builtins/max_fr2x16-2.c new file mode 100644 index 00000000000..369c208519e --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/max_fr2x16-2.c @@ -0,0 +1,23 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +int main () +{ + fract2x16 a, b, t; + fract16 t1, t2; + + a = __builtin_bfin_compose_2x16 (0x5000, 0xd000); + b = __builtin_bfin_compose_2x16 (0xc000, 0x2000); + + t = __builtin_bfin_max_fr2x16 (a, b); + t1 = __builtin_bfin_extract_hi (t); + t2 = __builtin_bfin_extract_lo (t); + if (t1 != 0x5000 || t2 != 0x2000) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/min_fr1x16-1.c b/gcc/testsuite/gcc.target/bfin/builtins/min_fr1x16-1.c new file mode 100644 index 00000000000..686dcdceff4 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/min_fr1x16-1.c @@ -0,0 +1,15 @@ +extern void abort (void); + +typedef short fract16; + +int main () +{ + fract16 t1; + + t1 = __builtin_bfin_min_fr1x16 (0x7777, 0x7000); + if (t1 != 0x7000) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/min_fr1x16-2.c b/gcc/testsuite/gcc.target/bfin/builtins/min_fr1x16-2.c new file mode 100644 index 00000000000..655804034ac --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/min_fr1x16-2.c @@ -0,0 +1,15 @@ +extern void abort (void); + +typedef short fract16; + +int main () +{ + fract16 t1; + + t1 = __builtin_bfin_min_fr1x16 (0x7000, 0xc001); + if (t1 != -0x3fff) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/min_fr1x32-1.c b/gcc/testsuite/gcc.target/bfin/builtins/min_fr1x32-1.c new file mode 100644 index 00000000000..a824e76ef32 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/min_fr1x32-1.c @@ -0,0 +1,15 @@ +extern void abort (void); + +typedef long fract32; + +int main () +{ + fract32 t; + + t = __builtin_bfin_min_fr1x32 (0x77777777, 0x70007000); + if (t != 0x70007000) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/min_fr1x32-2.c b/gcc/testsuite/gcc.target/bfin/builtins/min_fr1x32-2.c new file mode 100644 index 00000000000..72151016e09 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/min_fr1x32-2.c @@ -0,0 +1,15 @@ +extern void abort (void); + +typedef long fract32; + +int main () +{ + fract32 t; + + t = __builtin_bfin_min_fr1x32 (0x70007000, 0xc000c000); + if (t != 0xc000c000) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/min_fr2x16-1.c b/gcc/testsuite/gcc.target/bfin/builtins/min_fr2x16-1.c new file mode 100644 index 00000000000..2f2b401e5e9 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/min_fr2x16-1.c @@ -0,0 +1,23 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +int main () +{ + fract2x16 a, b, t; + fract16 t1, t2; + + a = __builtin_bfin_compose_2x16 (0x5fff, 0xffff); + b = __builtin_bfin_compose_2x16 (0x1001, 0x0001); + + t = __builtin_bfin_min_fr2x16 (a, b); + t1 = __builtin_bfin_extract_hi (t); + t2 = __builtin_bfin_extract_lo (t); + if (t1 != 0x1001 || t2 != 0xffffffff) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/min_fr2x16-2.c b/gcc/testsuite/gcc.target/bfin/builtins/min_fr2x16-2.c new file mode 100644 index 00000000000..af564f43146 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/min_fr2x16-2.c @@ -0,0 +1,23 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +int main () +{ + fract2x16 a, b, t; + fract16 t1, t2; + + a = __builtin_bfin_compose_2x16 (0x5000, 0xd000); + b = __builtin_bfin_compose_2x16 (0xc000, 0x2000); + + t = __builtin_bfin_min_fr2x16 (a, b); + t1 = __builtin_bfin_extract_hi (t); + t2 = __builtin_bfin_extract_lo (t); + if (t1 != 0xffffc000 || t2 != 0xffffd000) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/mulhisihh_fr2x16-1.c b/gcc/testsuite/gcc.target/bfin/builtins/mulhisihh_fr2x16-1.c new file mode 100644 index 00000000000..06790c94a66 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/mulhisihh_fr2x16-1.c @@ -0,0 +1,20 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +int main () +{ + fract2x16 a, b; + int t; + + a = __builtin_bfin_compose_2x16 (0x5000, 0x7000); + b = __builtin_bfin_compose_2x16 (0x4000, 0x2000); + + t = __builtin_bfin_mulhisihh (a, b); + if (t != 0x14000000) + abort (); + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/mulhisihh_fr2x16-2.c b/gcc/testsuite/gcc.target/bfin/builtins/mulhisihh_fr2x16-2.c new file mode 100644 index 00000000000..ef070584eec --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/mulhisihh_fr2x16-2.c @@ -0,0 +1,20 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +int main () +{ + fract2x16 a, b; + int t; + + a = __builtin_bfin_compose_2x16 (0xc000, 0xa000); + b = __builtin_bfin_compose_2x16 (0x7000, 0x2000); + + t = __builtin_bfin_mulhisihh (a, b); + if (t != 0xe4000000) + abort (); + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/mulhisihl_fr2x16-1.c b/gcc/testsuite/gcc.target/bfin/builtins/mulhisihl_fr2x16-1.c new file mode 100644 index 00000000000..e2768e399ce --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/mulhisihl_fr2x16-1.c @@ -0,0 +1,20 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +int main () +{ + fract2x16 a, b; + int t; + + a = __builtin_bfin_compose_2x16 (0x5000, 0x7000); + b = __builtin_bfin_compose_2x16 (0x4000, 0x2000); + + t = __builtin_bfin_mulhisihl (a, b); + if (t != 0xa000000) + abort (); + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/mulhisihl_fr2x16-2.c b/gcc/testsuite/gcc.target/bfin/builtins/mulhisihl_fr2x16-2.c new file mode 100644 index 00000000000..b64eabe6bf8 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/mulhisihl_fr2x16-2.c @@ -0,0 +1,20 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +int main () +{ + fract2x16 a, b; + int t; + + a = __builtin_bfin_compose_2x16 (0xa000, 0x7000); + b = __builtin_bfin_compose_2x16 (0xe000, 0x5000); + + t = __builtin_bfin_mulhisihl (a, b); + if (t != 0xe2000000) + abort (); + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/mulhisilh_fr2x16-1.c b/gcc/testsuite/gcc.target/bfin/builtins/mulhisilh_fr2x16-1.c new file mode 100644 index 00000000000..99faef51aa4 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/mulhisilh_fr2x16-1.c @@ -0,0 +1,20 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +int main () +{ + fract2x16 a, b; + int t; + + a = __builtin_bfin_compose_2x16 (0x5000, 0x7000); + b = __builtin_bfin_compose_2x16 (0x4000, 0x2000); + + t = __builtin_bfin_mulhisilh (a, b); + if (t != 0x1c000000) + abort (); + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/mulhisilh_fr2x16-2.c b/gcc/testsuite/gcc.target/bfin/builtins/mulhisilh_fr2x16-2.c new file mode 100644 index 00000000000..3aef80cf872 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/mulhisilh_fr2x16-2.c @@ -0,0 +1,20 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +int main () +{ + fract2x16 a, b; + int t; + + a = __builtin_bfin_compose_2x16 (0x5000, 0x7000); + b = __builtin_bfin_compose_2x16 (0xa000, 0x5000); + + t = __builtin_bfin_mulhisilh (a, b); + if (t != 0xd6000000) + abort (); + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/mulhisill_fr2x16-1.c b/gcc/testsuite/gcc.target/bfin/builtins/mulhisill_fr2x16-1.c new file mode 100644 index 00000000000..acf1e9e1bd6 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/mulhisill_fr2x16-1.c @@ -0,0 +1,20 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +int main () +{ + fract2x16 a, b; + int t; + + a = __builtin_bfin_compose_2x16 (0x5000, 0x7000); + b = __builtin_bfin_compose_2x16 (0x4000, 0x2000); + + t = __builtin_bfin_mulhisill (a, b); + if (t != 0xe000000) + abort (); + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/mulhisill_fr2x16-2.c b/gcc/testsuite/gcc.target/bfin/builtins/mulhisill_fr2x16-2.c new file mode 100644 index 00000000000..147d8e14b06 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/mulhisill_fr2x16-2.c @@ -0,0 +1,20 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +int main () +{ + fract2x16 a, b; + int t; + + a = __builtin_bfin_compose_2x16 (0x5000, 0xa000); + b = __builtin_bfin_compose_2x16 (0x4000, 0x2000); + + t = __builtin_bfin_mulhisill (a, b); + if (t != 0xf4000000) + abort (); + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/mult_fr1x16-1.c b/gcc/testsuite/gcc.target/bfin/builtins/mult_fr1x16-1.c new file mode 100644 index 00000000000..614b4444141 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/mult_fr1x16-1.c @@ -0,0 +1,15 @@ +extern void abort (void); + +typedef short fract16; + +int main () +{ + fract16 t1; + + t1 = __builtin_bfin_mult_fr1x16 (0x7777, 0x0007); + if (t1 != 0x0006) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/mult_fr1x16-2.c b/gcc/testsuite/gcc.target/bfin/builtins/mult_fr1x16-2.c new file mode 100644 index 00000000000..aec3b7ccf64 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/mult_fr1x16-2.c @@ -0,0 +1,15 @@ +extern void abort (void); + +typedef short fract16; + +int main () +{ + fract16 t1; + + t1 = __builtin_bfin_mult_fr1x16 (0x0002, 0x0001); + if (t1 != 0x0) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/mult_fr1x32-1.c b/gcc/testsuite/gcc.target/bfin/builtins/mult_fr1x32-1.c new file mode 100644 index 00000000000..8c8ad87bda4 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/mult_fr1x32-1.c @@ -0,0 +1,15 @@ +extern void abort (void); + +typedef long fract32; + +int main () +{ + fract32 t; + + t = __builtin_bfin_mult_fr1x32 (0x7777, 0x0001); + if (t != 0x0000eeee) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/mult_fr1x32-2.c b/gcc/testsuite/gcc.target/bfin/builtins/mult_fr1x32-2.c new file mode 100644 index 00000000000..95d4f9d12a1 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/mult_fr1x32-2.c @@ -0,0 +1,15 @@ +extern void abort (void); + +typedef long fract32; + +int main () +{ + fract32 t; + + t = __builtin_bfin_mult_fr1x32 (0x0002, 0x0001); + if (t != 0x0004) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/mult_fr1x32x32-1.c b/gcc/testsuite/gcc.target/bfin/builtins/mult_fr1x32x32-1.c new file mode 100644 index 00000000000..ff41bf5cfbc --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/mult_fr1x32x32-1.c @@ -0,0 +1,15 @@ +extern void abort (void); + +typedef long fract32; + +int main () +{ + fract32 t; + + t = __builtin_bfin_mult_fr1x32x32 (0x80000000, 0x80000000); + if (t != 0x7fffffff) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/mult_fr1x32x32-2.c b/gcc/testsuite/gcc.target/bfin/builtins/mult_fr1x32x32-2.c new file mode 100644 index 00000000000..6f5d5cbdbc6 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/mult_fr1x32x32-2.c @@ -0,0 +1,15 @@ +extern void abort (void); + +typedef long fract32; + +int main () +{ + fract32 t; + + t = __builtin_bfin_mult_fr1x32x32 (0x7fff0000, 0x00000007); + if (t != 0x6) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/mult_fr1x32x32NS-1.c b/gcc/testsuite/gcc.target/bfin/builtins/mult_fr1x32x32NS-1.c new file mode 100644 index 00000000000..9bdfae632df --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/mult_fr1x32x32NS-1.c @@ -0,0 +1,15 @@ +extern void abort (void); + +typedef long fract32; + +int main () +{ + fract32 t; + + t = __builtin_bfin_mult_fr1x32x32NS (0x80000000, 0x80000000); + if (t != 0x7fffffff) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/mult_fr1x32x32NS-2.c b/gcc/testsuite/gcc.target/bfin/builtins/mult_fr1x32x32NS-2.c new file mode 100644 index 00000000000..cb3f18c50a7 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/mult_fr1x32x32NS-2.c @@ -0,0 +1,15 @@ +extern void abort (void); + +typedef long fract32; + +int main () +{ + fract32 t; + + t = __builtin_bfin_mult_fr1x32x32NS (0x7fff0000, 0x00000007); + if (t != 0x6) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/mult_fr2x16-1.c b/gcc/testsuite/gcc.target/bfin/builtins/mult_fr2x16-1.c new file mode 100644 index 00000000000..d15dd4516cd --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/mult_fr2x16-1.c @@ -0,0 +1,23 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +int main () +{ + fract2x16 a, b, t; + fract16 t1, t2; + + a = __builtin_bfin_compose_2x16 (0x5fff, 0xffff); + b = __builtin_bfin_compose_2x16 (0x1001, 0x0001); + + t = __builtin_bfin_mult_fr2x16 (a, b); + t1 = __builtin_bfin_extract_hi (t); + t2 = __builtin_bfin_extract_lo (t); + if (t1 != 0x0c00 || t2 != 0xffffffff) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/mult_fr2x16-2.c b/gcc/testsuite/gcc.target/bfin/builtins/mult_fr2x16-2.c new file mode 100644 index 00000000000..6592eaf866f --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/mult_fr2x16-2.c @@ -0,0 +1,23 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +int main () +{ + fract2x16 a, b, t; + fract16 t1, t2; + + a = __builtin_bfin_compose_2x16 (0x5000, 0xd000); + b = __builtin_bfin_compose_2x16 (0xc000, 0x2000); + + t = __builtin_bfin_mult_fr2x16 (a, b); + t1 = __builtin_bfin_extract_hi (t); + t2 = __builtin_bfin_extract_lo (t); + if (t1 != 0xffffd800 || t2 != 0xfffff400) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/multr_fr1x16-1.c b/gcc/testsuite/gcc.target/bfin/builtins/multr_fr1x16-1.c new file mode 100644 index 00000000000..3612d9320d1 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/multr_fr1x16-1.c @@ -0,0 +1,15 @@ +extern void abort (void); + +typedef short fract16; + +int main () +{ + fract16 t1; + + t1 = __builtin_bfin_multr_fr1x16 (0x7777, 0x0007); + if (t1 != 0x0007) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/multr_fr1x16-2.c b/gcc/testsuite/gcc.target/bfin/builtins/multr_fr1x16-2.c new file mode 100644 index 00000000000..e5fb2173e35 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/multr_fr1x16-2.c @@ -0,0 +1,15 @@ +extern void abort (void); + +typedef short fract16; + +int main () +{ + fract16 t1; + + t1 = __builtin_bfin_multr_fr1x16 (0x0002, 0x0001); + if (t1 != 0x0) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/multr_fr2x16-1.c b/gcc/testsuite/gcc.target/bfin/builtins/multr_fr2x16-1.c new file mode 100644 index 00000000000..33d5b4a42d7 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/multr_fr2x16-1.c @@ -0,0 +1,23 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +int main () +{ + fract2x16 a, b, t; + fract16 t1, t2; + + a = __builtin_bfin_compose_2x16 (0x5fff, 0xffff); + b = __builtin_bfin_compose_2x16 (0x1001, 0x0001); + + t = __builtin_bfin_multr_fr2x16 (a, b); + t1 = __builtin_bfin_extract_hi (t); + t2 = __builtin_bfin_extract_lo (t); + if (t1 != 0xc01 || t2 != 0x0) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/multr_fr2x16-2.c b/gcc/testsuite/gcc.target/bfin/builtins/multr_fr2x16-2.c new file mode 100644 index 00000000000..a2feed2f107 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/multr_fr2x16-2.c @@ -0,0 +1,23 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +int main () +{ + fract2x16 a, b, t; + fract16 t1, t2; + + a = __builtin_bfin_compose_2x16 (0x5000, 0xd000); + b = __builtin_bfin_compose_2x16 (0xc000, 0x2000); + + t = __builtin_bfin_multr_fr2x16 (a, b); + t1 = __builtin_bfin_extract_hi (t); + t2 = __builtin_bfin_extract_lo (t); + if (t1 != 0xffffd800 || t2 != 0xfffff400) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/negate_fr1x16-1.c b/gcc/testsuite/gcc.target/bfin/builtins/negate_fr1x16-1.c new file mode 100644 index 00000000000..10b2626c735 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/negate_fr1x16-1.c @@ -0,0 +1,15 @@ +extern void abort (void); + +typedef short fract16; + +int main () +{ + fract16 t1; + + t1 = __builtin_bfin_negate_fr1x16 (0x7fff); + if (t1 != -0x7fff) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/negate_fr1x16-2.c b/gcc/testsuite/gcc.target/bfin/builtins/negate_fr1x16-2.c new file mode 100644 index 00000000000..c839dce321d --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/negate_fr1x16-2.c @@ -0,0 +1,15 @@ +extern void abort (void); + +typedef short fract16; + +int main () +{ + fract16 t1; + + t1 = __builtin_bfin_negate_fr1x16 (0x8000); + if (t1 != 0x7fff) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/negate_fr1x16-3.c b/gcc/testsuite/gcc.target/bfin/builtins/negate_fr1x16-3.c new file mode 100644 index 00000000000..0462de20af8 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/negate_fr1x16-3.c @@ -0,0 +1,15 @@ +extern void abort (void); + +typedef short fract16; + +int main () +{ + fract16 t1; + + t1 = __builtin_bfin_negate_fr1x16 (0xc000); + if (t1 != 0x4000) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/negate_fr1x32-1.c b/gcc/testsuite/gcc.target/bfin/builtins/negate_fr1x32-1.c new file mode 100644 index 00000000000..c7ba22c7198 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/negate_fr1x32-1.c @@ -0,0 +1,15 @@ +extern void abort (void); + +typedef long fract32; + +int main () +{ + fract32 t; + + t = __builtin_bfin_negate_fr1x32 (0x7fffffff); + if (t != -0x7fffffff) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/negate_fr1x32-2.c b/gcc/testsuite/gcc.target/bfin/builtins/negate_fr1x32-2.c new file mode 100644 index 00000000000..70532f4abf1 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/negate_fr1x32-2.c @@ -0,0 +1,15 @@ +extern void abort (void); + +typedef long fract32; + +int main () +{ + fract32 t; + + t = __builtin_bfin_negate_fr1x32 (0x80000000); + if (t != 0x7fffffff) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/negate_fr2x16-1.c b/gcc/testsuite/gcc.target/bfin/builtins/negate_fr2x16-1.c new file mode 100644 index 00000000000..449d8b8ac37 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/negate_fr2x16-1.c @@ -0,0 +1,22 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +int main () +{ + fract2x16 a, t; + fract16 t1, t2; + + a = __builtin_bfin_compose_2x16 (0x5fff, 0xffff); + + t = __builtin_bfin_negate_fr2x16 (a); + t1 = __builtin_bfin_extract_hi (t); + t2 = __builtin_bfin_extract_lo (t); + if (t1 != -0x5fff || t2 != 0x1) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/negate_fr2x16-2.c b/gcc/testsuite/gcc.target/bfin/builtins/negate_fr2x16-2.c new file mode 100644 index 00000000000..db750648cab --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/negate_fr2x16-2.c @@ -0,0 +1,21 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +int main () +{ + fract2x16 a, t; + fract16 t1, t2; + + a = __builtin_bfin_compose_2x16 (0x1001, 0x0001); + t = __builtin_bfin_negate_fr2x16 (a); + t1 = __builtin_bfin_extract_hi (t); + t2 = __builtin_bfin_extract_lo (t); + if (t1 != -0x1001 || t2 != -0x1) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/norm16-1.c b/gcc/testsuite/gcc.target/bfin/builtins/norm16-1.c new file mode 100644 index 00000000000..b8a53dd0edc --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/norm16-1.c @@ -0,0 +1,14 @@ +extern void abort (void); +extern void exit (int); + +int main () +{ + int a; + + a = __builtin_bfin_norm_fr1x16 (0x1234); + if (a != 2) + abort (); + + exit (0); +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/norm16-2.c b/gcc/testsuite/gcc.target/bfin/builtins/norm16-2.c new file mode 100644 index 00000000000..2534e9ff906 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/norm16-2.c @@ -0,0 +1,18 @@ +extern void abort (void); +extern void exit (int); + +typedef short fract16; + +int main () +{ + fract16 f = 0x1234, g; + int a; + + a = __builtin_bfin_norm_fr1x16 (f); + g = f << a; + if (g != (fract16) 0x48d0) + abort (); + + exit (0); +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/norm16-3.c b/gcc/testsuite/gcc.target/bfin/builtins/norm16-3.c new file mode 100644 index 00000000000..24b6fcbee81 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/norm16-3.c @@ -0,0 +1,14 @@ +extern void abort (void); +extern void exit (int); + +int main () +{ + int a; + + a = __builtin_bfin_norm_fr1x16 (0xfedc); + if (a != 6) + abort (); + + exit (0); +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/norm16-4.c b/gcc/testsuite/gcc.target/bfin/builtins/norm16-4.c new file mode 100644 index 00000000000..986af6c552d --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/norm16-4.c @@ -0,0 +1,18 @@ +extern void abort (void); +extern void exit (int); + +typedef short fract16; + +int main () +{ + fract16 f = 0xfedc, g; + int a; + + a = __builtin_bfin_norm_fr1x16 (f); + g = f << a; + if (g != (fract16) 0xb700) + abort (); + + exit (0); +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/norm16-5.c b/gcc/testsuite/gcc.target/bfin/builtins/norm16-5.c new file mode 100644 index 00000000000..f85ce96ab3b --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/norm16-5.c @@ -0,0 +1,14 @@ +extern void abort (void); +extern void exit (int); + +int main () +{ + int a; + + a = __builtin_bfin_norm_fr1x16 (0); + if (a != 15) + abort (); + + exit (0); +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/norm16-6.c b/gcc/testsuite/gcc.target/bfin/builtins/norm16-6.c new file mode 100644 index 00000000000..bc30f23da58 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/norm16-6.c @@ -0,0 +1,18 @@ +extern void abort (void); +extern void exit (int); + +typedef short fract16; + +int main () +{ + fract16 f = 0, g; + int a; + + a = __builtin_bfin_norm_fr1x16 (f); + g = f << a; + if (g != (fract16) 0) + abort (); + + exit (0); +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/norm16-7.c b/gcc/testsuite/gcc.target/bfin/builtins/norm16-7.c new file mode 100644 index 00000000000..4edb00f3432 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/norm16-7.c @@ -0,0 +1,14 @@ +extern void abort (void); +extern void exit (int); + +int main () +{ + int a; + + a = __builtin_bfin_norm_fr1x16 (0xffff); + if (a != 15) + abort (); + + exit (0); +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/norm16-8.c b/gcc/testsuite/gcc.target/bfin/builtins/norm16-8.c new file mode 100644 index 00000000000..c04219f4d80 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/norm16-8.c @@ -0,0 +1,18 @@ +extern void abort (void); +extern void exit (int); + +typedef short fract16; + +int main () +{ + fract16 f = 0xffff, g; + int a; + + a = __builtin_bfin_norm_fr1x16 (f); + g = f << a; + if (g != (fract16) 0x8000) + abort (); + + exit (0); +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/norm32-1.c b/gcc/testsuite/gcc.target/bfin/builtins/norm32-1.c new file mode 100644 index 00000000000..f8c6b93caf6 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/norm32-1.c @@ -0,0 +1,14 @@ +extern void abort (void); +extern void exit (int); + +int main () +{ + int a; + + a = __builtin_bfin_norm_fr1x32 (0x12345678); + if (a != 2) + abort (); + + exit (0); +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/norm32-10.c b/gcc/testsuite/gcc.target/bfin/builtins/norm32-10.c new file mode 100644 index 00000000000..ba4ad920c38 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/norm32-10.c @@ -0,0 +1,18 @@ +extern void abort (void); +extern void exit (int); + +typedef int fract32; + +int main () +{ + fract32 f = 0x1234, g; + int a; + + a = __builtin_bfin_norm_fr1x32 (f); + g = f << a; + if (g != 0x48d00000) + abort (); + + exit (0); +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/norm32-11.c b/gcc/testsuite/gcc.target/bfin/builtins/norm32-11.c new file mode 100644 index 00000000000..ae675b0d223 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/norm32-11.c @@ -0,0 +1,14 @@ +extern void abort (void); +extern void exit (int); + +int main () +{ + int a; + + a = __builtin_bfin_norm_fr1x32 (0xfffffedc); + if (a != 22) + abort (); + + exit (0); +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/norm32-12.c b/gcc/testsuite/gcc.target/bfin/builtins/norm32-12.c new file mode 100644 index 00000000000..b7fbea7acb9 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/norm32-12.c @@ -0,0 +1,18 @@ +extern void abort (void); +extern void exit (int); + +typedef int fract32; + +int main () +{ + fract32 f = 0xfffffedc, g; + int a; + + a = __builtin_bfin_norm_fr1x32 (f); + g = f << a; + if (g != 0xb7000000) + abort (); + + exit (0); +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/norm32-2.c b/gcc/testsuite/gcc.target/bfin/builtins/norm32-2.c new file mode 100644 index 00000000000..4972ed43d41 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/norm32-2.c @@ -0,0 +1,18 @@ +extern void abort (void); +extern void exit (int); + +typedef int fract32; + +int main () +{ + fract32 f = 0x12345678, g; + int a; + + a = __builtin_bfin_norm_fr1x32 (f); + g = f << a; + if (g != 0x48d159e0) + abort (); + + exit (0); +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/norm32-3.c b/gcc/testsuite/gcc.target/bfin/builtins/norm32-3.c new file mode 100644 index 00000000000..cc565b7290d --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/norm32-3.c @@ -0,0 +1,14 @@ +extern void abort (void); +extern void exit (int); + +int main () +{ + int a; + + a = __builtin_bfin_norm_fr1x32 (0xfedcba98); + if (a != 6) + abort (); + + exit (0); +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/norm32-4.c b/gcc/testsuite/gcc.target/bfin/builtins/norm32-4.c new file mode 100644 index 00000000000..1b3ae8ddeed --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/norm32-4.c @@ -0,0 +1,18 @@ +extern void abort (void); +extern void exit (int); + +typedef int fract32; + +int main () +{ + fract32 f = 0xfedcba98, g; + int a; + + a = __builtin_bfin_norm_fr1x32 (f); + g = f << a; + if (g != 0xb72ea600) + abort (); + + exit (0); +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/norm32-5.c b/gcc/testsuite/gcc.target/bfin/builtins/norm32-5.c new file mode 100644 index 00000000000..33c927917f2 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/norm32-5.c @@ -0,0 +1,14 @@ +extern void abort (void); +extern void exit (int); + +int main () +{ + int a; + + a = __builtin_bfin_norm_fr1x32 (0); + if (a != 31) + abort (); + + exit (0); +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/norm32-6.c b/gcc/testsuite/gcc.target/bfin/builtins/norm32-6.c new file mode 100644 index 00000000000..2150c5a98b0 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/norm32-6.c @@ -0,0 +1,18 @@ +extern void abort (void); +extern void exit (int); + +typedef int fract32; + +int main () +{ + fract32 f = 0, g; + int a; + + a = __builtin_bfin_norm_fr1x32 (f); + g = f << a; + if (g != 0) + abort (); + + exit (0); +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/norm32-7.c b/gcc/testsuite/gcc.target/bfin/builtins/norm32-7.c new file mode 100644 index 00000000000..87f4579f1ea --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/norm32-7.c @@ -0,0 +1,14 @@ +extern void abort (void); +extern void exit (int); + +int main () +{ + int a; + + a = __builtin_bfin_norm_fr1x32 (0xffffffff); + if (a != 31) + abort (); + + exit (0); +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/norm32-8.c b/gcc/testsuite/gcc.target/bfin/builtins/norm32-8.c new file mode 100644 index 00000000000..4918a06a011 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/norm32-8.c @@ -0,0 +1,18 @@ +extern void abort (void); +extern void exit (int); + +typedef int fract32; + +int main () +{ + fract32 f = 0xffffffff, g; + int a; + + a = __builtin_bfin_norm_fr1x32 (f); + g = f << a; + if (g != 0x80000000) + abort (); + + exit (0); +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/norm32-9.c b/gcc/testsuite/gcc.target/bfin/builtins/norm32-9.c new file mode 100644 index 00000000000..08468ac3d3d --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/norm32-9.c @@ -0,0 +1,14 @@ +extern void abort (void); +extern void exit (int); + +int main () +{ + int a; + + a = __builtin_bfin_norm_fr1x32 (0x1234); + if (a != 18) + abort (); + + exit (0); +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/norm_fr1x16-1.c b/gcc/testsuite/gcc.target/bfin/builtins/norm_fr1x16-1.c new file mode 100644 index 00000000000..ad80cd4c1c3 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/norm_fr1x16-1.c @@ -0,0 +1,15 @@ +extern void abort (void); + +typedef short fract16; + +int main () +{ + int m; + + m = __builtin_bfin_norm_fr1x16 (0x1000); + if (m != 2) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/norm_fr1x16-2.c b/gcc/testsuite/gcc.target/bfin/builtins/norm_fr1x16-2.c new file mode 100644 index 00000000000..59e868daa83 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/norm_fr1x16-2.c @@ -0,0 +1,15 @@ +extern void abort (void); + +typedef short fract16; + +int main () +{ + int m; + + m = __builtin_bfin_norm_fr1x16 (0x4000); + if (m != 0) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/norm_fr1x16-3.c b/gcc/testsuite/gcc.target/bfin/builtins/norm_fr1x16-3.c new file mode 100644 index 00000000000..c769240b038 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/norm_fr1x16-3.c @@ -0,0 +1,15 @@ +extern void abort (void); + +typedef short fract16; + +int main () +{ + int m; + + m = __builtin_bfin_norm_fr1x16 (0xe000); + if (m != 2) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/norm_fr1x32-1.c b/gcc/testsuite/gcc.target/bfin/builtins/norm_fr1x32-1.c new file mode 100644 index 00000000000..fe476f58f40 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/norm_fr1x32-1.c @@ -0,0 +1,13 @@ +extern void abort (void); + +int main () +{ + int m; + + m = __builtin_bfin_norm_fr1x32 (0xefffeff1); + if (m != 2) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/norm_fr1x32-2.c b/gcc/testsuite/gcc.target/bfin/builtins/norm_fr1x32-2.c new file mode 100644 index 00000000000..7cf1ebecaa9 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/norm_fr1x32-2.c @@ -0,0 +1,13 @@ +extern void abort (void); + +int main () +{ + int m; + + m = __builtin_bfin_norm_fr1x32 (0x0000eff1); + if (m != 15) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x16-1.c b/gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x16-1.c new file mode 100644 index 00000000000..f234bc9bf5e --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x16-1.c @@ -0,0 +1,15 @@ +extern void abort (void); + +typedef short fract16; + +int main () +{ + fract16 t1; + + t1 = __builtin_bfin_shl_fr1x16 (0x1101, 4); + if (t1 != 0x7fff) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x16-2.c b/gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x16-2.c new file mode 100644 index 00000000000..95e3bfb0c32 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x16-2.c @@ -0,0 +1,15 @@ +extern void abort (void); + +typedef short fract16; + +int main () +{ + fract16 t1; + + t1 = __builtin_bfin_shl_fr1x16 (0x4004, -4); + if (t1 != 0x0400) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x16-3.c b/gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x16-3.c new file mode 100644 index 00000000000..1c77a7c01b2 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x16-3.c @@ -0,0 +1,15 @@ +extern void abort (void); + +typedef short fract16; + +int main () +{ + fract16 t1; + + t1 = __builtin_bfin_shl_fr1x16 (0xc101, 4); + if (t1 != 0xffff8000) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x16-4.c b/gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x16-4.c new file mode 100644 index 00000000000..7cb9e8c6873 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x16-4.c @@ -0,0 +1,15 @@ +extern void abort (void); + +typedef short fract16; + +int main () +{ + fract16 t1; + + t1 = __builtin_bfin_shl_fr1x16 (0xd004, -4); + if (t1 != 0xfffffd00) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x16-5.c b/gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x16-5.c new file mode 100644 index 00000000000..251ff1e18df --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x16-5.c @@ -0,0 +1,20 @@ +extern void abort (void); + +typedef short fract16; + +fract16 foo (fract16 f, short n) +{ + return __builtin_bfin_shl_fr1x16 (f, n); +} + +int main () +{ + fract16 t1; + + t1 = foo (0x1101, 4); + if (t1 != 0x7fff) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x16-6.c b/gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x16-6.c new file mode 100644 index 00000000000..8d50f209107 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x16-6.c @@ -0,0 +1,20 @@ +extern void abort (void); + +typedef short fract16; + +fract16 foo (fract16 f, short n) +{ + return __builtin_bfin_shl_fr1x16 (f, n); +} + +int main () +{ + fract16 t1; + + t1 = foo (0x4004, -4); + if (t1 != 0x0400) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x16-7.c b/gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x16-7.c new file mode 100644 index 00000000000..f78303a1807 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x16-7.c @@ -0,0 +1,20 @@ +extern void abort (void); + +typedef short fract16; + +fract16 foo (fract16 f, short n) +{ + return __builtin_bfin_shl_fr1x16 (f, n); +} + +int main () +{ + fract16 t1; + + t1 = foo (0xc101, 4); + if (t1 != 0xffff8000) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x16-8.c b/gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x16-8.c new file mode 100644 index 00000000000..cea723f3383 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x16-8.c @@ -0,0 +1,20 @@ +extern void abort (void); + +typedef short fract16; + +fract16 foo (fract16 f, short n) +{ + return __builtin_bfin_shl_fr1x16 (f, n); +} + +int main () +{ + fract16 t1; + + t1 = foo (0xd004, -4); + if (t1 != 0xfffffd00) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x32-1.c b/gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x32-1.c new file mode 100644 index 00000000000..c85adfe565b --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x32-1.c @@ -0,0 +1,15 @@ +extern void abort (void); + +typedef long fract32; + +int main () +{ + fract32 t; + + t = __builtin_bfin_shl_fr1x32 (0x7feff4ff, 4); + if (t != 0x7fffffff) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x32-2.c b/gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x32-2.c new file mode 100644 index 00000000000..0a42ddc76fa --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x32-2.c @@ -0,0 +1,15 @@ +extern void abort (void); + +typedef long fract32; + +int main () +{ + fract32 t; + + t = __builtin_bfin_shl_fr1x32 (0x7feff4ff, -4); + if (t != 0x7feff4f) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x32-3.c b/gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x32-3.c new file mode 100644 index 00000000000..a98bc0c98a4 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x32-3.c @@ -0,0 +1,15 @@ +extern void abort (void); + +typedef long fract32; + +int main () +{ + fract32 t; + + t = __builtin_bfin_shl_fr1x32 (0xc000e4ff, 4); + if (t != 0x80000000) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x32-4.c b/gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x32-4.c new file mode 100644 index 00000000000..f2d18b37033 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x32-4.c @@ -0,0 +1,15 @@ +extern void abort (void); + +typedef long fract32; + +int main () +{ + fract32 t; + + t = __builtin_bfin_shl_fr1x32 (0xc000e4ff, -4); + if (t != 0xfc000e4f) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x32-5.c b/gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x32-5.c new file mode 100644 index 00000000000..2883c187541 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x32-5.c @@ -0,0 +1,20 @@ +extern void abort (void); + +typedef long fract32; + +fract32 foo (fract32 f, short n) +{ + return __builtin_bfin_shl_fr1x32 (f, n); +} + +int main () +{ + fract32 t; + + t = foo (0x7feff4ff, 4); + if (t != 0x7fffffff) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x32-6.c b/gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x32-6.c new file mode 100644 index 00000000000..94a4cde1dbb --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x32-6.c @@ -0,0 +1,20 @@ +extern void abort (void); + +typedef long fract32; + +fract32 foo (fract32 f, short n) +{ + return __builtin_bfin_shl_fr1x32 (f, n); +} + +int main () +{ + fract32 t; + + t = foo (0x7feff4ff, -4); + if (t != 0x7feff4f) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x32-7.c b/gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x32-7.c new file mode 100644 index 00000000000..f32423500c7 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x32-7.c @@ -0,0 +1,20 @@ +extern void abort (void); + +typedef long fract32; + +fract32 foo (fract32 f, short n) +{ + return __builtin_bfin_shl_fr1x32 (f, n); +} + +int main () +{ + fract32 t; + + t = foo (0xc000e4ff, 4); + if (t != 0x80000000) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x32-8.c b/gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x32-8.c new file mode 100644 index 00000000000..9300650857c --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x32-8.c @@ -0,0 +1,20 @@ +extern void abort (void); + +typedef long fract32; + +fract32 foo (fract32 f, short n) +{ + return __builtin_bfin_shl_fr1x32 (f, n); +} + +int main () +{ + fract32 t; + + t = foo (0xc000e4ff, -4); + if (t != 0xfc000e4f) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x32-9.c b/gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x32-9.c new file mode 100644 index 00000000000..f24a266cc7c --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x32-9.c @@ -0,0 +1,19 @@ +extern void abort (void); + +typedef long fract32; + +fract32 foo (fract32 f, short n) +{ + return __builtin_bfin_shl_fr1x32 (f, n); +} + +int main () +{ + fract32 f; + + f = foo (0x12345678, 4); + if (f != 0x7fffffff) + abort (); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x32.c b/gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x32.c new file mode 100644 index 00000000000..029378ad812 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/shl_fr1x32.c @@ -0,0 +1,16 @@ +/* { dg-do run } */ + +typedef int fract32; + +extern void abort (void); + +int main () +{ + fract32 f; + + f = __builtin_bfin_shl_fr1x32 (0x12345678, 4); + if (f != 0x7fffffff) + abort (); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/bfin/builtins/shl_fr2x16-1.c b/gcc/testsuite/gcc.target/bfin/builtins/shl_fr2x16-1.c new file mode 100644 index 00000000000..53ca96047c6 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/shl_fr2x16-1.c @@ -0,0 +1,22 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +int main () +{ + fract2x16 a, t; + fract16 t1, t2; + + a = __builtin_bfin_compose_2x16 (0xcfff, 0xffff); + + t = __builtin_bfin_shl_fr2x16 (a, 4); + t1 = __builtin_bfin_extract_hi (t); + t2 = __builtin_bfin_extract_lo (t); + if (t1 != 0xffff8000 || t2 != 0xfffffff0) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/shl_fr2x16-2.c b/gcc/testsuite/gcc.target/bfin/builtins/shl_fr2x16-2.c new file mode 100644 index 00000000000..9e24db38b7d --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/shl_fr2x16-2.c @@ -0,0 +1,22 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +int main () +{ + fract2x16 a, t; + fract16 t1, t2; + + a = __builtin_bfin_compose_2x16 (0xcfff, 0xffff); + + t = __builtin_bfin_shl_fr2x16 (a, -4); + t1 = __builtin_bfin_extract_hi (t); + t2 = __builtin_bfin_extract_lo (t); + if (t1 != 0xfffffcff || t2 != 0xffffffff) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/shl_fr2x16-3.c b/gcc/testsuite/gcc.target/bfin/builtins/shl_fr2x16-3.c new file mode 100644 index 00000000000..6d91625d833 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/shl_fr2x16-3.c @@ -0,0 +1,22 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +int main () +{ + fract2x16 a, t; + fract16 t1, t2; + + a = __builtin_bfin_compose_2x16 (0x1001, 0x0001); + + t = __builtin_bfin_shl_fr2x16 (a, 4); + t1 = __builtin_bfin_extract_hi (t); + t2 = __builtin_bfin_extract_lo (t); + if (t1 != 0x7fff || t2 != 0x10) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/shl_fr2x16-4.c b/gcc/testsuite/gcc.target/bfin/builtins/shl_fr2x16-4.c new file mode 100644 index 00000000000..9b12e847a47 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/shl_fr2x16-4.c @@ -0,0 +1,22 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +int main () +{ + fract2x16 a, t; + fract16 t1, t2; + + a = __builtin_bfin_compose_2x16 (0x1001, 0x0001); + + t = __builtin_bfin_shl_fr2x16 (a, -4); + t1 = __builtin_bfin_extract_hi (t); + t2 = __builtin_bfin_extract_lo (t); + if (t1 != 0x100 || t2 != 0x0) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/shl_fr2x16-5.c b/gcc/testsuite/gcc.target/bfin/builtins/shl_fr2x16-5.c new file mode 100644 index 00000000000..af9ac3f1588 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/shl_fr2x16-5.c @@ -0,0 +1,27 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +fract2x16 foo (fract2x16 f, short n) +{ + return __builtin_bfin_shl_fr2x16 (f, n); +} + +int main () +{ + fract2x16 a, t; + fract16 t1, t2; + + a = __builtin_bfin_compose_2x16 (0xcfff, 0xffff); + + t = foo (a, 4); + t1 = __builtin_bfin_extract_hi (t); + t2 = __builtin_bfin_extract_lo (t); + if (t1 != 0xffff8000 || t2 != 0xfffffff0) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/shl_fr2x16-6.c b/gcc/testsuite/gcc.target/bfin/builtins/shl_fr2x16-6.c new file mode 100644 index 00000000000..cc080867866 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/shl_fr2x16-6.c @@ -0,0 +1,27 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +fract2x16 foo (fract2x16 f, short n) +{ + return __builtin_bfin_shl_fr2x16 (f, n); +} + +int main () +{ + fract2x16 a, t; + fract16 t1, t2; + + a = __builtin_bfin_compose_2x16 (0xcfff, 0xffff); + + t = foo (a, -4); + t1 = __builtin_bfin_extract_hi (t); + t2 = __builtin_bfin_extract_lo (t); + if (t1 != 0xfffffcff || t2 != 0xffffffff) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/shl_fr2x16-7.c b/gcc/testsuite/gcc.target/bfin/builtins/shl_fr2x16-7.c new file mode 100644 index 00000000000..dd235c891ff --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/shl_fr2x16-7.c @@ -0,0 +1,27 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +fract2x16 foo (fract2x16 f, short n) +{ + return __builtin_bfin_shl_fr2x16 (f, n); +} + +int main () +{ + fract2x16 a, t; + fract16 t1, t2; + + a = __builtin_bfin_compose_2x16 (0x1001, 0x0001); + + t = foo (a, 4); + t1 = __builtin_bfin_extract_hi (t); + t2 = __builtin_bfin_extract_lo (t); + if (t1 != 0x7fff || t2 != 0x10) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/shl_fr2x16-8.c b/gcc/testsuite/gcc.target/bfin/builtins/shl_fr2x16-8.c new file mode 100644 index 00000000000..ed90541a4b5 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/shl_fr2x16-8.c @@ -0,0 +1,27 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +fract2x16 foo (fract2x16 f, short n) +{ + return __builtin_bfin_shl_fr2x16 (f, n); +} + +int main () +{ + fract2x16 a, t; + fract16 t1, t2; + + a = __builtin_bfin_compose_2x16 (0x1001, 0x0001); + + t = foo (a, -4); + t1 = __builtin_bfin_extract_hi (t); + t2 = __builtin_bfin_extract_lo (t); + if (t1 != 0x100 || t2 != 0x0) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x16-1.c b/gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x16-1.c new file mode 100644 index 00000000000..5a9df3de258 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x16-1.c @@ -0,0 +1,15 @@ +extern void abort (void); + +typedef short fract16; + +int main () +{ + fract16 t1; + + t1 = __builtin_bfin_shr_fr1x16 (0x1101, -4); + if (t1 != 0x7fff) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x16-2.c b/gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x16-2.c new file mode 100644 index 00000000000..39dd3a999ad --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x16-2.c @@ -0,0 +1,15 @@ +extern void abort (void); + +typedef short fract16; + +int main () +{ + fract16 t1; + + t1 = __builtin_bfin_shr_fr1x16 (0x4004, 4); + if (t1 != 0x0400) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x16-3.c b/gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x16-3.c new file mode 100644 index 00000000000..fff331f6e6d --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x16-3.c @@ -0,0 +1,20 @@ +extern void abort (void); + +typedef short fract16; + +fract16 foo (fract16 f, short n) +{ + return __builtin_bfin_shr_fr1x16 (f, n); +} + +int main () +{ + fract16 t1; + + t1 = foo (0x1101, -4); + if (t1 != 0x7fff) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x16-4.c b/gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x16-4.c new file mode 100644 index 00000000000..8425b7a834c --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x16-4.c @@ -0,0 +1,20 @@ +extern void abort (void); + +typedef short fract16; + +fract16 foo (fract16 f, short n) +{ + return __builtin_bfin_shr_fr1x16 (f, n); +} + +int main () +{ + fract16 t1; + + t1 = foo (0x4004, 4); + if (t1 != 0x0400) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x32-1.c b/gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x32-1.c new file mode 100644 index 00000000000..3a5e12fd60f --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x32-1.c @@ -0,0 +1,15 @@ +extern void abort (void); + +typedef long fract32; + +int main () +{ + fract32 t; + + t = __builtin_bfin_shr_fr1x32 (0x7feff4ff, -4); + if (t != 0x7fffffff) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x32-2.c b/gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x32-2.c new file mode 100644 index 00000000000..6f73462cf6d --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x32-2.c @@ -0,0 +1,15 @@ +extern void abort (void); + +typedef long fract32; + +int main () +{ + fract32 t; + + t = __builtin_bfin_shr_fr1x32 (0x7feff4ff, 4); + if (t != 0x7feff4f) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x32-3.c b/gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x32-3.c new file mode 100644 index 00000000000..664516365d0 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x32-3.c @@ -0,0 +1,15 @@ +extern void abort (void); + +typedef long fract32; + +int main () +{ + fract32 t; + + t = __builtin_bfin_shr_fr1x32 (0xc000e4ff, -4); + if (t != 0x80000000) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x32-4.c b/gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x32-4.c new file mode 100644 index 00000000000..56ffe17c592 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x32-4.c @@ -0,0 +1,15 @@ +extern void abort (void); + +typedef long fract32; + +int main () +{ + fract32 t; + + t = __builtin_bfin_shr_fr1x32 (0xc000e4ff, 4); + if (t != 0xfc000e4f) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x32-5.c b/gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x32-5.c new file mode 100644 index 00000000000..6dbb7f2e2b3 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x32-5.c @@ -0,0 +1,20 @@ +extern void abort (void); + +typedef long fract32; + +fract32 foo (fract32 f, short n) +{ + return __builtin_bfin_shr_fr1x32 (f, n); +} + +int main () +{ + fract32 t; + + t = foo (0x7feff4ff, -4); + if (t != 0x7fffffff) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x32-6.c b/gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x32-6.c new file mode 100644 index 00000000000..ef8915474ff --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x32-6.c @@ -0,0 +1,20 @@ +extern void abort (void); + +typedef long fract32; + +fract32 foo (fract32 f, short n) +{ + return __builtin_bfin_shr_fr1x32 (f, n); +} + +int main () +{ + fract32 t; + + t = foo (0x7feff4ff, 4); + if (t != 0x7feff4f) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x32-7.c b/gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x32-7.c new file mode 100644 index 00000000000..720546a71f3 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x32-7.c @@ -0,0 +1,20 @@ +extern void abort (void); + +typedef long fract32; + +fract32 foo (fract32 f, short n) +{ + return __builtin_bfin_shr_fr1x32 (f, n); +} + +int main () +{ + fract32 t; + + t = foo (0xc000e4ff, -4); + if (t != 0x80000000) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x32-8.c b/gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x32-8.c new file mode 100644 index 00000000000..9422f790b5a --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x32-8.c @@ -0,0 +1,20 @@ +extern void abort (void); + +typedef long fract32; + +fract32 foo (fract32 f, short n) +{ + return __builtin_bfin_shr_fr1x32 (f, n); +} + +int main () +{ + fract32 t; + + t = foo (0xc000e4ff, 4); + if (t != 0xfc000e4f) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x32-9.c b/gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x32-9.c new file mode 100644 index 00000000000..caf17203dd5 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x32-9.c @@ -0,0 +1,19 @@ +extern void abort (void); + +typedef long fract32; + +fract32 foo (fract32 f, short n) +{ + return __builtin_bfin_shr_fr1x32 (f, n); +} + +int main () +{ + fract32 f; + + f = foo (0x87654321, 4); + if (f != 0xf8765432) + abort (); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x32.c b/gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x32.c new file mode 100644 index 00000000000..8be9ecfd117 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/shr_fr1x32.c @@ -0,0 +1,16 @@ +/* { dg-do run } */ + +typedef int fract32; + +extern void abort (void); + +int main () +{ + fract32 f; + + f = __builtin_bfin_shr_fr1x32 (0x87654321, 4); + if (f != 0xf8765432) + abort (); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/bfin/builtins/shr_fr2x16-1.c b/gcc/testsuite/gcc.target/bfin/builtins/shr_fr2x16-1.c new file mode 100644 index 00000000000..6e936954728 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/shr_fr2x16-1.c @@ -0,0 +1,22 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +int main () +{ + fract2x16 a, t; + fract16 t1, t2; + + a = __builtin_bfin_compose_2x16 (0xcfff, 0xffff); + + t = __builtin_bfin_shr_fr2x16 (a, -4); + t1 = __builtin_bfin_extract_hi (t); + t2 = __builtin_bfin_extract_lo (t); + if (t1 != 0xffff8000 || t2 != 0xfffffff0) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/shr_fr2x16-2.c b/gcc/testsuite/gcc.target/bfin/builtins/shr_fr2x16-2.c new file mode 100644 index 00000000000..1c83d29149c --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/shr_fr2x16-2.c @@ -0,0 +1,22 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +int main () +{ + fract2x16 a, t; + fract16 t1, t2; + + a = __builtin_bfin_compose_2x16 (0xcfff, 0xffff); + + t = __builtin_bfin_shr_fr2x16 (a, 4); + t1 = __builtin_bfin_extract_hi (t); + t2 = __builtin_bfin_extract_lo (t); + if (t1 != 0xfffffcff || t2 != 0xffffffff) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/shr_fr2x16-3.c b/gcc/testsuite/gcc.target/bfin/builtins/shr_fr2x16-3.c new file mode 100644 index 00000000000..5b6af8b4b4b --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/shr_fr2x16-3.c @@ -0,0 +1,27 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +fract2x16 foo (fract2x16 f, short n) +{ + return __builtin_bfin_shr_fr2x16 (f, n); +} + +int main () +{ + fract2x16 a, t; + fract16 t1, t2; + + a = __builtin_bfin_compose_2x16 (0xcfff, 0xffff); + + t = foo (a, -4); + t1 = __builtin_bfin_extract_hi (t); + t2 = __builtin_bfin_extract_lo (t); + if (t1 != 0xffff8000 || t2 != 0xfffffff0) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/shr_fr2x16-4.c b/gcc/testsuite/gcc.target/bfin/builtins/shr_fr2x16-4.c new file mode 100644 index 00000000000..63bbb8bc765 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/shr_fr2x16-4.c @@ -0,0 +1,27 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +fract2x16 foo (fract2x16 f, short n) +{ + return __builtin_bfin_shr_fr2x16 (f, n); +} + +int main () +{ + fract2x16 a, t; + fract16 t1, t2; + + a = __builtin_bfin_compose_2x16 (0xcfff, 0xffff); + + t = foo (a, 4); + t1 = __builtin_bfin_extract_hi (t); + t2 = __builtin_bfin_extract_lo (t); + if (t1 != 0xfffffcff || t2 != 0xffffffff) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/shrl_fr1x16-1.c b/gcc/testsuite/gcc.target/bfin/builtins/shrl_fr1x16-1.c new file mode 100644 index 00000000000..0de251ee2be --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/shrl_fr1x16-1.c @@ -0,0 +1,15 @@ +extern void abort (void); + +typedef short fract16; + +int main () +{ + fract16 t1; + + t1 = __builtin_bfin_shrl_fr1x16 (0x8101, 4); + if (t1 != 0x0810) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/shrl_fr1x16-2.c b/gcc/testsuite/gcc.target/bfin/builtins/shrl_fr1x16-2.c new file mode 100644 index 00000000000..c6b88b6d361 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/shrl_fr1x16-2.c @@ -0,0 +1,15 @@ +extern void abort (void); + +typedef short fract16; + +int main () +{ + fract16 t1; + + t1 = __builtin_bfin_shrl_fr1x16 (0x4004, -4); + if (t1 != 0x0040) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/shrl_fr1x16-3.c b/gcc/testsuite/gcc.target/bfin/builtins/shrl_fr1x16-3.c new file mode 100644 index 00000000000..0f8e168f687 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/shrl_fr1x16-3.c @@ -0,0 +1,20 @@ +extern void abort (void); + +typedef short fract16; + +fract16 foo (fract16 f, short n) +{ + return __builtin_bfin_shrl_fr1x16 (f, n); +} + +int main () +{ + fract16 t1; + + t1 = foo (0x8101, 4); + if (t1 != 0x0810) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/shrl_fr1x16-4.c b/gcc/testsuite/gcc.target/bfin/builtins/shrl_fr1x16-4.c new file mode 100644 index 00000000000..d266ce09535 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/shrl_fr1x16-4.c @@ -0,0 +1,20 @@ +extern void abort (void); + +typedef short fract16; + +fract16 foo (fract16 f, short n) +{ + return __builtin_bfin_shrl_fr1x16 (f, n); +} + +int main () +{ + fract16 t1; + + t1 = foo (0x4004, -4); + if (t1 != 0x0040) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/shrl_fr2x16-1.c b/gcc/testsuite/gcc.target/bfin/builtins/shrl_fr2x16-1.c new file mode 100644 index 00000000000..1252b4d7553 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/shrl_fr2x16-1.c @@ -0,0 +1,22 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +int main () +{ + fract2x16 a, t; + fract16 t1, t2; + + a = __builtin_bfin_compose_2x16 (0xcfff, 0xffff); + + t = __builtin_bfin_shrl_fr2x16 (a, -4); + t1 = __builtin_bfin_extract_hi (t); + t2 = __builtin_bfin_extract_lo (t); + if (t1 != 0xfffffff0 || t2 != 0xfffffff0) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/shrl_fr2x16-2.c b/gcc/testsuite/gcc.target/bfin/builtins/shrl_fr2x16-2.c new file mode 100644 index 00000000000..b4bec6e6db2 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/shrl_fr2x16-2.c @@ -0,0 +1,22 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +int main () +{ + fract2x16 a, t; + fract16 t1, t2; + + a = __builtin_bfin_compose_2x16 (0xcfff, 0xffff); + + t = __builtin_bfin_shrl_fr2x16 (a, 4); + t1 = __builtin_bfin_extract_hi (t); + t2 = __builtin_bfin_extract_lo (t); + if (t1 != 0x0cff || t2 != 0x0fff) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/shrl_fr2x16-3.c b/gcc/testsuite/gcc.target/bfin/builtins/shrl_fr2x16-3.c new file mode 100644 index 00000000000..4036dbf53e7 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/shrl_fr2x16-3.c @@ -0,0 +1,27 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +fract2x16 foo (fract2x16 f, short n) +{ + return __builtin_bfin_shrl_fr2x16 (f, n); +} + +int main () +{ + fract2x16 a, t; + fract16 t1, t2; + + a = __builtin_bfin_compose_2x16 (0xcfff, 0xffff); + + t = foo (a, -4); + t1 = __builtin_bfin_extract_hi (t); + t2 = __builtin_bfin_extract_lo (t); + if (t1 != 0xfffffff0 || t2 != 0xfffffff0) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/shrl_fr2x16-4.c b/gcc/testsuite/gcc.target/bfin/builtins/shrl_fr2x16-4.c new file mode 100644 index 00000000000..b6473fa4d50 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/shrl_fr2x16-4.c @@ -0,0 +1,27 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +fract2x16 foo (fract2x16 f, short n) +{ + return __builtin_bfin_shrl_fr2x16 (f, n); +} + +int main () +{ + fract2x16 a, t; + fract16 t1, t2; + + a = __builtin_bfin_compose_2x16 (0xcfff, 0xffff); + + t = foo (a, 4); + t1 = __builtin_bfin_extract_hi (t); + t2 = __builtin_bfin_extract_lo (t); + if (t1 != 0x0cff || t2 != 0x0fff) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/sub_fr1x16-1.c b/gcc/testsuite/gcc.target/bfin/builtins/sub_fr1x16-1.c new file mode 100644 index 00000000000..b97bf8d6334 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/sub_fr1x16-1.c @@ -0,0 +1,14 @@ +extern void abort (void); + +typedef short fract16; + +int main () +{ + fract16 t1; + + t1 = __builtin_bfin_sub_fr1x16 (0x3000, 0x2000); + if (t1 != 0x1000) + abort (); + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/sub_fr1x16-2.c b/gcc/testsuite/gcc.target/bfin/builtins/sub_fr1x16-2.c new file mode 100644 index 00000000000..5e456803417 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/sub_fr1x16-2.c @@ -0,0 +1,14 @@ +extern void abort (void); + +typedef short fract16; + +int main () +{ + fract16 t1; + + t1 = __builtin_bfin_sub_fr1x16 (0x3000, 0x4000); + if (t1 != -0x1000) + abort (); + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/sub_fr1x32-1.c b/gcc/testsuite/gcc.target/bfin/builtins/sub_fr1x32-1.c new file mode 100644 index 00000000000..5aedd9199b3 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/sub_fr1x32-1.c @@ -0,0 +1,15 @@ +extern void abort (void); + +typedef long fract32; + +int main () +{ + fract32 t1; + + t1 = __builtin_bfin_sub_fr1x32 (0x40003000, 0xc0003000); + if (t1 != 0x7fffffff) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/sub_fr1x32-2.c b/gcc/testsuite/gcc.target/bfin/builtins/sub_fr1x32-2.c new file mode 100644 index 00000000000..8ac4a5aade6 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/sub_fr1x32-2.c @@ -0,0 +1,15 @@ +extern void abort (void); + +typedef long fract32; + +int main () +{ + fract32 t; + + t = __builtin_bfin_sub_fr1x32 (0x40003000, 0x70002000); + if (t != 0xd0001000) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/sub_fr2x16-1.c b/gcc/testsuite/gcc.target/bfin/builtins/sub_fr2x16-1.c new file mode 100644 index 00000000000..34b8ac87d2a --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/sub_fr2x16-1.c @@ -0,0 +1,23 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +int main () +{ + fract2x16 a, b, t; + fract16 t1, t2; + + a = __builtin_bfin_compose_2x16 (0x4000, 0x2000); + b = __builtin_bfin_compose_2x16 (0x8000, 0x5000); + + t = __builtin_bfin_sub_fr2x16 (a, b); + t1 = __builtin_bfin_extract_hi (t); + t2 = __builtin_bfin_extract_lo (t); + if (t1 != 0x7fff || t2 != -0x3000) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/sub_fr2x16-2.c b/gcc/testsuite/gcc.target/bfin/builtins/sub_fr2x16-2.c new file mode 100644 index 00000000000..52f7d8052c6 --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/sub_fr2x16-2.c @@ -0,0 +1,23 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +int main () +{ + fract2x16 a, b, t; + fract16 t1, t2; + + a = __builtin_bfin_compose_2x16 (0x7000, 0xc000); + b = __builtin_bfin_compose_2x16 (0xc000, 0xd000); + + t = __builtin_bfin_sub_fr2x16 (a, b); + t1 = __builtin_bfin_extract_hi (t); + t2 = __builtin_bfin_extract_lo (t); + if (t1 != 0x7fff || t2 != -0x1000) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/sum_fr2x16-1.c b/gcc/testsuite/gcc.target/bfin/builtins/sum_fr2x16-1.c new file mode 100644 index 00000000000..56c4f191eac --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/sum_fr2x16-1.c @@ -0,0 +1,20 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +int main () +{ + fract2x16 a; + fract16 t; + + a = __builtin_bfin_compose_2x16 (0x5fff, 0xffff); + + t = __builtin_bfin_sum_fr2x16 (a); + if (t != 0x5ffe) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/builtins/sum_fr2x16-2.c b/gcc/testsuite/gcc.target/bfin/builtins/sum_fr2x16-2.c new file mode 100644 index 00000000000..2f75bfdfc5e --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/builtins/sum_fr2x16-2.c @@ -0,0 +1,20 @@ +extern void abort (void); + +typedef short __v2hi __attribute ((vector_size(4))); +typedef __v2hi fract2x16; +typedef short fract16; + +int main () +{ + fract2x16 a; + fract16 t; + + a = __builtin_bfin_compose_2x16 (0x1001, 0x0001); + + t = __builtin_bfin_sum_fr2x16 (a); + if (t != 0x1002) + abort (); + + return 0; +} + diff --git a/gcc/testsuite/gcc.target/bfin/hisilh-O0.c b/gcc/testsuite/gcc.target/bfin/hisilh-O0.c deleted file mode 100644 index 50786b8be67..00000000000 --- a/gcc/testsuite/gcc.target/bfin/hisilh-O0.c +++ /dev/null @@ -1,46 +0,0 @@ -/* { dg-do run { target bfin*-*-* } } */ -/* { dg-options "-O0" } */ -#include -typedef short raw2x16 __attribute__ ((vector_size(4))); - -int x; - -int ll(raw2x16 a, raw2x16 b) -{ - x = __builtin_bfin_mulhisill(a, b); - return x; -} - -int lh(raw2x16 a, raw2x16 b) -{ - x = __builtin_bfin_mulhisilh(a, b); - return x; -} - -int hl(raw2x16 a, raw2x16 b) -{ - x = __builtin_bfin_mulhisihl(a, b); - return x; -} - -int hh(raw2x16 a, raw2x16 b) -{ - x = __builtin_bfin_mulhisihh(a, b); - return x; -} - -int main () -{ - raw2x16 a = __builtin_bfin_compose_2x16 (0x1234, 0x5678); - raw2x16 b = __builtin_bfin_compose_2x16 (0xFEDC, 0xBA98); - if (ll (a, b) != 0xe88e8740) - abort (); - if (lh (a, b) != 0xff9d5f20) - abort (); - if (hl (a, b) != 0xfb1096e0) - abort (); - if (hh (a, b) != 0xffeb3cb0) - abort (); - - return 0; -} -- 2.30.2