OSDN Git Service

Add new tests for xstormy16
authornickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 8 Dec 2004 11:15:24 +0000 (11:15 +0000)
committernickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 8 Dec 2004 11:15:24 +0000 (11:15 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91870 138bc75d-0d04-0410-961f-82ee72b054a4

208 files changed:
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/xstormy16/below100.S [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/below100.ld [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/below_100.c
gcc/testsuite/gcc.target/xstormy16/bp.c
gcc/testsuite/gcc.target/xstormy16/bss_below100/01_const_to_b100b.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/02_const_to_b100w.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/03_var_to_b100b.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/04_var_to_b100w.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/05_b100b_to_var.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/06_b100w_to_var.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/10_set_b100b_bit_0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/10_set_b100b_bit_7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/11_clr_b100b_bit_0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/11_clr_b100b_bit_7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/12_if1_b100b_bit_0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/12_if1_b100b_bit_3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/12_if1_b100b_bit_7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/13_if0_b100b_bit_0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/13_if0_b100b_bit_3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/13_if0_b100b_bit_7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/14_set_b100w_bit_0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/14_set_b100w_bit_7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/14_set_b100w_bit_8.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/14_set_b100w_bit_f.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/15_clr_b100w_bit_0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/15_clr_b100w_bit_7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/15_clr_b100w_bit_8.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/15_clr_b100w_bit_f.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/16_if1_b100w_bit_0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/16_if1_b100w_bit_3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/16_if1_b100w_bit_7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/16_if1_b100w_bit_8.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/16_if1_b100w_bit_b.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/16_if1_b100w_bit_f.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/17_if0_b100w_bit_0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/17_if0_b100w_bit_3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/17_if0_b100w_bit_7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/17_if0_b100w_bit_8.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/17_if0_b100w_bit_b.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/17_if0_b100w_bit_f.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/20_set_b100b_bitfield_0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/20_set_b100b_bitfield_7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/21_clr_b100b_bitfield_0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/21_clr_b100b_bitfield_7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/22_if1_b100b_bitfield_0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/22_if1_b100b_bitfield_3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/22_if1_b100b_bitfield_7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/23_if0_b100b_bitfield_0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/23_if0_b100b_bitfield_3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/23_if0_b100b_bitfield_7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/24_set_b100w_bitfield_0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/24_set_b100w_bitfield_7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/24_set_b100w_bitfield_8.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/24_set_b100w_bitfield_f.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/25_clr_b100w_bitfield_0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/25_clr_b100w_bitfield_7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/25_clr_b100w_bitfield_8.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/25_clr_b100w_bitfield_f.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/26_if1_b100w_bitfield_0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/26_if1_b100w_bitfield_3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/26_if1_b100w_bitfield_7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/26_if1_b100w_bitfield_8.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/26_if1_b100w_bitfield_b.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/26_if1_b100w_bitfield_f.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/27_if0_b100w_bitfield_0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/27_if0_b100w_bitfield_3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/27_if0_b100w_bitfield_7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/27_if0_b100w_bitfield_8.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/27_if0_b100w_bitfield_b.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/bss_below100/27_if0_b100w_bitfield_f.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/01_const_to_b100b.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/02_const_to_b100w.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/03_var_to_b100b.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/04_var_to_b100w.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/05_b100b_to_var.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/06_b100w_to_var.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/10_set_b100b_bit_0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/10_set_b100b_bit_7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/11_clr_b100b_bit_0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/11_clr_b100b_bit_7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/12_if1_b100b_bit_0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/12_if1_b100b_bit_3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/12_if1_b100b_bit_7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/13_if0_b100b_bit_0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/13_if0_b100b_bit_3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/13_if0_b100b_bit_7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/14_set_b100w_bit_0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/14_set_b100w_bit_7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/14_set_b100w_bit_8.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/14_set_b100w_bit_f.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/15_clr_b100w_bit_0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/15_clr_b100w_bit_7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/15_clr_b100w_bit_8.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/15_clr_b100w_bit_f.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/16_if1_b100w_bit_0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/16_if1_b100w_bit_3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/16_if1_b100w_bit_7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/16_if1_b100w_bit_8.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/16_if1_b100w_bit_b.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/16_if1_b100w_bit_f.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/17_if0_b100w_bit_0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/17_if0_b100w_bit_3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/17_if0_b100w_bit_7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/17_if0_b100w_bit_8.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/17_if0_b100w_bit_b.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/17_if0_b100w_bit_f.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/20_set_b100b_bitfield_0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/20_set_b100b_bitfield_7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/21_clr_b100b_bitfield_0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/21_clr_b100b_bitfield_7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/22_if1_b100b_bitfield_0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/22_if1_b100b_bitfield_3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/22_if1_b100b_bitfield_7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/23_if0_b100b_bitfield_0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/23_if0_b100b_bitfield_3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/23_if0_b100b_bitfield_7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/24_set_b100w_bitfield_0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/24_set_b100w_bitfield_7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/24_set_b100w_bitfield_8.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/24_set_b100w_bitfield_f.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/25_clr_b100w_bitfield_0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/25_clr_b100w_bitfield_7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/25_clr_b100w_bitfield_8.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/25_clr_b100w_bitfield_f.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/26_if1_b100w_bitfield_0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/26_if1_b100w_bitfield_3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/26_if1_b100w_bitfield_7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/26_if1_b100w_bitfield_8.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/26_if1_b100w_bitfield_b.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/26_if1_b100w_bitfield_f.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/27_if0_b100w_bitfield_0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/27_if0_b100w_bitfield_3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/27_if0_b100w_bitfield_7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/27_if0_b100w_bitfield_8.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/27_if0_b100w_bitfield_b.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/data_below100/27_if0_b100w_bitfield_f.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/01_const_to_sfrb.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/02_const_to_sfrw.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/03_var_to_sfrb.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/04_var_to_sfrw.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/05_sfrb_to_var.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/06_sfrw_to_var.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/10_set_sfrb_bit_0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/10_set_sfrb_bit_7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/11_clr_sfrb_bit_0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/11_clr_sfrb_bit_7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/12_if1_sfrb_bit_0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/12_if1_sfrb_bit_3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/12_if1_sfrb_bit_7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/13_if0_sfrb_bit_0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/13_if0_sfrb_bit_3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/13_if0_sfrb_bit_7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/14_set_sfrw_bit_0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/14_set_sfrw_bit_3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/14_set_sfrw_bit_7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/14_set_sfrw_bit_8.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/14_set_sfrw_bit_b.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/14_set_sfrw_bit_f.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/15_clr_sfrw_bit_0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/15_clr_sfrw_bit_3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/15_clr_sfrw_bit_7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/15_clr_sfrw_bit_8.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/15_clr_sfrw_bit_b.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/15_clr_sfrw_bit_f.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/16_if1_sfrw_bit_0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/16_if1_sfrw_bit_3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/16_if1_sfrw_bit_7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/16_if1_sfrw_bit_8.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/16_if1_sfrw_bit_b.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/16_if1_sfrw_bit_f.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/17_if0_sfrw_bit_0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/17_if0_sfrw_bit_3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/17_if0_sfrw_bit_7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/17_if0_sfrw_bit_8.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/17_if0_sfrw_bit_b.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/17_if0_sfrw_bit_f.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/20_set_sfrb_bitfield_0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/20_set_sfrb_bitfield_7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/21_clr_sfrb_bitfield_0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/21_clr_sfrb_bitfield_7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/22_if1_sfrb_bitfield_0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/22_if1_sfrb_bitfield_3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/22_if1_sfrb_bitfield_7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/23_if0_sfrb_bitfield_0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/23_if0_sfrb_bitfield_3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/23_if0_sfrb_bitfield_7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/24_set_sfrw_bitfield_0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/24_set_sfrw_bitfield_7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/24_set_sfrw_bitfield_8.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/24_set_sfrw_bitfield_f.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/25_clr_sfrw_bitfield_0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/25_clr_sfrw_bitfield_7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/25_clr_sfrw_bitfield_8.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/25_clr_sfrw_bitfield_f.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/26_if1_sfrw_bitfield_0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/26_if1_sfrw_bitfield_3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/26_if1_sfrw_bitfield_7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/26_if1_sfrw_bitfield_8.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/26_if1_sfrw_bitfield_b.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/26_if1_sfrw_bitfield_f.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/27_if0_sfrw_bitfield_0.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/27_if0_sfrw_bitfield_3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/27_if0_sfrw_bitfield_7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/27_if0_sfrw_bitfield_8.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/27_if0_sfrw_bitfield_b.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/sfr/27_if0_sfrw_bitfield_f.c [new file with mode: 0644]
gcc/testsuite/gcc.target/xstormy16/xstormy16.exp

index 468fb31..b832863 100644 (file)
@@ -1,3 +1,104 @@
+2004-12-08  Nick Clifton  <nickc@redhat.com>
+
+       * gcc.target/xstormy16/bss_below100: New directory containing tests.
+       * gcc.target/xstormy16/data_below100: Likewise.
+       * gcc.target/xstormy16/sfr: Likewise.
+       * gcc.target/xstormy16/below100.S: New test source file.
+       * gcc.target/xstormy16/below100.ld: New test linker script.
+       * gcc.target/xstormy16/xstormy16.exp: Run the new tests.
+       * gcc.target/xstormy16/below_100.c: Fix scan to allow for bn or
+       bp instructions.
+       * gcc.target/xstormy16/bp.c: Likewise.
+
+       * gcc.target/xstormy16/bss_below100: New files:
+       01_const_to_b100b.c, 02_const_to_b100w.c, 03_var_to_b100b.c,
+       04_var_to_b100w.c, 05_b100b_to_var.c, 06_b100w_to_var.c,
+       10_set_b100b_bit_0.c, 10_set_b100b_bit_7.c, 11_clr_b100b_bit_0.c,
+       11_clr_b100b_bit_7.c, 12_if1_b100b_bit_0.c, 12_if1_b100b_bit_3.c,
+       12_if1_b100b_bit_7.c, 13_if0_b100b_bit_0.c, 13_if0_b100b_bit_3.c,
+       13_if0_b100b_bit_7.c, 14_set_b100w_bit_0.c, 14_set_b100w_bit_7.c,
+       14_set_b100w_bit_8.c, 14_set_b100w_bit_f.c, 15_clr_b100w_bit_0.c,
+       15_clr_b100w_bit_7.c, 15_clr_b100w_bit_8.c, 15_clr_b100w_bit_f.c,
+       16_if1_b100w_bit_0.c, 16_if1_b100w_bit_3.c, 16_if1_b100w_bit_7.c,
+       16_if1_b100w_bit_8.c, 16_if1_b100w_bit_b.c, 16_if1_b100w_bit_f.c,
+       17_if0_b100w_bit_0.c, 17_if0_b100w_bit_3.c, 17_if0_b100w_bit_7.c,
+       17_if0_b100w_bit_8.c, 17_if0_b100w_bit_b.c, 17_if0_b100w_bit_f.c,
+       20_set_b100b_bitfield_0.c, 20_set_b100b_bitfield_7.c,
+       21_clr_b100b_bitfield_0.c, 21_clr_b100b_bitfield_7.c,
+       22_if1_b100b_bitfield_0.c, 22_if1_b100b_bitfield_3.c,
+       22_if1_b100b_bitfield_7.c, 23_if0_b100b_bitfield_0.c,
+       23_if0_b100b_bitfield_3.c, 23_if0_b100b_bitfield_7.c,
+       24_set_b100w_bitfield_0.c, 24_set_b100w_bitfield_7.c,
+       24_set_b100w_bitfield_8.c, 24_set_b100w_bitfield_f.c,
+       25_clr_b100w_bitfield_0.c, 25_clr_b100w_bitfield_7.c,
+       25_clr_b100w_bitfield_8.c, 25_clr_b100w_bitfield_f.c,
+       26_if1_b100w_bitfield_0.c, 26_if1_b100w_bitfield_3.c,
+       26_if1_b100w_bitfield_7.c, 26_if1_b100w_bitfield_8.c,
+       26_if1_b100w_bitfield_b.c, 26_if1_b100w_bitfield_f.c,
+       27_if0_b100w_bitfield_0.c, 27_if0_b100w_bitfield_3.c,
+       27_if0_b100w_bitfield_7.c, 27_if0_b100w_bitfield_8.c,
+       27_if0_b100w_bitfield_b.c, 27_if0_b100w_bitfield_f.c
+
+       * gcc.target/xstormy16/data_below100: New files:
+       01_const_to_b100b.c, 02_const_to_b100w.c, 03_var_to_b100b.c,
+       04_var_to_b100w.c, 05_b100b_to_var.c, 06_b100w_to_var.c,
+       10_set_b100b_bit_0.c, 10_set_b100b_bit_7.c, 11_clr_b100b_bit_0.c,
+       11_clr_b100b_bit_7.c, 12_if1_b100b_bit_0.c, 12_if1_b100b_bit_3.c,
+       12_if1_b100b_bit_7.c, 13_if0_b100b_bit_0.c, 13_if0_b100b_bit_3.c,
+       13_if0_b100b_bit_7.c, 14_set_b100w_bit_0.c, 14_set_b100w_bit_7.c,
+       14_set_b100w_bit_8.c, 14_set_b100w_bit_f.c, 15_clr_b100w_bit_0.c,
+       15_clr_b100w_bit_7.c, 15_clr_b100w_bit_8.c, 15_clr_b100w_bit_f.c,
+       16_if1_b100w_bit_0.c, 16_if1_b100w_bit_3.c, 16_if1_b100w_bit_7.c,
+       16_if1_b100w_bit_8.c, 16_if1_b100w_bit_b.c, 16_if1_b100w_bit_f.c,
+       17_if0_b100w_bit_0.c, 17_if0_b100w_bit_3.c, 17_if0_b100w_bit_7.c,
+       17_if0_b100w_bit_8.c, 17_if0_b100w_bit_b.c, 17_if0_b100w_bit_f.c,
+       20_set_b100b_bitfield_0.c, 20_set_b100b_bitfield_7.c,
+       21_clr_b100b_bitfield_0.c, 21_clr_b100b_bitfield_7.c,
+       22_if1_b100b_bitfield_0.c, 22_if1_b100b_bitfield_3.c,
+       22_if1_b100b_bitfield_7.c, 23_if0_b100b_bitfield_0.c,
+       23_if0_b100b_bitfield_3.c, 23_if0_b100b_bitfield_7.c,
+       24_set_b100w_bitfield_0.c, 24_set_b100w_bitfield_7.c,
+       24_set_b100w_bitfield_8.c, 24_set_b100w_bitfield_f.c,
+       25_clr_b100w_bitfield_0.c, 25_clr_b100w_bitfield_7.c,
+       25_clr_b100w_bitfield_8.c, 25_clr_b100w_bitfield_f.c,
+       26_if1_b100w_bitfield_0.c, 26_if1_b100w_bitfield_3.c,
+       26_if1_b100w_bitfield_7.c, 26_if1_b100w_bitfield_8.c,
+       26_if1_b100w_bitfield_b.c, 26_if1_b100w_bitfield_f.c,
+       27_if0_b100w_bitfield_0.c, 27_if0_b100w_bitfield_3.c,
+       27_if0_b100w_bitfield_7.c, 27_if0_b100w_bitfield_8.c,
+       27_if0_b100w_bitfield_b.c, 27_if0_b100w_bitfield_f.c
+
+       * gcc.target/xstormy16/sfr: New files:
+       01_const_to_sfrb.c, 02_const_to_sfrw.c, 03_var_to_sfrb.c,
+       04_var_to_sfrw.c, 05_sfrb_to_var.c, 06_sfrw_to_var.c,
+       10_set_sfrb_bit_0.c, 10_set_sfrb_bit_7.c, 11_clr_sfrb_bit_0.c,
+       11_clr_sfrb_bit_7.c, 12_if1_sfrb_bit_0.c, 12_if1_sfrb_bit_3.c,
+       12_if1_sfrb_bit_7.c, 13_if0_sfrb_bit_0.c, 13_if0_sfrb_bit_3.c,
+       13_if0_sfrb_bit_7.c, 14_set_sfrw_bit_0.c, 14_set_sfrw_bit_3.c,
+       14_set_sfrw_bit_7.c, 14_set_sfrw_bit_8.c, 14_set_sfrw_bit_b.c,
+       14_set_sfrw_bit_f.c, 15_clr_sfrw_bit_0.c, 15_clr_sfrw_bit_3.c,
+       15_clr_sfrw_bit_7.c, 15_clr_sfrw_bit_8.c, 15_clr_sfrw_bit_b.c,
+       15_clr_sfrw_bit_f.c, 16_if1_sfrw_bit_0.c, 16_if1_sfrw_bit_3.c,
+       16_if1_sfrw_bit_7.c, 16_if1_sfrw_bit_8.c, 16_if1_sfrw_bit_b.c,
+       16_if1_sfrw_bit_f.c, 17_if0_sfrw_bit_0.c, 17_if0_sfrw_bit_3.c,
+       17_if0_sfrw_bit_7.c, 17_if0_sfrw_bit_8.c, 17_if0_sfrw_bit_b.c,
+       17_if0_sfrw_bit_f.c, 20_set_sfrb_bitfield_0.c,
+       20_set_sfrb_bitfield_7.c, 21_clr_sfrb_bitfield_0.c,
+       21_clr_sfrb_bitfield_7.c, 22_if1_sfrb_bitfield_0.c,
+       22_if1_sfrb_bitfield_3.c, 22_if1_sfrb_bitfield_7.c,
+       23_if0_sfrb_bitfield_0.c, 23_if0_sfrb_bitfield_3.c,
+       23_if0_sfrb_bitfield_7.c, 24_set_sfrw_bitfield_0.c,
+       24_set_sfrw_bitfield_7.c, 24_set_sfrw_bitfield_8.c,
+       24_set_sfrw_bitfield_f.c, 25_clr_sfrw_bitfield_0.c,
+       25_clr_sfrw_bitfield_7.c, 25_clr_sfrw_bitfield_8.c,
+       25_clr_sfrw_bitfield_f.c, 26_if1_sfrw_bitfield_0.c,
+       26_if1_sfrw_bitfield_3.c, 26_if1_sfrw_bitfield_7.c,
+       26_if1_sfrw_bitfield_8.c, 26_if1_sfrw_bitfield_b.c,
+       26_if1_sfrw_bitfield_f.c, 27_if0_sfrw_bitfield_0.c,
+       27_if0_sfrw_bitfield_3.c, 27_if0_sfrw_bitfield_7.c,
+       27_if0_sfrw_bitfield_8.c, 27_if0_sfrw_bitfield_b.c,
+       27_if0_sfrw_bitfield_f.c
+
 2004-12-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
 
        PR c++/18100
diff --git a/gcc/testsuite/gcc.target/xstormy16/below100.S b/gcc/testsuite/gcc.target/xstormy16/below100.S
new file mode 100644 (file)
index 0000000..25f9bc8
--- /dev/null
@@ -0,0 +1,188 @@
+/******************************************************************\r
+***                                                             ***\r
+***     crt0 for __BELOW100__ attribute test with SID           ***\r
+***                                                             ***\r
+******************************************************************/\r
+\r
+                                /*************************************/\r
+                                /** Interrupt vectors at 0x8000     **/\r
+                                /*************************************/\r
+        .section .int_vec,"ax"\r
+        .global _start\r
+        .align 1\r
+_start:\r
+        jmpf _int_reset\r
+        //jmpf _int_basetimer\r
+        //jmpf _int_timer0\r
+        //jmpf _int_timer1\r
+        //jmpf _int_irq_4\r
+        //jmpf _int_irq_5\r
+        //jmpf _int_port0\r
+        //jmpf _int_port1\r
+        //jmpf _int_irq_8\r
+        //jmpf _int_irq_9\r
+        //jmpf _int_irq_a\r
+        //jmpf _int_irq_b\r
+        //jmpf _int_irq_c\r
+        //jmpf _int_irq_d\r
+        //jmpf _int_irq_e\r
+        //jmpf _int_irq_f\r
+                                /*************************************/\r
+                                /** reset code                      **/\r
+                                /*************************************/\r
+        .text\r
+_int_reset:\r
+                                /*************************************/\r
+                                /** setup stack pointer             **/\r
+                                /*************************************/\r
+        mov sp,#__stack\r
+                                /*************************************/\r
+                                /** zero .bss section               **/\r
+                                /*************************************/\r
+        mov r0,#__bss_start\r
+        mov r1,#__bss_end\r
+        mov r2,#0\r
+1:      mov.w (r0++),r2\r
+        blt r0,r1,1b\r
+                                /*************************************/\r
+                                /** copy inital value for .data     **/\r
+                                /*************************************/\r
+        mov r1,#__data_start\r
+        mov r3,#__data_end\r
+        mov r0,#@lo(__rdata)\r
+        mov r8,#@hi(__rdata)\r
+2:      movf.w r2,(r0++)\r
+        bnz r0,#0,3f\r
+        add r8,#1\r
+3:      mov.w (r1++),r2\r
+        blt r1,r3,2b\r
+                                /*************************************/\r
+                                /** call hardware init routine      **/\r
+                                /*************************************/\r
+        callf _hwinit\r
+                                /*************************************/\r
+                                /** call initializaton routines     **/\r
+                                /*************************************/\r
+        callf _init\r
+                                /*************************************/\r
+                                /** setup fini routines to be       **/\r
+                                /**  called from exit               **/\r
+                                /*************************************/\r
+        mov r2,#@fptr(_fini)\r
+        callf atexit\r
+                                /*************************************/\r
+                                /** call main() with empty          **/\r
+                                /**  argc/argv/envp                 **/\r
+                                /*************************************/\r
+        mov r2,#0\r
+        mov r3,#0\r
+        mov r4,#0\r
+        callf main\r
+                                /*************************************/\r
+                                /** return from main()              **/\r
+                                /*************************************/\r
+        callf exit\r
+                                /*************************************/\r
+                                /** should never reach this code    **/\r
+                                /*************************************/\r
+        jmpf _start\r
+                                /*************************************/\r
+                                /** default h/w initialize routine  **/\r
+                                /** and default _init/_finit for    **/\r
+                                /**  -nostartfiles option           **/\r
+                                /*************************************/\r
+        .globl _hwinit\r
+        .weak _hwinit\r
+_hwinit:\r
+        .globl _init\r
+        .weak _init\r
+_init:\r
+        .globl _fini\r
+        .weak _fini\r
+_fini:\r
+        ret\r
+\r
+/******************************************************************\r
+*******************************************************************\r
+***                                                             ***\r
+***       Chip information data for LC59_32K                    ***\r
+***                 Written by T.Matsukawa                      ***\r
+***                                                             ***\r
+*******************************************************************\r
+******************************************************************/\r
+\r
+                                /*************************************/\r
+                                /** Define convenient macros        **/\r
+                                /*************************************/\r
+#define BCD(x)  (((x)/10)%10)*0x10+((x)%10)\r
+#define BCD4(x) BCD((x)/100),BCD(x)\r
+#define BCD6(x) BCD((x)/10000),BCD((x)/100),BCD(x)\r
+                                /*************************************/\r
+                                /** Define memory sizes             **/\r
+                                /*************************************/\r
+#define RAM_SIZE 0x7E00\r
+#define ROM_SIZE 0x78000\r
+#define VRAM_SIZE 0x0000\r
+#define VRAM_ROW 0\r
+#define VRAM_COLUMN 0\r
+#define CGROM_SIZE 0x0000\r
+#define PROTECT_SIZE 0x0000\r
+\r
+                                /*************************************/\r
+                                /** section ".chip_info"            **/\r
+                                /*************************************/\r
+        .section .chip_info,"a"\r
+        .space  0xb8,0x00\r
+                                /*************************************/\r
+                                /** B8-BB : User option address     **/\r
+                                /*************************************/\r
+        .word   0x00000\r
+        .global __reset_vector\r
+#if 0x00000==0\r
+        .equ    __reset_vector,0x08000\r
+#else\r
+        .equ    __reset_vector,0x00000\r
+#endif\r
+                                /*************************************/\r
+                                /** BC-BF : Flash Protect address   **/\r
+                                /*************************************/\r
+#if PROTECT_SIZE==0\r
+        .word   0x00000000\r
+#else\r
+        .word   0x08000+ROM_SIZE-PROTECT_SIZE\r
+#endif\r
+                                /*************************************/\r
+                                /** C0-CF : Fixed string            **/\r
+                                /*************************************/\r
+        .ascii  "CHIPINFORMATION"\r
+1:      .space  (0xd0-1b),0x00\r
+                                /*************************************/\r
+                                /** D0-DF : Chipname                **/\r
+                                /*************************************/\r
+        .ascii  "LC59_32K"\r
+2:      .space  (0xe0-2b),0x00\r
+                                /*************************************/\r
+                                /** E0-E1 : Format version(BCD4)    **/\r
+                                /*************************************/\r
+        .byte   0x10, 0x00\r
+        .space  6, 0x00\r
+                                /*************************************/\r
+                                /** E8-F5 : Memory sizes            **/\r
+                                /*************************************/\r
+        .byte   BCD4(ROM_SIZE/1024)\r
+        .byte   BCD6(RAM_SIZE)\r
+        .byte   BCD6(VRAM_SIZE)\r
+        .byte   BCD4(VRAM_ROW)\r
+        .byte   BCD4(VRAM_COLUMN)\r
+        .byte   BCD4(CGROM_SIZE/1024)\r
+        .space  3, 0x00\r
+                                /*************************************/\r
+                                /** F9 : Package type               **/\r
+                                /*************************************/\r
+        .byte   0xff\r
+        .space  6, 0x00\r
+\r
+                                /*************************************/\r
+                                /** In order to link BIOS in library**/\r
+                                /*************************************/\r
+        .equ    dummy,__bios_entry\r
diff --git a/gcc/testsuite/gcc.target/xstormy16/below100.ld b/gcc/testsuite/gcc.target/xstormy16/below100.ld
new file mode 100644 (file)
index 0000000..91c3e43
--- /dev/null
@@ -0,0 +1,192 @@
+/******************************************************************
+*******************************************************************
+***                                                             ***
+***     Linker script for xstormy16-elf-gcc                     ***
+***           For SID   RAM=0x7E00                              ***
+***                     ROM=0x78000                             ***
+***                                                             ***
+*******************************************************************
+******************************************************************/
+
+OUTPUT_FORMAT("elf32-xstormy16", "elf32-xstormy16", "elf32-xstormy16")
+OUTPUT_ARCH(xstormy16)
+ENTRY(_start)
+SEARCH_DIR( . )
+GROUP(-lc -lsim -lgcc)
+PROVIDE( __target_package = 0xff);
+
+__malloc_start = 0x7E00;
+
+MEMORY
+{
+       RAM (w)    : ORIGIN = 0x00000, LENGTH = 0x07E00
+       CHIP (r)   : ORIGIN = 0x07f00, LENGTH = 0x00100
+       ROM (!w)   : ORIGIN = 0x08000, LENGTH = 0x78000
+}
+
+SECTIONS
+{
+       /* Zero initialized data with the below100 attribute.  */
+       .bss_below100 : {
+               SHORT(0)
+               __bss_start = .;
+               *(.bss_below100)
+               *(.bss_below100.*)
+               . = ALIGN(2);
+       } > RAM
+       
+       /* Non-zero initialized data with the below100 attribute.  */
+       .data_below100 : AT ( __rdata ) {
+               __data_start = . ;
+               *(.data_0)
+               *(.data_below100)
+               *(.data_below100.*)
+               . = ALIGN(2);
+       } > RAM = 0
+       
+        /* Normal non-zero initialized data.  */
+       .data : AT ( __rdata + SIZEOF(.data_below100) ) {
+               *(.data)
+               *(.data.*)
+               *(.gnu.linkonce.d.*)
+               SORT(CONSTRUCTORS)
+               . = ALIGN(2);
+               __data_end = . ;
+       } > RAM =0
+       
+        /* Normal zero initialized data.  */
+       .bss : AT (LOADADDR(.data) + SIZEOF(.data)) {
+               *(.dynbss)
+               *(.bss)
+               *(.bss.*)
+               *(.gnu.linkonce.b.*)
+               *(COMMON)
+               . = ALIGN(2);
+               __bss_end = .;
+       } > RAM
+       
+        /* The top of stack.  */
+       __stack = .;
+
+        /* Target chip info.  */
+       .chip_info : {
+               KEEP(*(.chip_info))
+       } > CHIP =0
+       
+        /* Reset and interrupt vectors at 8000.  */
+       .int_vec : {
+               KEEP(*(.int_vec))
+       } > ROM =0
+       
+        /* Read only data.  */
+       .rodata : {
+               *(.rodata)
+               *(.rodata.*)
+               *(.gnu.linkonce.r.*)
+       } > ROM =0
+       
+        /* C++ Construcrtors and destructors.  */
+       .ctors : {
+               KEEP (*crtbegin.o(.ctors))
+               KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors))
+               KEEP (*(SORT(.ctors.*)))
+               KEEP (*(.ctors))
+       } > ROM =0
+       
+       .dtors : {
+               KEEP (*crtbegin.o(.dtors))
+               KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors))
+               KEEP (*(SORT(.dtors.*)))
+               KEEP (*(.dtors))
+       } > ROM =0
+
+        /* Pointer lookup table.. */
+       .plt : {
+               *(.plt)
+       } > ROM =0
+
+        /* Other information.  */
+       .jcr : {
+               KEEP (*(.jcr))
+       } > ROM =0
+       
+       .eh_frame : {
+               KEEP (*(.eh_frame))
+       } > ROM =0
+
+       .gcc_except_table : {
+               KEEP (*(.gcc_except_table))
+       } > ROM =0
+
+        /* Initialization values for data.  */
+       .data_init (NOLOAD) : {
+               __rdata = .;
+               . += SIZEOF(.data_below100);
+               . += SIZEOF(.data);
+               . += SIZEOF(.bss);
+       } > ROM
+
+        /* Executable code.  */
+       .text : {
+               *(.text)
+               *(.text.*)
+               *(.stub)
+               *(.gnu.warning)
+               *(.gnu.linkonce.t.*)
+       } > ROM =0
+
+        /* Startup/finish code.  */
+       .init : {
+               KEEP (*crti.o(.init))
+               KEEP (*(EXCLUDE_FILE (*crtn.o ) .init))
+               KEEP (*(SORT(.init.*)))
+               KEEP (*(.init))
+       } > ROM =0
+       
+       .fini : {
+               KEEP (*crti.o(.fini))
+               KEEP (*(EXCLUDE_FILE (*crtn.o ) .fini))
+               KEEP (*(SORT(.fini.*)))
+               KEEP (*(.fini))
+       } > ROM =0
+
+        /* Stab debugging sections.  */
+       .stab          0 : { *(.stab) }
+       .stabstr       0 : { *(.stabstr) }
+       .stab.excl     0 : { *(.stab.excl) }
+       .stab.exclstr  0 : { *(.stab.exclstr) }
+       .stab.index    0 : { *(.stab.index) }
+       .stab.indexstr 0 : { *(.stab.indexstr) }
+       .comment       0 : { *(.comment) }
+
+        /* DWARF debug sections.  */   
+       /* Symbols in the DWARF debugging sections are relative to
+          the beginning of the section so we begin them at 0.  */
+
+       /* DWARF 1.  */
+       .debug 0 : { *(.debug) }
+       .line 0 : { *(.line) }
+
+       /* GNU DWARF 1 extensions.  */
+       .debug_srcinfo 0 : { *(.debug_srcinfo) }
+       .debug_sfnames 0 : { *(.debug_sfnames) }
+
+       /* DWARF 1.1 and DWARF 2.  */
+       .debug_aranges  0 : { *(.debug_aranges) }
+       .debug_pubnames 0 : { *(.debug_pubnames) }
+
+       /* DWARF 2.  */
+       .debug_info     0 : { *(.debug_info) *(.gnu.linkonce.wi.*) }
+       .debug_abbrev   0 : { *(.debug_abbrev) }
+       .debug_line     0 : { *(.debug_line) }
+       .debug_frame    0 : { *(.debug_frame) }
+       .debug_str      0 : { *(.debug_str) }
+       .debug_loc      0 : { *(.debug_loc) }
+       .debug_macinfo  0 : { *(.debug_macinfo) }
+
+        /* SGI/MIPS DWARF 2 extensions.  */
+       .debug_weaknames 0 : { *(.debug_weaknames) }
+       .debug_funcnames 0 : { *(.debug_funcnames) }
+       .debug_typenames 0 : { *(.debug_typenames) }
+       .debug_varnames  0 : { *(.debug_varnames) }
+}
index dfa7e3b..9433f2a 100644 (file)
@@ -1,7 +1,7 @@
 /* { dg-do compile } */
 /* { dg-options "-O2" } */
 /* { dg-final { scan-assembler "bn " } } */
-/* { dg-final { scan-assembler "bp " } } */
+/* { dg-final { scan-assembler "b\[np\] " } } */
 
 unsigned short   a_below __attribute__((__BELOW100__));
 unsigned short   b_below __attribute__((__BELOW100__));
index 5cab932..26ca6a3 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2" } */
-/* { dg-final { scan-assembler "bp " } } */
+/* { dg-final { scan-assembler "b\[np\] " } } */
 
 #define a_val (*((volatile unsigned char *) 0x7f14))
 #define b_val (*((volatile unsigned char *) 0x7f10))
@@ -30,5 +30,3 @@ bar (void)
 
   return foo ();
 }
-
-
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/01_const_to_b100b.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/01_const_to_b100b.c
new file mode 100644 (file)
index 0000000..2b4438c
--- /dev/null
@@ -0,0 +1,20 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "mov.b B100,#18" } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned char B100 __attribute__ ((__BELOW100__));
+unsigned char *p = &B100;
+
+void
+Do (void)
+{
+  B100 = 0x12;
+}
+
+int
+main (void)
+{
+  *p = 0x34;
+  Do ();
+  return (*p == 0x12) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/02_const_to_b100w.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/02_const_to_b100w.c
new file mode 100644 (file)
index 0000000..d011ffd
--- /dev/null
@@ -0,0 +1,20 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "mov.w B100,#4660" } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned short B100 __attribute__ ((__BELOW100__));
+unsigned short *p = &B100;
+
+void
+Do (void)
+{
+  B100 = 0x1234;
+}
+
+int
+main (void)
+{
+  *p = 0x9876;
+  Do ();
+  return (*p == 0x1234) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/03_var_to_b100b.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/03_var_to_b100b.c
new file mode 100644 (file)
index 0000000..bcc9911
--- /dev/null
@@ -0,0 +1,22 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "mov.b B100,r" } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned char B100 __attribute__ ((__BELOW100__));
+unsigned char *p = &B100;
+
+unsigned char yData = 0x12;
+
+void
+Do (void)
+{
+  B100 = yData;
+}
+
+int
+main (void)
+{
+  *p = 0x34;
+  Do ();
+  return (*p == 0x12) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/04_var_to_b100w.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/04_var_to_b100w.c
new file mode 100644 (file)
index 0000000..ab47488
--- /dev/null
@@ -0,0 +1,22 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "mov.w B100,r" } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned short B100 __attribute__ ((__BELOW100__));
+unsigned short *p = &B100;
+
+unsigned short wData = 0x1234;
+
+void
+Do (void)
+{
+  B100 = wData;
+}
+
+int
+main (void)
+{
+  *p = 0x9876;
+  Do ();
+  return (*p == 0x1234) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/05_b100b_to_var.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/05_b100b_to_var.c
new file mode 100644 (file)
index 0000000..e5f57e8
--- /dev/null
@@ -0,0 +1,22 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "mov.b r., *B100" } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned char B100 __attribute__ ((__BELOW100__));
+unsigned char *p = &B100;
+
+unsigned char yData = 0x12;
+
+void
+Do (void)
+{
+  yData = B100;
+}
+
+int
+main (void)
+{
+  *p = 0x34;
+  Do ();
+  return (yData == 0x34) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/06_b100w_to_var.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/06_b100w_to_var.c
new file mode 100644 (file)
index 0000000..b19d9bc
--- /dev/null
@@ -0,0 +1,22 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "mov.w r.,B100" } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned short B100 __attribute__ ((__BELOW100__));
+unsigned short *p = &B100;
+
+unsigned short wData = 0x1234;
+
+void
+Do (void)
+{
+  wData = B100;
+}
+
+int
+main (void)
+{
+  *p = 0x3456;
+  Do ();
+  return (wData == 0x3456) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/10_set_b100b_bit_0.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/10_set_b100b_bit_0.c
new file mode 100644 (file)
index 0000000..f0965f1
--- /dev/null
@@ -0,0 +1,20 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "set1 B100,#0" } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned char B100 __attribute__ ((__BELOW100__));
+unsigned char *p = &B100;
+
+void
+Do (void)
+{
+  B100 |= 0x01;
+}
+
+int
+main (void)
+{
+  *p = 0x34;
+  Do ();
+  return (*p == 0x35) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/10_set_b100b_bit_7.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/10_set_b100b_bit_7.c
new file mode 100644 (file)
index 0000000..8b14c43
--- /dev/null
@@ -0,0 +1,20 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "set1 B100,#7" } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned char B100 __attribute__ ((__BELOW100__));
+unsigned char *p = &B100;
+
+void
+Do (void)
+{
+  B100 |= 0x80;
+}
+
+int
+main (void)
+{
+  *p = 0x34;
+  Do ();
+  return (*p == 0xb4) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/11_clr_b100b_bit_0.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/11_clr_b100b_bit_0.c
new file mode 100644 (file)
index 0000000..79c265a
--- /dev/null
@@ -0,0 +1,20 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "clr1 B100,#0" } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned char B100 __attribute__ ((__BELOW100__));
+unsigned char *p = &B100;
+
+void
+Do (void)
+{
+  B100 &= ~0x01;
+}
+
+int
+main (void)
+{
+  *p = 0xcb;
+  Do ();
+  return (*p == 0xca) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/11_clr_b100b_bit_7.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/11_clr_b100b_bit_7.c
new file mode 100644 (file)
index 0000000..d40e68f
--- /dev/null
@@ -0,0 +1,20 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "clr1 B100,#7" } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned char B100 __attribute__ ((__BELOW100__));
+unsigned char *p = &B100;
+
+void
+Do (void)
+{
+  B100 &= ~0x80;
+}
+
+int
+main (void)
+{
+  *p = 0xcb;
+  Do ();
+  return (*p == 0x4b) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/12_if1_b100b_bit_0.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/12_if1_b100b_bit_0.c
new file mode 100644 (file)
index 0000000..26b3711
--- /dev/null
@@ -0,0 +1,31 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A,#0," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B,#0," } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned char B100A __attribute__ ((__BELOW100__));
+unsigned char *pA = &B100A;
+unsigned char B100B __attribute__ ((__BELOW100__));
+unsigned char *pB = &B100B;
+
+char *
+Do (void)
+{
+  if (B100A & 0x01)
+    {
+      if (B100B & 0x01)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0xcb;
+  *pB = 0x34;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/12_if1_b100b_bit_3.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/12_if1_b100b_bit_3.c
new file mode 100644 (file)
index 0000000..865ec54
--- /dev/null
@@ -0,0 +1,31 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A,#3," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B,#3," } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned char B100A __attribute__ ((__BELOW100__));
+unsigned char *pA = &B100A;
+unsigned char B100B __attribute__ ((__BELOW100__));
+unsigned char *pB = &B100B;
+
+char *
+Do (void)
+{
+  if (B100A & 0x08)
+    {
+      if (B100B & 0x08)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0xcb;
+  *pB = 0x34;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/12_if1_b100b_bit_7.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/12_if1_b100b_bit_7.c
new file mode 100644 (file)
index 0000000..efbe124
--- /dev/null
@@ -0,0 +1,31 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A,#7," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B,#7," } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned char B100A __attribute__ ((__BELOW100__));
+unsigned char *pA = &B100A;
+unsigned char B100B __attribute__ ((__BELOW100__));
+unsigned char *pB = &B100B;
+
+char *
+Do (void)
+{
+  if (B100A & 0x80)
+    {
+      if (B100B & 0x80)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0xcb;
+  *pB = 0x34;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/13_if0_b100b_bit_0.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/13_if0_b100b_bit_0.c
new file mode 100644 (file)
index 0000000..8187395
--- /dev/null
@@ -0,0 +1,31 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A,#0," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B,#0," } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned char B100A __attribute__ ((__BELOW100__));
+unsigned char *pA = &B100A;
+unsigned char B100B __attribute__ ((__BELOW100__));
+unsigned char *pB = &B100B;
+
+char *
+Do (void)
+{
+  if (!(B100A & 0x01))
+    {
+      if (!(B100B & 0x01))
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0x34;
+  *pB = 0xcb;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/13_if0_b100b_bit_3.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/13_if0_b100b_bit_3.c
new file mode 100644 (file)
index 0000000..3fc566a
--- /dev/null
@@ -0,0 +1,31 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A,#3," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B,#3," } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned char B100A __attribute__ ((__BELOW100__));
+unsigned char *pA = &B100A;
+unsigned char B100B __attribute__ ((__BELOW100__));
+unsigned char *pB = &B100B;
+
+char *
+Do (void)
+{
+  if (!(B100A & 0x08))
+    {
+      if (!(B100B & 0x08))
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0x34;
+  *pB = 0xcb;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/13_if0_b100b_bit_7.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/13_if0_b100b_bit_7.c
new file mode 100644 (file)
index 0000000..bc90eaf
--- /dev/null
@@ -0,0 +1,31 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A,#7," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B,#7," } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned char B100A __attribute__ ((__BELOW100__));
+unsigned char *pA = &B100A;
+unsigned char B100B __attribute__ ((__BELOW100__));
+unsigned char *pB = &B100B;
+
+char *
+Do (void)
+{
+  if (!(B100A & 0x80))
+    {
+      if (!(B100B & 0x80))
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0x34;
+  *pB = 0xcb;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/14_set_b100w_bit_0.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/14_set_b100w_bit_0.c
new file mode 100644 (file)
index 0000000..9164d05
--- /dev/null
@@ -0,0 +1,20 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "set1 B100,#0" } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned short B100 __attribute__ ((__BELOW100__));
+unsigned short *p = &B100;
+
+void
+Do (void)
+{
+  B100 |= 0x0001;
+}
+
+int
+main (void)
+{
+  *p = 0x1234;
+  Do ();
+  return (*p == 0x1235) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/14_set_b100w_bit_7.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/14_set_b100w_bit_7.c
new file mode 100644 (file)
index 0000000..848c324
--- /dev/null
@@ -0,0 +1,20 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "set1 B100,#7" } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned short B100 __attribute__ ((__BELOW100__));
+unsigned short *p = &B100;
+
+void
+Do (void)
+{
+  B100 |= 0x0080;
+}
+
+int
+main (void)
+{
+  *p = 0x1234;
+  Do ();
+  return (*p == 0x12b4) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/14_set_b100w_bit_8.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/14_set_b100w_bit_8.c
new file mode 100644 (file)
index 0000000..f843d12
--- /dev/null
@@ -0,0 +1,20 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "set1 B100\\+1,#0" } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned short B100 __attribute__ ((__BELOW100__));
+unsigned short *p = &B100;
+
+void
+Do (void)
+{
+  B100 |= 0x0100;
+}
+
+int
+main (void)
+{
+  *p = 0x1234;
+  Do ();
+  return (*p == 0x1334) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/14_set_b100w_bit_f.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/14_set_b100w_bit_f.c
new file mode 100644 (file)
index 0000000..bba6dc9
--- /dev/null
@@ -0,0 +1,20 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "set1 B100\\+1,#7" } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned short B100 __attribute__ ((__BELOW100__));
+unsigned short *p = &B100;
+
+void
+Do (void)
+{
+  B100 |= 0x8000;
+}
+
+int
+main (void)
+{
+  *p = 0x1234;
+  Do ();
+  return (*p == 0x9234) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/15_clr_b100w_bit_0.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/15_clr_b100w_bit_0.c
new file mode 100644 (file)
index 0000000..634f2fc
--- /dev/null
@@ -0,0 +1,20 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "clr1 B100,#0" } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned short B100 __attribute__ ((__BELOW100__));
+unsigned short *p = &B100;
+
+void
+Do (void)
+{
+  B100 &= ~0x0001;
+}
+
+int
+main (void)
+{
+  *p = 0xedcb;
+  Do ();
+  return (*p == 0xedca) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/15_clr_b100w_bit_7.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/15_clr_b100w_bit_7.c
new file mode 100644 (file)
index 0000000..4b7d1bd
--- /dev/null
@@ -0,0 +1,20 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "clr1 B100,#7" } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned short B100 __attribute__ ((__BELOW100__));
+unsigned short *p = &B100;
+
+void
+Do (void)
+{
+  B100 &= ~0x0080;
+}
+
+int
+main (void)
+{
+  *p = 0xedcb;
+  Do ();
+  return (*p == 0xed4b) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/15_clr_b100w_bit_8.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/15_clr_b100w_bit_8.c
new file mode 100644 (file)
index 0000000..1c5d4c4
--- /dev/null
@@ -0,0 +1,20 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "clr1 B100\\+1,#0" } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned short B100 __attribute__ ((__BELOW100__));
+unsigned short *p = &B100;
+
+void
+Do (void)
+{
+  B100 &= ~0x0100;
+}
+
+int
+main (void)
+{
+  *p = 0xedcb;
+  Do ();
+  return (*p == 0xeccb) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/15_clr_b100w_bit_f.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/15_clr_b100w_bit_f.c
new file mode 100644 (file)
index 0000000..5140c6c
--- /dev/null
@@ -0,0 +1,20 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "clr1 B100\\+1,#7" } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned short B100 __attribute__ ((__BELOW100__));
+unsigned short *p = &B100;
+
+void
+Do (void)
+{
+  B100 &= ~0x8000;
+}
+
+int
+main (void)
+{
+  *p = 0xedcb;
+  Do ();
+  return (*p == 0x6dcb) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/16_if1_b100w_bit_0.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/16_if1_b100w_bit_0.c
new file mode 100644 (file)
index 0000000..fb6a1ba
--- /dev/null
@@ -0,0 +1,31 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A,#0," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B,#0," } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned short B100A __attribute__ ((__BELOW100__));
+unsigned short *pA = &B100A;
+unsigned short B100B __attribute__ ((__BELOW100__));
+unsigned short *pB = &B100B;
+
+char *
+Do (void)
+{
+  if (B100A & 0x0001)
+    {
+      if (B100B & 0x0001)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0xedcb;
+  *pB = 0x1234;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/16_if1_b100w_bit_3.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/16_if1_b100w_bit_3.c
new file mode 100644 (file)
index 0000000..c624629
--- /dev/null
@@ -0,0 +1,31 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A,#3," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B,#3," } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned short B100A __attribute__ ((__BELOW100__));
+unsigned short *pA = &B100A;
+unsigned short B100B __attribute__ ((__BELOW100__));
+unsigned short *pB = &B100B;
+
+char *
+Do (void)
+{
+  if (B100A & 0x0008)
+    {
+      if (B100B & 0x0008)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0xedcb;
+  *pB = 0x1234;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/16_if1_b100w_bit_7.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/16_if1_b100w_bit_7.c
new file mode 100644 (file)
index 0000000..d1c3fbf
--- /dev/null
@@ -0,0 +1,31 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A,#7," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B,#7," } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned short B100A __attribute__ ((__BELOW100__));
+unsigned short *pA = &B100A;
+unsigned short B100B __attribute__ ((__BELOW100__));
+unsigned short *pB = &B100B;
+
+char *
+Do (void)
+{
+  if (B100A & 0x0080)
+    {
+      if (B100B & 0x0080)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0xedcb;
+  *pB = 0x1234;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/16_if1_b100w_bit_8.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/16_if1_b100w_bit_8.c
new file mode 100644 (file)
index 0000000..b104542
--- /dev/null
@@ -0,0 +1,31 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A\\+1,#0," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B\\+1,#0," } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned short B100A __attribute__ ((__BELOW100__));
+unsigned short *pA = &B100A;
+unsigned short B100B __attribute__ ((__BELOW100__));
+unsigned short *pB = &B100B;
+
+char *
+Do (void)
+{
+  if (B100A & 0x0100)
+    {
+      if (B100B & 0x0100)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0xedcb;
+  *pB = 0x1234;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/16_if1_b100w_bit_b.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/16_if1_b100w_bit_b.c
new file mode 100644 (file)
index 0000000..8fbded1
--- /dev/null
@@ -0,0 +1,31 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A\\+1,#3," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B\\+1,#3," } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned short B100A __attribute__ ((__BELOW100__));
+unsigned short *pA = &B100A;
+unsigned short B100B __attribute__ ((__BELOW100__));
+unsigned short *pB = &B100B;
+
+char *
+Do (void)
+{
+  if (B100A & 0x0800)
+    {
+      if (B100B & 0x0800)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0xedcb;
+  *pB = 0x1234;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/16_if1_b100w_bit_f.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/16_if1_b100w_bit_f.c
new file mode 100644 (file)
index 0000000..ae97d96
--- /dev/null
@@ -0,0 +1,31 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A\\+1,#7," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B\\+1,#7," } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned short B100A __attribute__ ((__BELOW100__));
+unsigned short *pA = &B100A;
+unsigned short B100B __attribute__ ((__BELOW100__));
+unsigned short *pB = &B100B;
+
+char *
+Do (void)
+{
+  if (B100A & 0x8000)
+    {
+      if (B100B & 0x8000)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0xedcb;
+  *pB = 0x1234;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/17_if0_b100w_bit_0.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/17_if0_b100w_bit_0.c
new file mode 100644 (file)
index 0000000..07c6e94
--- /dev/null
@@ -0,0 +1,31 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A,#0," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B,#0," } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned short B100A __attribute__ ((__BELOW100__));
+unsigned short *pA = &B100A;
+unsigned short B100B __attribute__ ((__BELOW100__));
+unsigned short *pB = &B100B;
+
+char *
+Do (void)
+{
+  if (!(B100A & 0x0001))
+    {
+      if (!(B100B & 0x0001))
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0x1234;
+  *pB = 0xedcb;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/17_if0_b100w_bit_3.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/17_if0_b100w_bit_3.c
new file mode 100644 (file)
index 0000000..f2dd3fb
--- /dev/null
@@ -0,0 +1,31 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A,#3," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B,#3," } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned short B100A __attribute__ ((__BELOW100__));
+unsigned short *pA = &B100A;
+unsigned short B100B __attribute__ ((__BELOW100__));
+unsigned short *pB = &B100B;
+
+char *
+Do (void)
+{
+  if (!(B100A & 0x0008))
+    {
+      if (!(B100B & 0x0008))
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0x1234;
+  *pB = 0xedcb;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/17_if0_b100w_bit_7.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/17_if0_b100w_bit_7.c
new file mode 100644 (file)
index 0000000..af6eb6e
--- /dev/null
@@ -0,0 +1,31 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A,#7," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B,#7," } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned short B100A __attribute__ ((__BELOW100__));
+unsigned short *pA = &B100A;
+unsigned short B100B __attribute__ ((__BELOW100__));
+unsigned short *pB = &B100B;
+
+char *
+Do (void)
+{
+  if (!(B100A & 0x0080))
+    {
+      if (!(B100B & 0x0080))
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0x1234;
+  *pB = 0xedcb;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/17_if0_b100w_bit_8.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/17_if0_b100w_bit_8.c
new file mode 100644 (file)
index 0000000..d50f8f8
--- /dev/null
@@ -0,0 +1,31 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A\\+1,#0," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B\\+1,#0," } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned short B100A __attribute__ ((__BELOW100__));
+unsigned short *pA = &B100A;
+unsigned short B100B __attribute__ ((__BELOW100__));
+unsigned short *pB = &B100B;
+
+char *
+Do (void)
+{
+  if (!(B100A & 0x0100))
+    {
+      if (!(B100B & 0x0100))
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0x1234;
+  *pB = 0xedcb;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/17_if0_b100w_bit_b.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/17_if0_b100w_bit_b.c
new file mode 100644 (file)
index 0000000..28d5a39
--- /dev/null
@@ -0,0 +1,31 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A\\+1,#3," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B\\+1,#3," } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned short B100A __attribute__ ((__BELOW100__));
+unsigned short *pA = &B100A;
+unsigned short B100B __attribute__ ((__BELOW100__));
+unsigned short *pB = &B100B;
+
+char *
+Do (void)
+{
+  if (!(B100A & 0x0800))
+    {
+      if (!(B100B & 0x0800))
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0x1234;
+  *pB = 0xedcb;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/17_if0_b100w_bit_f.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/17_if0_b100w_bit_f.c
new file mode 100644 (file)
index 0000000..6a3f702
--- /dev/null
@@ -0,0 +1,31 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A\\+1,#7," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B\\+1,#7," } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned short B100A __attribute__ ((__BELOW100__));
+unsigned short *pA = &B100A;
+unsigned short B100B __attribute__ ((__BELOW100__));
+unsigned short *pB = &B100B;
+
+char *
+Do (void)
+{
+  if (!(B100A & 0x8000))
+    {
+      if (!(B100B & 0x8000))
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0x1234;
+  *pB = 0xedcb;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/20_set_b100b_bitfield_0.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/20_set_b100b_bitfield_0.c
new file mode 100644 (file)
index 0000000..240e472
--- /dev/null
@@ -0,0 +1,32 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "set1 B100,#0" } } */
+
+typedef struct
+{
+  unsigned char b0:1;
+  unsigned char b1:1;
+  unsigned char b2:1;
+  unsigned char b3:1;
+  unsigned char b4:1;
+  unsigned char b5:1;
+  unsigned char b6:1;
+  unsigned char b7:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100 __attribute__ ((__BELOW100__));
+unsigned char *p = (unsigned char *) &B100;
+
+void
+Do (void)
+{
+  B100.b0 = 1;
+}
+
+int
+main (void)
+{
+  *p = 0x34;
+  Do ();
+  return (*p == 0x35) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/20_set_b100b_bitfield_7.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/20_set_b100b_bitfield_7.c
new file mode 100644 (file)
index 0000000..674e51a
--- /dev/null
@@ -0,0 +1,32 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "set1 B100,#7" } } */
+
+typedef struct
+{
+  unsigned char b0:1;
+  unsigned char b1:1;
+  unsigned char b2:1;
+  unsigned char b3:1;
+  unsigned char b4:1;
+  unsigned char b5:1;
+  unsigned char b6:1;
+  unsigned char b7:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100 __attribute__ ((__BELOW100__));
+unsigned char *p = (unsigned char *) &B100;
+
+void
+Do (void)
+{
+  B100.b7 = 1;
+}
+
+int
+main (void)
+{
+  *p = 0x34;
+  Do ();
+  return (*p == 0xb4) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/21_clr_b100b_bitfield_0.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/21_clr_b100b_bitfield_0.c
new file mode 100644 (file)
index 0000000..3846a96
--- /dev/null
@@ -0,0 +1,32 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "clr1 B100,#0" } } */
+
+typedef struct
+{
+  unsigned char b0:1;
+  unsigned char b1:1;
+  unsigned char b2:1;
+  unsigned char b3:1;
+  unsigned char b4:1;
+  unsigned char b5:1;
+  unsigned char b6:1;
+  unsigned char b7:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100 __attribute__ ((__BELOW100__));
+unsigned char *p = (unsigned char *) &B100;
+
+void
+Do (void)
+{
+  B100.b0 = 0;
+}
+
+int
+main (void)
+{
+  *p = 0xcb;
+  Do ();
+  return (*p == 0xca) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/21_clr_b100b_bitfield_7.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/21_clr_b100b_bitfield_7.c
new file mode 100644 (file)
index 0000000..1017457
--- /dev/null
@@ -0,0 +1,32 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "clr1 B100,#7" } } */
+
+typedef struct
+{
+  unsigned char b0:1;
+  unsigned char b1:1;
+  unsigned char b2:1;
+  unsigned char b3:1;
+  unsigned char b4:1;
+  unsigned char b5:1;
+  unsigned char b6:1;
+  unsigned char b7:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100 __attribute__ ((__BELOW100__));
+unsigned char *p = (unsigned char *) &B100;
+
+void
+Do (void)
+{
+  B100.b7 = 0;
+}
+
+int
+main (void)
+{
+  *p = 0xcb;
+  Do ();
+  return (*p == 0x4b) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/22_if1_b100b_bitfield_0.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/22_if1_b100b_bitfield_0.c
new file mode 100644 (file)
index 0000000..9c41357
--- /dev/null
@@ -0,0 +1,43 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A,#0," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B,#0," } } */
+
+typedef struct
+{
+  unsigned char b0:1;
+  unsigned char b1:1;
+  unsigned char b2:1;
+  unsigned char b3:1;
+  unsigned char b4:1;
+  unsigned char b5:1;
+  unsigned char b6:1;
+  unsigned char b7:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100A __attribute__ ((__BELOW100__));
+unsigned char *pA = (unsigned char *) &B100A;
+BitField B100B __attribute__ ((__BELOW100__));
+unsigned char *pB = (unsigned char *) &B100B;
+
+char *
+Do (void)
+{
+  if (B100A.b0)
+    {
+      if (B100B.b0)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0xcb;
+  *pB = 0x34;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/22_if1_b100b_bitfield_3.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/22_if1_b100b_bitfield_3.c
new file mode 100644 (file)
index 0000000..86f0f22
--- /dev/null
@@ -0,0 +1,43 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A,#3," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B,#3," } } */
+
+typedef struct
+{
+  unsigned char b0:1;
+  unsigned char b1:1;
+  unsigned char b2:1;
+  unsigned char b3:1;
+  unsigned char b4:1;
+  unsigned char b5:1;
+  unsigned char b6:1;
+  unsigned char b7:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100A __attribute__ ((__BELOW100__));
+unsigned char *pA = (unsigned char *) &B100A;
+BitField B100B __attribute__ ((__BELOW100__));
+unsigned char *pB = (unsigned char *) &B100B;
+
+char *
+Do (void)
+{
+  if (B100A.b3)
+    {
+      if (B100B.b3)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0xcb;
+  *pB = 0x34;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/22_if1_b100b_bitfield_7.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/22_if1_b100b_bitfield_7.c
new file mode 100644 (file)
index 0000000..0df2f55
--- /dev/null
@@ -0,0 +1,43 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A,#7," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B,#7," } } */
+
+typedef struct
+{
+  unsigned char b0:1;
+  unsigned char b1:1;
+  unsigned char b2:1;
+  unsigned char b3:1;
+  unsigned char b4:1;
+  unsigned char b5:1;
+  unsigned char b6:1;
+  unsigned char b7:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100A __attribute__ ((__BELOW100__));
+unsigned char *pA = (unsigned char *) &B100A;
+BitField B100B __attribute__ ((__BELOW100__));
+unsigned char *pB = (unsigned char *) &B100B;
+
+char *
+Do (void)
+{
+  if (B100A.b7)
+    {
+      if (B100B.b7)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0xcb;
+  *pB = 0x34;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/23_if0_b100b_bitfield_0.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/23_if0_b100b_bitfield_0.c
new file mode 100644 (file)
index 0000000..9acd8a6
--- /dev/null
@@ -0,0 +1,43 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A,#0," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B,#0," } } */
+
+typedef struct
+{
+  unsigned char b0:1;
+  unsigned char b1:1;
+  unsigned char b2:1;
+  unsigned char b3:1;
+  unsigned char b4:1;
+  unsigned char b5:1;
+  unsigned char b6:1;
+  unsigned char b7:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100A __attribute__ ((__BELOW100__));
+unsigned char *pA = (unsigned char *) &B100A;
+BitField B100B __attribute__ ((__BELOW100__));
+unsigned char *pB = (unsigned char *) &B100B;
+
+char *
+Do (void)
+{
+  if (!B100A.b0)
+    {
+      if (!B100B.b0)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0x34;
+  *pB = 0xcb;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/23_if0_b100b_bitfield_3.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/23_if0_b100b_bitfield_3.c
new file mode 100644 (file)
index 0000000..3ddbc1a
--- /dev/null
@@ -0,0 +1,43 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A,#3," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B,#3," } } */
+
+typedef struct
+{
+  unsigned char b0:1;
+  unsigned char b1:1;
+  unsigned char b2:1;
+  unsigned char b3:1;
+  unsigned char b4:1;
+  unsigned char b5:1;
+  unsigned char b6:1;
+  unsigned char b7:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100A __attribute__ ((__BELOW100__));
+unsigned char *pA = (unsigned char *) &B100A;
+BitField B100B __attribute__ ((__BELOW100__));
+unsigned char *pB = (unsigned char *) &B100B;
+
+char *
+Do (void)
+{
+  if (!B100A.b3)
+    {
+      if (!B100B.b3)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0x34;
+  *pB = 0xcb;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/23_if0_b100b_bitfield_7.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/23_if0_b100b_bitfield_7.c
new file mode 100644 (file)
index 0000000..3c0802e
--- /dev/null
@@ -0,0 +1,43 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A,#7," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B,#7," } } */
+
+typedef struct
+{
+  unsigned char b0:1;
+  unsigned char b1:1;
+  unsigned char b2:1;
+  unsigned char b3:1;
+  unsigned char b4:1;
+  unsigned char b5:1;
+  unsigned char b6:1;
+  unsigned char b7:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100A __attribute__ ((__BELOW100__));
+unsigned char *pA = (unsigned char *) &B100A;
+BitField B100B __attribute__ ((__BELOW100__));
+unsigned char *pB = (unsigned char *) &B100B;
+
+char *
+Do (void)
+{
+  if (!B100A.b7)
+    {
+      if (!B100B.b7)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0x34;
+  *pB = 0xcb;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/24_set_b100w_bitfield_0.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/24_set_b100w_bitfield_0.c
new file mode 100644 (file)
index 0000000..d2fb580
--- /dev/null
@@ -0,0 +1,40 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "set1 B100,#0" } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100 __attribute__ ((__BELOW100__));
+unsigned short *p = (unsigned short *) &B100;
+
+void
+Do (void)
+{
+  B100.b0 = 1;
+}
+
+int
+main (void)
+{
+  *p = 0x1234;
+  Do ();
+  return (*p == 0x1235) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/24_set_b100w_bitfield_7.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/24_set_b100w_bitfield_7.c
new file mode 100644 (file)
index 0000000..1482534
--- /dev/null
@@ -0,0 +1,40 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "set1 B100,#7" } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100 __attribute__ ((__BELOW100__));
+unsigned short *p = (unsigned short *) &B100;
+
+void
+Do (void)
+{
+  B100.b7 = 1;
+}
+
+int
+main (void)
+{
+  *p = 0x1234;
+  Do ();
+  return (*p == 0x12b4) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/24_set_b100w_bitfield_8.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/24_set_b100w_bitfield_8.c
new file mode 100644 (file)
index 0000000..ce495b3
--- /dev/null
@@ -0,0 +1,40 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "set1 B100\\+1,#0" } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100 __attribute__ ((__BELOW100__));
+unsigned short *p = (unsigned short *) &B100;
+
+void
+Do (void)
+{
+  B100.b8 = 1;
+}
+
+int
+main (void)
+{
+  *p = 0x1234;
+  Do ();
+  return (*p == 0x1334) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/24_set_b100w_bitfield_f.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/24_set_b100w_bitfield_f.c
new file mode 100644 (file)
index 0000000..057f2d0
--- /dev/null
@@ -0,0 +1,40 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "set1 B100\\+1,#7" } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100 __attribute__ ((__BELOW100__));
+unsigned short *p = (unsigned short *) &B100;
+
+void
+Do (void)
+{
+  B100.b15 = 1;
+}
+
+int
+main (void)
+{
+  *p = 0x1234;
+  Do ();
+  return (*p == 0x9234) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/25_clr_b100w_bitfield_0.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/25_clr_b100w_bitfield_0.c
new file mode 100644 (file)
index 0000000..f32a16b
--- /dev/null
@@ -0,0 +1,40 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "clr1 B100,#0" } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100 __attribute__ ((__BELOW100__));
+unsigned short *p = (unsigned short *) &B100;
+
+void
+Do (void)
+{
+  B100.b0 = 0;
+}
+
+int
+main (void)
+{
+  *p = 0xedcb;
+  Do ();
+  return (*p == 0xedca) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/25_clr_b100w_bitfield_7.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/25_clr_b100w_bitfield_7.c
new file mode 100644 (file)
index 0000000..b123c5e
--- /dev/null
@@ -0,0 +1,40 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "clr1 B100,#7" } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100 __attribute__ ((__BELOW100__));
+unsigned short *p = (unsigned short *) &B100;
+
+void
+Do (void)
+{
+  B100.b7 = 0;
+}
+
+int
+main (void)
+{
+  *p = 0xedcb;
+  Do ();
+  return (*p == 0xed4b) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/25_clr_b100w_bitfield_8.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/25_clr_b100w_bitfield_8.c
new file mode 100644 (file)
index 0000000..ed923a1
--- /dev/null
@@ -0,0 +1,40 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "clr1 B100\\+1,#0" } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100 __attribute__ ((__BELOW100__));
+unsigned short *p = (unsigned short *) &B100;
+
+void
+Do (void)
+{
+  B100.b8 = 0;
+}
+
+int
+main (void)
+{
+  *p = 0xedcb;
+  Do ();
+  return (*p == 0xeccb) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/25_clr_b100w_bitfield_f.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/25_clr_b100w_bitfield_f.c
new file mode 100644 (file)
index 0000000..2e04115
--- /dev/null
@@ -0,0 +1,40 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "clr1 B100\\+1,#7" } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100 __attribute__ ((__BELOW100__));
+unsigned short *p = (unsigned short *) &B100;
+
+void
+Do (void)
+{
+  B100.b15 = 0;
+}
+
+int
+main (void)
+{
+  *p = 0xedcb;
+  Do ();
+  return (*p == 0x6dcb) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/26_if1_b100w_bitfield_0.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/26_if1_b100w_bitfield_0.c
new file mode 100644 (file)
index 0000000..223de12
--- /dev/null
@@ -0,0 +1,51 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A,#0," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B,#0," } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100A __attribute__ ((__BELOW100__));
+unsigned short *pA = (unsigned short *) &B100A;
+BitField B100B __attribute__ ((__BELOW100__));
+unsigned short *pB = (unsigned short *) &B100B;
+
+char *
+Do (void)
+{
+  if (B100A.b0)
+    {
+      if (B100B.b0)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0xedcb;
+  *pB = 0x1234;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/26_if1_b100w_bitfield_3.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/26_if1_b100w_bitfield_3.c
new file mode 100644 (file)
index 0000000..83b0a8a
--- /dev/null
@@ -0,0 +1,51 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A,#3," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B,#3," } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100A __attribute__ ((__BELOW100__));
+unsigned short *pA = (unsigned short *) &B100A;
+BitField B100B __attribute__ ((__BELOW100__));
+unsigned short *pB = (unsigned short *) &B100B;
+
+char *
+Do (void)
+{
+  if (B100A.b3)
+    {
+      if (B100B.b3)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0xedcb;
+  *pB = 0x1234;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/26_if1_b100w_bitfield_7.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/26_if1_b100w_bitfield_7.c
new file mode 100644 (file)
index 0000000..89e71b8
--- /dev/null
@@ -0,0 +1,51 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A,#7," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B,#7," } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100A __attribute__ ((__BELOW100__));
+unsigned short *pA = (unsigned short *) &B100A;
+BitField B100B __attribute__ ((__BELOW100__));
+unsigned short *pB = (unsigned short *) &B100B;
+
+char *
+Do (void)
+{
+  if (B100A.b7)
+    {
+      if (B100B.b7)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0xedcb;
+  *pB = 0x1234;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/26_if1_b100w_bitfield_8.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/26_if1_b100w_bitfield_8.c
new file mode 100644 (file)
index 0000000..044541b
--- /dev/null
@@ -0,0 +1,51 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A\\+1,#0," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B\\+1,#0," } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100A __attribute__ ((__BELOW100__));
+unsigned short *pA = (unsigned short *) &B100A;
+BitField B100B __attribute__ ((__BELOW100__));
+unsigned short *pB = (unsigned short *) &B100B;
+
+char *
+Do (void)
+{
+  if (B100A.b8)
+    {
+      if (B100B.b8)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0xedcb;
+  *pB = 0x1234;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/26_if1_b100w_bitfield_b.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/26_if1_b100w_bitfield_b.c
new file mode 100644 (file)
index 0000000..e36934f
--- /dev/null
@@ -0,0 +1,51 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A\\+1,#3," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B\\+1,#3," } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100A __attribute__ ((__BELOW100__));
+unsigned short *pA = (unsigned short *) &B100A;
+BitField B100B __attribute__ ((__BELOW100__));
+unsigned short *pB = (unsigned short *) &B100B;
+
+char *
+Do (void)
+{
+  if (B100A.b11)
+    {
+      if (B100B.b11)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0xedcb;
+  *pB = 0x1234;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/26_if1_b100w_bitfield_f.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/26_if1_b100w_bitfield_f.c
new file mode 100644 (file)
index 0000000..90d0bbd
--- /dev/null
@@ -0,0 +1,51 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A\\+1,#7," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B\\+1,#7," } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100A __attribute__ ((__BELOW100__));
+unsigned short *pA = (unsigned short *) &B100A;
+BitField B100B __attribute__ ((__BELOW100__));
+unsigned short *pB = (unsigned short *) &B100B;
+
+char *
+Do (void)
+{
+  if (B100A.b15)
+    {
+      if (B100B.b15)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0xedcb;
+  *pB = 0x1234;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/27_if0_b100w_bitfield_0.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/27_if0_b100w_bitfield_0.c
new file mode 100644 (file)
index 0000000..a81359c
--- /dev/null
@@ -0,0 +1,51 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A,#0," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B,#0," } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100A __attribute__ ((__BELOW100__));
+unsigned short *pA = (unsigned short *) &B100A;
+BitField B100B __attribute__ ((__BELOW100__));
+unsigned short *pB = (unsigned short *) &B100B;
+
+char *
+Do (void)
+{
+  if (!B100A.b0)
+    {
+      if (!B100B.b0)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0x1234;
+  *pB = 0xedcb;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/27_if0_b100w_bitfield_3.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/27_if0_b100w_bitfield_3.c
new file mode 100644 (file)
index 0000000..d9eff1a
--- /dev/null
@@ -0,0 +1,51 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A,#3," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B,#3," } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100A __attribute__ ((__BELOW100__));
+unsigned short *pA = (unsigned short *) &B100A;
+BitField B100B __attribute__ ((__BELOW100__));
+unsigned short *pB = (unsigned short *) &B100B;
+
+char *
+Do (void)
+{
+  if (!B100A.b3)
+    {
+      if (!B100B.b3)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0x1234;
+  *pB = 0xedcb;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/27_if0_b100w_bitfield_7.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/27_if0_b100w_bitfield_7.c
new file mode 100644 (file)
index 0000000..1d643ea
--- /dev/null
@@ -0,0 +1,51 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A,#7," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B,#7," } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100A __attribute__ ((__BELOW100__));
+unsigned short *pA = (unsigned short *) &B100A;
+BitField B100B __attribute__ ((__BELOW100__));
+unsigned short *pB = (unsigned short *) &B100B;
+
+char *
+Do (void)
+{
+  if (!B100A.b7)
+    {
+      if (!B100B.b7)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0x1234;
+  *pB = 0xedcb;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/27_if0_b100w_bitfield_8.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/27_if0_b100w_bitfield_8.c
new file mode 100644 (file)
index 0000000..5a2b678
--- /dev/null
@@ -0,0 +1,51 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A\\+1,#0," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B\\+1,#0," } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100A __attribute__ ((__BELOW100__));
+unsigned short *pA = (unsigned short *) &B100A;
+BitField B100B __attribute__ ((__BELOW100__));
+unsigned short *pB = (unsigned short *) &B100B;
+
+char *
+Do (void)
+{
+  if (!B100A.b8)
+    {
+      if (!B100B.b8)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0x1234;
+  *pB = 0xedcb;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/27_if0_b100w_bitfield_b.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/27_if0_b100w_bitfield_b.c
new file mode 100644 (file)
index 0000000..87f760b
--- /dev/null
@@ -0,0 +1,51 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A\\+1,#3," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B\\+1,#3," } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100A __attribute__ ((__BELOW100__));
+unsigned short *pA = (unsigned short *) &B100A;
+BitField B100B __attribute__ ((__BELOW100__));
+unsigned short *pB = (unsigned short *) &B100B;
+
+char *
+Do (void)
+{
+  if (!B100A.b11)
+    {
+      if (!B100B.b11)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0x1234;
+  *pB = 0xedcb;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/bss_below100/27_if0_b100w_bitfield_f.c b/gcc/testsuite/gcc.target/xstormy16/bss_below100/27_if0_b100w_bitfield_f.c
new file mode 100644 (file)
index 0000000..1950ca2
--- /dev/null
@@ -0,0 +1,51 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A\\+1,#7," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B\\+1,#7," } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100A __attribute__ ((__BELOW100__));
+unsigned short *pA = (unsigned short *) &B100A;
+BitField B100B __attribute__ ((__BELOW100__));
+unsigned short *pB = (unsigned short *) &B100B;
+
+char *
+Do (void)
+{
+  if (!B100A.b15)
+    {
+      if (!B100B.b15)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0x1234;
+  *pB = 0xedcb;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/01_const_to_b100b.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/01_const_to_b100b.c
new file mode 100644 (file)
index 0000000..0ffc4ba
--- /dev/null
@@ -0,0 +1,19 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "mov.b B100,#18" } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned char B100 __attribute__ ((__BELOW100__)) = 0x34;
+unsigned char *p = &B100;
+
+void
+Do (void)
+{
+  B100 = 0x12;
+}
+
+int
+main (void)
+{
+  Do ();
+  return (*p == 0x12) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/02_const_to_b100w.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/02_const_to_b100w.c
new file mode 100644 (file)
index 0000000..e2ad793
--- /dev/null
@@ -0,0 +1,19 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "mov.w B100,#4660" } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned short B100 __attribute__ ((__BELOW100__)) = 0x9876;
+unsigned short *p = &B100;
+
+void
+Do (void)
+{
+  B100 = 0x1234;
+}
+
+int
+main (void)
+{
+  Do ();
+  return (*p == 0x1234) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/03_var_to_b100b.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/03_var_to_b100b.c
new file mode 100644 (file)
index 0000000..f78d18a
--- /dev/null
@@ -0,0 +1,21 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "mov.b B100,r" } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned char B100 __attribute__ ((__BELOW100__)) = 0x34;
+unsigned char *p = &B100;
+
+unsigned char yData = 0x12;
+
+void
+Do (void)
+{
+  B100 = yData;
+}
+
+int
+main (void)
+{
+  Do ();
+  return (*p == 0x12) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/04_var_to_b100w.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/04_var_to_b100w.c
new file mode 100644 (file)
index 0000000..b9f3c55
--- /dev/null
@@ -0,0 +1,21 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "mov.w B100,r" } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned short B100 __attribute__ ((__BELOW100__)) = 0x9876;
+unsigned short *p = &B100;
+
+unsigned short wData = 0x1234;
+
+void
+Do (void)
+{
+  B100 = wData;
+}
+
+int
+main (void)
+{
+  Do ();
+  return (*p == 0x1234) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/05_b100b_to_var.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/05_b100b_to_var.c
new file mode 100644 (file)
index 0000000..b2a0bd0
--- /dev/null
@@ -0,0 +1,21 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "mov.b r., *B100" } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned char B100 __attribute__ ((__BELOW100__)) = 0x34;
+unsigned char *p = &B100;
+
+unsigned char yData = 0x12;
+
+void
+Do (void)
+{
+  yData = B100;
+}
+
+int
+main (void)
+{
+  Do ();
+  return (yData == 0x34) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/06_b100w_to_var.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/06_b100w_to_var.c
new file mode 100644 (file)
index 0000000..50a6dd2
--- /dev/null
@@ -0,0 +1,21 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "mov.w r.,B100" } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned short B100 __attribute__ ((__BELOW100__)) = 0x3456;
+unsigned short *p = &B100;
+
+unsigned short wData = 0x1234;
+
+void
+Do (void)
+{
+  wData = B100;
+}
+
+int
+main (void)
+{
+  Do ();
+  return (wData == 0x3456) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/10_set_b100b_bit_0.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/10_set_b100b_bit_0.c
new file mode 100644 (file)
index 0000000..f81d26a
--- /dev/null
@@ -0,0 +1,19 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "set1 B100,#0" } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned char B100 __attribute__ ((__BELOW100__)) = 0x34;
+unsigned char *p = &B100;
+
+void
+Do (void)
+{
+  B100 |= 0x01;
+}
+
+int
+main (void)
+{
+  Do ();
+  return (*p == 0x35) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/10_set_b100b_bit_7.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/10_set_b100b_bit_7.c
new file mode 100644 (file)
index 0000000..2c51913
--- /dev/null
@@ -0,0 +1,19 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "set1 B100,#7" } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned char B100 __attribute__ ((__BELOW100__)) = 0x34;
+unsigned char *p = &B100;
+
+void
+Do (void)
+{
+  B100 |= 0x80;
+}
+
+int
+main (void)
+{
+  Do ();
+  return (*p == 0xb4) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/11_clr_b100b_bit_0.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/11_clr_b100b_bit_0.c
new file mode 100644 (file)
index 0000000..500f9ba
--- /dev/null
@@ -0,0 +1,19 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "clr1 B100,#0" } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned char B100 __attribute__ ((__BELOW100__)) = 0xcb;
+unsigned char *p = &B100;
+
+void
+Do (void)
+{
+  B100 &= ~0x01;
+}
+
+int
+main (void)
+{
+  Do ();
+  return (*p == 0xca) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/11_clr_b100b_bit_7.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/11_clr_b100b_bit_7.c
new file mode 100644 (file)
index 0000000..7c71f67
--- /dev/null
@@ -0,0 +1,19 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "clr1 B100,#7" } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned char B100 __attribute__ ((__BELOW100__)) = 0xcb;
+unsigned char *p = &B100;
+
+void
+Do (void)
+{
+  B100 &= ~0x80;
+}
+
+int
+main (void)
+{
+  Do ();
+  return (*p == 0x4b) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/12_if1_b100b_bit_0.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/12_if1_b100b_bit_0.c
new file mode 100644 (file)
index 0000000..10dee71
--- /dev/null
@@ -0,0 +1,29 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A,#0," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B,#0," } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned char B100A __attribute__ ((__BELOW100__)) = 0xcb;
+unsigned char *pA = &B100A;
+unsigned char B100B __attribute__ ((__BELOW100__)) = 0x34;
+unsigned char *pB = &B100B;
+
+char *
+Do (void)
+{
+  if (B100A & 0x01)
+    {
+      if (B100B & 0x01)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/12_if1_b100b_bit_3.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/12_if1_b100b_bit_3.c
new file mode 100644 (file)
index 0000000..b366124
--- /dev/null
@@ -0,0 +1,29 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A,#3," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B,#3," } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned char B100A __attribute__ ((__BELOW100__)) = 0xcb;
+unsigned char *pA = &B100A;
+unsigned char B100B __attribute__ ((__BELOW100__)) = 0x34;
+unsigned char *pB = &B100B;
+
+char *
+Do (void)
+{
+  if (B100A & 0x08)
+    {
+      if (B100B & 0x08)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/12_if1_b100b_bit_7.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/12_if1_b100b_bit_7.c
new file mode 100644 (file)
index 0000000..9906a66
--- /dev/null
@@ -0,0 +1,29 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A,#7," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B,#7," } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned char B100A __attribute__ ((__BELOW100__)) = 0xcb;
+unsigned char *pA = &B100A;
+unsigned char B100B __attribute__ ((__BELOW100__)) = 0x34;
+unsigned char *pB = &B100B;
+
+char *
+Do (void)
+{
+  if (B100A & 0x80)
+    {
+      if (B100B & 0x80)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/13_if0_b100b_bit_0.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/13_if0_b100b_bit_0.c
new file mode 100644 (file)
index 0000000..04cc929
--- /dev/null
@@ -0,0 +1,29 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A,#0," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B,#0," } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned char B100A __attribute__ ((__BELOW100__)) = 0x34;
+unsigned char *pA = &B100A;
+unsigned char B100B __attribute__ ((__BELOW100__)) = 0xcb;
+unsigned char *pB = &B100B;
+
+char *
+Do (void)
+{
+  if (!(B100A & 0x01))
+    {
+      if (!(B100B & 0x01))
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/13_if0_b100b_bit_3.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/13_if0_b100b_bit_3.c
new file mode 100644 (file)
index 0000000..cbda60c
--- /dev/null
@@ -0,0 +1,29 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A,#3," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B,#3," } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned char B100A __attribute__ ((__BELOW100__)) = 0x34;
+unsigned char *pA = &B100A;
+unsigned char B100B __attribute__ ((__BELOW100__)) = 0xcb;
+unsigned char *pB = &B100B;
+
+char *
+Do (void)
+{
+  if (!(B100A & 0x08))
+    {
+      if (!(B100B & 0x08))
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/13_if0_b100b_bit_7.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/13_if0_b100b_bit_7.c
new file mode 100644 (file)
index 0000000..4914346
--- /dev/null
@@ -0,0 +1,29 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A,#7," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B,#7," } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned char B100A __attribute__ ((__BELOW100__)) = 0x34;
+unsigned char *pA = &B100A;
+unsigned char B100B __attribute__ ((__BELOW100__)) = 0xcb;
+unsigned char *pB = &B100B;
+
+char *
+Do (void)
+{
+  if (!(B100A & 0x80))
+    {
+      if (!(B100B & 0x80))
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/14_set_b100w_bit_0.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/14_set_b100w_bit_0.c
new file mode 100644 (file)
index 0000000..acce9e1
--- /dev/null
@@ -0,0 +1,19 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "set1 B100,#0" } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned short B100 __attribute__ ((__BELOW100__)) = 0x1234;
+unsigned short *p = &B100;
+
+void
+Do (void)
+{
+  B100 |= 0x0001;
+}
+
+int
+main (void)
+{
+  Do ();
+  return (*p == 0x1235) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/14_set_b100w_bit_7.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/14_set_b100w_bit_7.c
new file mode 100644 (file)
index 0000000..35fe30f
--- /dev/null
@@ -0,0 +1,19 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "set1 B100,#7" } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned short B100 __attribute__ ((__BELOW100__)) = 0x1234;
+unsigned short *p = &B100;
+
+void
+Do (void)
+{
+  B100 |= 0x0080;
+}
+
+int
+main (void)
+{
+  Do ();
+  return (*p == 0x12b4) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/14_set_b100w_bit_8.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/14_set_b100w_bit_8.c
new file mode 100644 (file)
index 0000000..cc337fc
--- /dev/null
@@ -0,0 +1,19 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "set1 B100\\+1,#0" } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned short B100 __attribute__ ((__BELOW100__)) = 0x1234;
+unsigned short *p = &B100;
+
+void
+Do (void)
+{
+  B100 |= 0x0100;
+}
+
+int
+main (void)
+{
+  Do ();
+  return (*p == 0x1334) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/14_set_b100w_bit_f.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/14_set_b100w_bit_f.c
new file mode 100644 (file)
index 0000000..1fce8df
--- /dev/null
@@ -0,0 +1,19 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "set1 B100\\+1,#7" } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned short B100 __attribute__ ((__BELOW100__)) = 0x1234;
+unsigned short *p = &B100;
+
+void
+Do (void)
+{
+  B100 |= 0x8000;
+}
+
+int
+main (void)
+{
+  Do ();
+  return (*p == 0x9234) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/15_clr_b100w_bit_0.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/15_clr_b100w_bit_0.c
new file mode 100644 (file)
index 0000000..7c1c9b3
--- /dev/null
@@ -0,0 +1,19 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "clr1 B100,#0" } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned short B100 __attribute__ ((__BELOW100__)) = 0xedcb;
+unsigned short *p = &B100;
+
+void
+Do (void)
+{
+  B100 &= ~0x0001;
+}
+
+int
+main (void)
+{
+  Do ();
+  return (*p == 0xedca) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/15_clr_b100w_bit_7.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/15_clr_b100w_bit_7.c
new file mode 100644 (file)
index 0000000..fd707dc
--- /dev/null
@@ -0,0 +1,19 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "clr1 B100,#7" } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned short B100 __attribute__ ((__BELOW100__)) = 0xedcb;
+unsigned short *p = &B100;
+
+void
+Do (void)
+{
+  B100 &= ~0x0080;
+}
+
+int
+main (void)
+{
+  Do ();
+  return (*p == 0xed4b) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/15_clr_b100w_bit_8.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/15_clr_b100w_bit_8.c
new file mode 100644 (file)
index 0000000..7788de6
--- /dev/null
@@ -0,0 +1,19 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "clr1 B100\\+1,#0" } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned short B100 __attribute__ ((__BELOW100__)) = 0xedcb;
+unsigned short *p = &B100;
+
+void
+Do (void)
+{
+  B100 &= ~0x0100;
+}
+
+int
+main (void)
+{
+  Do ();
+  return (*p == 0xeccb) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/15_clr_b100w_bit_f.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/15_clr_b100w_bit_f.c
new file mode 100644 (file)
index 0000000..8046ee3
--- /dev/null
@@ -0,0 +1,19 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "clr1 B100\\+1,#7" } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned short B100 __attribute__ ((__BELOW100__)) = 0xedcb;
+unsigned short *p = &B100;
+
+void
+Do (void)
+{
+  B100 &= ~0x8000;
+}
+
+int
+main (void)
+{
+  Do ();
+  return (*p == 0x6dcb) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/16_if1_b100w_bit_0.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/16_if1_b100w_bit_0.c
new file mode 100644 (file)
index 0000000..a5df453
--- /dev/null
@@ -0,0 +1,29 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A,#0," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B,#0," } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned short B100A __attribute__ ((__BELOW100__)) = 0xedcb;
+unsigned short *pA = &B100A;
+unsigned short B100B __attribute__ ((__BELOW100__)) = 0x1234;
+unsigned short *pB = &B100B;
+
+char *
+Do (void)
+{
+  if (B100A & 0x0001)
+    {
+      if (B100B & 0x0001)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/16_if1_b100w_bit_3.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/16_if1_b100w_bit_3.c
new file mode 100644 (file)
index 0000000..8ff76e1
--- /dev/null
@@ -0,0 +1,29 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A,#3," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B,#3," } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned short B100A __attribute__ ((__BELOW100__)) = 0xedcb;
+unsigned short *pA = &B100A;
+unsigned short B100B __attribute__ ((__BELOW100__)) = 0x1234;
+unsigned short *pB = &B100B;
+
+char *
+Do (void)
+{
+  if (B100A & 0x0008)
+    {
+      if (B100B & 0x0008)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/16_if1_b100w_bit_7.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/16_if1_b100w_bit_7.c
new file mode 100644 (file)
index 0000000..8f542f3
--- /dev/null
@@ -0,0 +1,29 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A,#7," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B,#7," } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned short B100A __attribute__ ((__BELOW100__)) = 0xedcb;
+unsigned short *pA = &B100A;
+unsigned short B100B __attribute__ ((__BELOW100__)) = 0x1234;
+unsigned short *pB = &B100B;
+
+char *
+Do (void)
+{
+  if (B100A & 0x0080)
+    {
+      if (B100B & 0x0080)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/16_if1_b100w_bit_8.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/16_if1_b100w_bit_8.c
new file mode 100644 (file)
index 0000000..727104c
--- /dev/null
@@ -0,0 +1,29 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A\\+1,#0," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B\\+1,#0," } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned short B100A __attribute__ ((__BELOW100__)) = 0xedcb;
+unsigned short *pA = &B100A;
+unsigned short B100B __attribute__ ((__BELOW100__)) = 0x1234;
+unsigned short *pB = &B100B;
+
+char *
+Do (void)
+{
+  if (B100A & 0x0100)
+    {
+      if (B100B & 0x0100)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/16_if1_b100w_bit_b.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/16_if1_b100w_bit_b.c
new file mode 100644 (file)
index 0000000..74fd669
--- /dev/null
@@ -0,0 +1,29 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A\\+1,#3," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B\\+1,#3," } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned short B100A __attribute__ ((__BELOW100__)) = 0xedcb;
+unsigned short *pA = &B100A;
+unsigned short B100B __attribute__ ((__BELOW100__)) = 0x1234;
+unsigned short *pB = &B100B;
+
+char *
+Do (void)
+{
+  if (B100A & 0x0800)
+    {
+      if (B100B & 0x0800)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/16_if1_b100w_bit_f.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/16_if1_b100w_bit_f.c
new file mode 100644 (file)
index 0000000..79b3839
--- /dev/null
@@ -0,0 +1,29 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A\\+1,#7," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B\\+1,#7," } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned short B100A __attribute__ ((__BELOW100__)) = 0xedcb;
+unsigned short *pA = &B100A;
+unsigned short B100B __attribute__ ((__BELOW100__)) = 0x1234;
+unsigned short *pB = &B100B;
+
+char *
+Do (void)
+{
+  if (B100A & 0x8000)
+    {
+      if (B100B & 0x8000)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/17_if0_b100w_bit_0.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/17_if0_b100w_bit_0.c
new file mode 100644 (file)
index 0000000..94dc088
--- /dev/null
@@ -0,0 +1,29 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A,#0," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B,#0," } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned short B100A __attribute__ ((__BELOW100__)) = 0x1234;
+unsigned short *pA = &B100A;
+unsigned short B100B __attribute__ ((__BELOW100__)) = 0xedcb;
+unsigned short *pB = &B100B;
+
+char *
+Do (void)
+{
+  if (!(B100A & 0x0001))
+    {
+      if (!(B100B & 0x0001))
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/17_if0_b100w_bit_3.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/17_if0_b100w_bit_3.c
new file mode 100644 (file)
index 0000000..7bc005d
--- /dev/null
@@ -0,0 +1,29 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A,#3," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B,#3," } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned short B100A __attribute__ ((__BELOW100__)) = 0x1234;
+unsigned short *pA = &B100A;
+unsigned short B100B __attribute__ ((__BELOW100__)) = 0xedcb;
+unsigned short *pB = &B100B;
+
+char *
+Do (void)
+{
+  if (!(B100A & 0x0008))
+    {
+      if (!(B100B & 0x0008))
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/17_if0_b100w_bit_7.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/17_if0_b100w_bit_7.c
new file mode 100644 (file)
index 0000000..64fcdc2
--- /dev/null
@@ -0,0 +1,29 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A,#7," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B,#7," } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned short B100A __attribute__ ((__BELOW100__)) = 0x1234;
+unsigned short *pA = &B100A;
+unsigned short B100B __attribute__ ((__BELOW100__)) = 0xedcb;
+unsigned short *pB = &B100B;
+
+char *
+Do (void)
+{
+  if (!(B100A & 0x0080))
+    {
+      if (!(B100B & 0x0080))
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/17_if0_b100w_bit_8.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/17_if0_b100w_bit_8.c
new file mode 100644 (file)
index 0000000..6a11812
--- /dev/null
@@ -0,0 +1,29 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A\\+1,#0," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B\\+1,#0," } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned short B100A __attribute__ ((__BELOW100__)) = 0x1234;
+unsigned short *pA = &B100A;
+unsigned short B100B __attribute__ ((__BELOW100__)) = 0xedcb;
+unsigned short *pB = &B100B;
+
+char *
+Do (void)
+{
+  if (!(B100A & 0x0100))
+    {
+      if (!(B100B & 0x0100))
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/17_if0_b100w_bit_b.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/17_if0_b100w_bit_b.c
new file mode 100644 (file)
index 0000000..59a2f35
--- /dev/null
@@ -0,0 +1,29 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A\\+1,#3," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B\\+1,#3," } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned short B100A __attribute__ ((__BELOW100__)) = 0x1234;
+unsigned short *pA = &B100A;
+unsigned short B100B __attribute__ ((__BELOW100__)) = 0xedcb;
+unsigned short *pB = &B100B;
+
+char *
+Do (void)
+{
+  if (!(B100A & 0x0800))
+    {
+      if (!(B100B & 0x0800))
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/17_if0_b100w_bit_f.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/17_if0_b100w_bit_f.c
new file mode 100644 (file)
index 0000000..3b27190
--- /dev/null
@@ -0,0 +1,29 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A\\+1,#7," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B\\+1,#7," } } */
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+unsigned short B100A __attribute__ ((__BELOW100__)) = 0x1234;
+unsigned short *pA = &B100A;
+unsigned short B100B __attribute__ ((__BELOW100__)) = 0xedcb;
+unsigned short *pB = &B100B;
+
+char *
+Do (void)
+{
+  if (!(B100A & 0x8000))
+    {
+      if (!(B100B & 0x8000))
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/20_set_b100b_bitfield_0.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/20_set_b100b_bitfield_0.c
new file mode 100644 (file)
index 0000000..fef1f2e
--- /dev/null
@@ -0,0 +1,33 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "set1 B100,#0" } } */
+
+typedef struct
+{
+  unsigned char b0:1;
+  unsigned char b1:1;
+  unsigned char b2:1;
+  unsigned char b3:1;
+  unsigned char b4:1;
+  unsigned char b5:1;
+  unsigned char b6:1;
+  unsigned char b7:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100 __attribute__ ((__BELOW100__)) =
+{
+0, 0, 1, 0, 1, 1, 0, 0};
+unsigned char *p = (unsigned char *) &B100;
+
+void
+Do (void)
+{
+  B100.b0 = 1;
+}
+
+int
+main (void)
+{
+  Do ();
+  return (*p == 0x35) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/20_set_b100b_bitfield_7.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/20_set_b100b_bitfield_7.c
new file mode 100644 (file)
index 0000000..b3900ca
--- /dev/null
@@ -0,0 +1,33 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "set1 B100,#7" } } */
+
+typedef struct
+{
+  unsigned char b0:1;
+  unsigned char b1:1;
+  unsigned char b2:1;
+  unsigned char b3:1;
+  unsigned char b4:1;
+  unsigned char b5:1;
+  unsigned char b6:1;
+  unsigned char b7:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100 __attribute__ ((__BELOW100__)) =
+{
+0, 0, 1, 0, 1, 1, 0, 0};
+unsigned char *p = (unsigned char *) &B100;
+
+void
+Do (void)
+{
+  B100.b7 = 1;
+}
+
+int
+main (void)
+{
+  Do ();
+  return (*p == 0xb4) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/21_clr_b100b_bitfield_0.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/21_clr_b100b_bitfield_0.c
new file mode 100644 (file)
index 0000000..6106f38
--- /dev/null
@@ -0,0 +1,33 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "clr1 B100,#0" } } */
+
+typedef struct
+{
+  unsigned char b0:1;
+  unsigned char b1:1;
+  unsigned char b2:1;
+  unsigned char b3:1;
+  unsigned char b4:1;
+  unsigned char b5:1;
+  unsigned char b6:1;
+  unsigned char b7:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100 __attribute__ ((__BELOW100__)) =
+{
+1, 1, 0, 1, 0, 0, 1, 1};
+unsigned char *p = (unsigned char *) &B100;
+
+void
+Do (void)
+{
+  B100.b0 = 0;
+}
+
+int
+main (void)
+{
+  Do ();
+  return (*p == 0xca) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/21_clr_b100b_bitfield_7.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/21_clr_b100b_bitfield_7.c
new file mode 100644 (file)
index 0000000..414eec6
--- /dev/null
@@ -0,0 +1,33 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "clr1 B100,#7" } } */
+
+typedef struct
+{
+  unsigned char b0:1;
+  unsigned char b1:1;
+  unsigned char b2:1;
+  unsigned char b3:1;
+  unsigned char b4:1;
+  unsigned char b5:1;
+  unsigned char b6:1;
+  unsigned char b7:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100 __attribute__ ((__BELOW100__)) =
+{
+1, 1, 0, 1, 0, 0, 1, 1};
+unsigned char *p = (unsigned char *) &B100;
+
+void
+Do (void)
+{
+  B100.b7 = 0;
+}
+
+int
+main (void)
+{
+  Do ();
+  return (*p == 0x4b) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/22_if1_b100b_bitfield_0.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/22_if1_b100b_bitfield_0.c
new file mode 100644 (file)
index 0000000..b950c51
--- /dev/null
@@ -0,0 +1,45 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A,#0," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B,#0," } } */
+
+typedef struct
+{
+  unsigned char b0:1;
+  unsigned char b1:1;
+  unsigned char b2:1;
+  unsigned char b3:1;
+  unsigned char b4:1;
+  unsigned char b5:1;
+  unsigned char b6:1;
+  unsigned char b7:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100A __attribute__ ((__BELOW100__)) =
+{
+1, 1, 0, 1, 0, 0, 1, 1};
+unsigned char *pA = (unsigned char *) &B100A;
+BitField B100B __attribute__ ((__BELOW100__)) =
+{
+0, 0, 1, 0, 1, 1, 0, 0};
+unsigned char *pB = (unsigned char *) &B100B;
+
+char *
+Do (void)
+{
+  if (B100A.b0)
+    {
+      if (B100B.b0)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/22_if1_b100b_bitfield_3.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/22_if1_b100b_bitfield_3.c
new file mode 100644 (file)
index 0000000..b9da6a5
--- /dev/null
@@ -0,0 +1,45 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A,#3," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B,#3," } } */
+
+typedef struct
+{
+  unsigned char b0:1;
+  unsigned char b1:1;
+  unsigned char b2:1;
+  unsigned char b3:1;
+  unsigned char b4:1;
+  unsigned char b5:1;
+  unsigned char b6:1;
+  unsigned char b7:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100A __attribute__ ((__BELOW100__)) =
+{
+1, 1, 0, 1, 0, 0, 1, 1};
+unsigned char *pA = (unsigned char *) &B100A;
+BitField B100B __attribute__ ((__BELOW100__)) =
+{
+0, 0, 1, 0, 1, 1, 0, 0};
+unsigned char *pB = (unsigned char *) &B100B;
+
+char *
+Do (void)
+{
+  if (B100A.b3)
+    {
+      if (B100B.b3)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/22_if1_b100b_bitfield_7.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/22_if1_b100b_bitfield_7.c
new file mode 100644 (file)
index 0000000..667e892
--- /dev/null
@@ -0,0 +1,45 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A,#7," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B,#7," } } */
+
+typedef struct
+{
+  unsigned char b0:1;
+  unsigned char b1:1;
+  unsigned char b2:1;
+  unsigned char b3:1;
+  unsigned char b4:1;
+  unsigned char b5:1;
+  unsigned char b6:1;
+  unsigned char b7:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100A __attribute__ ((__BELOW100__)) =
+{
+1, 1, 0, 1, 0, 0, 1, 1};
+unsigned char *pA = (unsigned char *) &B100A;
+BitField B100B __attribute__ ((__BELOW100__)) =
+{
+0, 0, 1, 0, 1, 1, 0, 0};
+unsigned char *pB = (unsigned char *) &B100B;
+
+char *
+Do (void)
+{
+  if (B100A.b7)
+    {
+      if (B100B.b7)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/23_if0_b100b_bitfield_0.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/23_if0_b100b_bitfield_0.c
new file mode 100644 (file)
index 0000000..ebb63f7
--- /dev/null
@@ -0,0 +1,45 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A,#0," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B,#0," } } */
+
+typedef struct
+{
+  unsigned char b0:1;
+  unsigned char b1:1;
+  unsigned char b2:1;
+  unsigned char b3:1;
+  unsigned char b4:1;
+  unsigned char b5:1;
+  unsigned char b6:1;
+  unsigned char b7:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100A __attribute__ ((__BELOW100__)) =
+{
+0, 0, 1, 0, 1, 1, 0, 0};
+unsigned char *pA = (unsigned char *) &B100A;
+BitField B100B __attribute__ ((__BELOW100__)) =
+{
+1, 1, 0, 1, 0, 0, 1, 1};
+unsigned char *pB = (unsigned char *) &B100B;
+
+char *
+Do (void)
+{
+  if (!B100A.b0)
+    {
+      if (!B100B.b0)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/23_if0_b100b_bitfield_3.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/23_if0_b100b_bitfield_3.c
new file mode 100644 (file)
index 0000000..a16768e
--- /dev/null
@@ -0,0 +1,45 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A,#3," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B,#3," } } */
+
+typedef struct
+{
+  unsigned char b0:1;
+  unsigned char b1:1;
+  unsigned char b2:1;
+  unsigned char b3:1;
+  unsigned char b4:1;
+  unsigned char b5:1;
+  unsigned char b6:1;
+  unsigned char b7:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100A __attribute__ ((__BELOW100__)) =
+{
+0, 0, 1, 0, 1, 1, 0, 0};
+unsigned char *pA = (unsigned char *) &B100A;
+BitField B100B __attribute__ ((__BELOW100__)) =
+{
+1, 1, 0, 1, 0, 0, 1, 1};
+unsigned char *pB = (unsigned char *) &B100B;
+
+char *
+Do (void)
+{
+  if (!B100A.b3)
+    {
+      if (!B100B.b3)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/23_if0_b100b_bitfield_7.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/23_if0_b100b_bitfield_7.c
new file mode 100644 (file)
index 0000000..6f6d181
--- /dev/null
@@ -0,0 +1,45 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A,#7," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B,#7," } } */
+
+typedef struct
+{
+  unsigned char b0:1;
+  unsigned char b1:1;
+  unsigned char b2:1;
+  unsigned char b3:1;
+  unsigned char b4:1;
+  unsigned char b5:1;
+  unsigned char b6:1;
+  unsigned char b7:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100A __attribute__ ((__BELOW100__)) =
+{
+0, 0, 1, 0, 1, 1, 0, 0};
+unsigned char *pA = (unsigned char *) &B100A;
+BitField B100B __attribute__ ((__BELOW100__)) =
+{
+1, 1, 0, 1, 0, 0, 1, 1};
+unsigned char *pB = (unsigned char *) &B100B;
+
+char *
+Do (void)
+{
+  if (!B100A.b7)
+    {
+      if (!B100B.b7)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/24_set_b100w_bitfield_0.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/24_set_b100w_bitfield_0.c
new file mode 100644 (file)
index 0000000..7ac5028
--- /dev/null
@@ -0,0 +1,41 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "set1 B100,#0" } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100 __attribute__ ((__BELOW100__)) =
+{
+0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0};
+unsigned short *p = (unsigned short *) &B100;
+
+void
+Do (void)
+{
+  B100.b0 = 1;
+}
+
+int
+main (void)
+{
+  Do ();
+  return (*p == 0x1235) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/24_set_b100w_bitfield_7.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/24_set_b100w_bitfield_7.c
new file mode 100644 (file)
index 0000000..8ba664b
--- /dev/null
@@ -0,0 +1,41 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "set1 B100,#7" } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100 __attribute__ ((__BELOW100__)) =
+{
+0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0};
+unsigned short *p = (unsigned short *) &B100;
+
+void
+Do (void)
+{
+  B100.b7 = 1;
+}
+
+int
+main (void)
+{
+  Do ();
+  return (*p == 0x12b4) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/24_set_b100w_bitfield_8.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/24_set_b100w_bitfield_8.c
new file mode 100644 (file)
index 0000000..2a43500
--- /dev/null
@@ -0,0 +1,41 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "set1 B100\\+1,#0" } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100 __attribute__ ((__BELOW100__)) =
+{
+0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0};
+unsigned short *p = (unsigned short *) &B100;
+
+void
+Do (void)
+{
+  B100.b8 = 1;
+}
+
+int
+main (void)
+{
+  Do ();
+  return (*p == 0x1334) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/24_set_b100w_bitfield_f.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/24_set_b100w_bitfield_f.c
new file mode 100644 (file)
index 0000000..9ae5ce4
--- /dev/null
@@ -0,0 +1,41 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "set1 B100\\+1,#7" } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100 __attribute__ ((__BELOW100__)) =
+{
+0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0};
+unsigned short *p = (unsigned short *) &B100;
+
+void
+Do (void)
+{
+  B100.b15 = 1;
+}
+
+int
+main (void)
+{
+  Do ();
+  return (*p == 0x9234) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/25_clr_b100w_bitfield_0.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/25_clr_b100w_bitfield_0.c
new file mode 100644 (file)
index 0000000..94fdf69
--- /dev/null
@@ -0,0 +1,41 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "clr1 B100,#0" } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100 __attribute__ ((__BELOW100__)) =
+{
+1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1};
+unsigned short *p = (unsigned short *) &B100;
+
+void
+Do (void)
+{
+  B100.b0 = 0;
+}
+
+int
+main (void)
+{
+  Do ();
+  return (*p == 0xedca) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/25_clr_b100w_bitfield_7.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/25_clr_b100w_bitfield_7.c
new file mode 100644 (file)
index 0000000..25f11a6
--- /dev/null
@@ -0,0 +1,41 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "clr1 B100,#7" } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100 __attribute__ ((__BELOW100__)) =
+{
+1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1};
+unsigned short *p = (unsigned short *) &B100;
+
+void
+Do (void)
+{
+  B100.b7 = 0;
+}
+
+int
+main (void)
+{
+  Do ();
+  return (*p == 0xed4b) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/25_clr_b100w_bitfield_8.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/25_clr_b100w_bitfield_8.c
new file mode 100644 (file)
index 0000000..d065be1
--- /dev/null
@@ -0,0 +1,41 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "clr1 B100\\+1,#0" } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100 __attribute__ ((__BELOW100__)) =
+{
+1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1};
+unsigned short *p = (unsigned short *) &B100;
+
+void
+Do (void)
+{
+  B100.b8 = 0;
+}
+
+int
+main (void)
+{
+  Do ();
+  return (*p == 0xeccb) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/25_clr_b100w_bitfield_f.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/25_clr_b100w_bitfield_f.c
new file mode 100644 (file)
index 0000000..4fbe714
--- /dev/null
@@ -0,0 +1,41 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "clr1 B100\\+1,#7" } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100 __attribute__ ((__BELOW100__)) =
+{
+1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1};
+unsigned short *p = (unsigned short *) &B100;
+
+void
+Do (void)
+{
+  B100.b15 = 0;
+}
+
+int
+main (void)
+{
+  Do ();
+  return (*p == 0x6dcb) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/26_if1_b100w_bitfield_0.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/26_if1_b100w_bitfield_0.c
new file mode 100644 (file)
index 0000000..054c0f5
--- /dev/null
@@ -0,0 +1,53 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A,#0," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B,#0," } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100A __attribute__ ((__BELOW100__)) =
+{
+1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1};
+unsigned short *pA = (unsigned short *) &B100A;
+BitField B100B __attribute__ ((__BELOW100__)) =
+{
+0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0};
+unsigned short *pB = (unsigned short *) &B100B;
+
+char *
+Do (void)
+{
+  if (B100A.b0)
+    {
+      if (B100B.b0)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/26_if1_b100w_bitfield_3.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/26_if1_b100w_bitfield_3.c
new file mode 100644 (file)
index 0000000..75ef36b
--- /dev/null
@@ -0,0 +1,53 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A,#3," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B,#3," } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100A __attribute__ ((__BELOW100__)) =
+{
+1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1};
+unsigned short *pA = (unsigned short *) &B100A;
+BitField B100B __attribute__ ((__BELOW100__)) =
+{
+0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0};
+unsigned short *pB = (unsigned short *) &B100B;
+
+char *
+Do (void)
+{
+  if (B100A.b3)
+    {
+      if (B100B.b3)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/26_if1_b100w_bitfield_7.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/26_if1_b100w_bitfield_7.c
new file mode 100644 (file)
index 0000000..45df637
--- /dev/null
@@ -0,0 +1,53 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A,#7," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B,#7," } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100A __attribute__ ((__BELOW100__)) =
+{
+1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1};
+unsigned short *pA = (unsigned short *) &B100A;
+BitField B100B __attribute__ ((__BELOW100__)) =
+{
+0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0};
+unsigned short *pB = (unsigned short *) &B100B;
+
+char *
+Do (void)
+{
+  if (B100A.b7)
+    {
+      if (B100B.b7)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/26_if1_b100w_bitfield_8.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/26_if1_b100w_bitfield_8.c
new file mode 100644 (file)
index 0000000..187a477
--- /dev/null
@@ -0,0 +1,53 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A\\+1,#0," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B\\+1,#0," } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100A __attribute__ ((__BELOW100__)) =
+{
+1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1};
+unsigned short *pA = (unsigned short *) &B100A;
+BitField B100B __attribute__ ((__BELOW100__)) =
+{
+0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0};
+unsigned short *pB = (unsigned short *) &B100B;
+
+char *
+Do (void)
+{
+  if (B100A.b8)
+    {
+      if (B100B.b8)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/26_if1_b100w_bitfield_b.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/26_if1_b100w_bitfield_b.c
new file mode 100644 (file)
index 0000000..8cf4cfd
--- /dev/null
@@ -0,0 +1,53 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A\\+1,#3," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B\\+1,#3," } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100A __attribute__ ((__BELOW100__)) =
+{
+1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1};
+unsigned short *pA = (unsigned short *) &B100A;
+BitField B100B __attribute__ ((__BELOW100__)) =
+{
+0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0};
+unsigned short *pB = (unsigned short *) &B100B;
+
+char *
+Do (void)
+{
+  if (B100A.b11)
+    {
+      if (B100B.b11)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/26_if1_b100w_bitfield_f.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/26_if1_b100w_bitfield_f.c
new file mode 100644 (file)
index 0000000..235cef7
--- /dev/null
@@ -0,0 +1,53 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A\\+1,#7," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B\\+1,#7," } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100A __attribute__ ((__BELOW100__)) =
+{
+1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1};
+unsigned short *pA = (unsigned short *) &B100A;
+BitField B100B __attribute__ ((__BELOW100__)) =
+{
+0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0};
+unsigned short *pB = (unsigned short *) &B100B;
+
+char *
+Do (void)
+{
+  if (B100A.b15)
+    {
+      if (B100B.b15)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/27_if0_b100w_bitfield_0.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/27_if0_b100w_bitfield_0.c
new file mode 100644 (file)
index 0000000..bb80aca
--- /dev/null
@@ -0,0 +1,53 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A,#0," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B,#0," } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100A __attribute__ ((__BELOW100__)) =
+{
+0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0};
+unsigned short *pA = (unsigned short *) &B100A;
+BitField B100B __attribute__ ((__BELOW100__)) =
+{
+1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1};
+unsigned short *pB = (unsigned short *) &B100B;
+
+char *
+Do (void)
+{
+  if (!B100A.b0)
+    {
+      if (!B100B.b0)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/27_if0_b100w_bitfield_3.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/27_if0_b100w_bitfield_3.c
new file mode 100644 (file)
index 0000000..5be5564
--- /dev/null
@@ -0,0 +1,53 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A,#3," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B,#3," } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100A __attribute__ ((__BELOW100__)) =
+{
+0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0};
+unsigned short *pA = (unsigned short *) &B100A;
+BitField B100B __attribute__ ((__BELOW100__)) =
+{
+1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1};
+unsigned short *pB = (unsigned short *) &B100B;
+
+char *
+Do (void)
+{
+  if (!B100A.b3)
+    {
+      if (!B100B.b3)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/27_if0_b100w_bitfield_7.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/27_if0_b100w_bitfield_7.c
new file mode 100644 (file)
index 0000000..0725b55
--- /dev/null
@@ -0,0 +1,53 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A,#7," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B,#7," } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100A __attribute__ ((__BELOW100__)) =
+{
+0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0};
+unsigned short *pA = (unsigned short *) &B100A;
+BitField B100B __attribute__ ((__BELOW100__)) =
+{
+1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1};
+unsigned short *pB = (unsigned short *) &B100B;
+
+char *
+Do (void)
+{
+  if (!B100A.b7)
+    {
+      if (!B100B.b7)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/27_if0_b100w_bitfield_8.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/27_if0_b100w_bitfield_8.c
new file mode 100644 (file)
index 0000000..2ad3642
--- /dev/null
@@ -0,0 +1,53 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A\\+1,#0," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B\\+1,#0," } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100A __attribute__ ((__BELOW100__)) =
+{
+0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0};
+unsigned short *pA = (unsigned short *) &B100A;
+BitField B100B __attribute__ ((__BELOW100__)) =
+{
+1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1};
+unsigned short *pB = (unsigned short *) &B100B;
+
+char *
+Do (void)
+{
+  if (!B100A.b8)
+    {
+      if (!B100B.b8)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/27_if0_b100w_bitfield_b.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/27_if0_b100w_bitfield_b.c
new file mode 100644 (file)
index 0000000..e9af02f
--- /dev/null
@@ -0,0 +1,53 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A\\+1,#3," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B\\+1,#3," } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100A __attribute__ ((__BELOW100__)) =
+{
+0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0};
+unsigned short *pA = (unsigned short *) &B100A;
+BitField B100B __attribute__ ((__BELOW100__)) =
+{
+1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1};
+unsigned short *pB = (unsigned short *) &B100B;
+
+char *
+Do (void)
+{
+  if (!B100A.b11)
+    {
+      if (!B100B.b11)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/data_below100/27_if0_b100w_bitfield_f.c b/gcc/testsuite/gcc.target/xstormy16/data_below100/27_if0_b100w_bitfield_f.c
new file mode 100644 (file)
index 0000000..a13ec8c
--- /dev/null
@@ -0,0 +1,53 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] B100A\\+1,#7," } } */
+/* { dg-final { scan-assembler "b\[np\] B100B\\+1,#7," } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+char acDummy[0xf0] __attribute__ ((__BELOW100__));
+BitField B100A __attribute__ ((__BELOW100__)) =
+{
+0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0};
+unsigned short *pA = (unsigned short *) &B100A;
+BitField B100B __attribute__ ((__BELOW100__)) =
+{
+1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1};
+unsigned short *pB = (unsigned short *) &B100B;
+
+char *
+Do (void)
+{
+  if (!B100A.b15)
+    {
+      if (!B100B.b15)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/01_const_to_sfrb.c b/gcc/testsuite/gcc.target/xstormy16/sfr/01_const_to_sfrb.c
new file mode 100644 (file)
index 0000000..96e4adc
--- /dev/null
@@ -0,0 +1,19 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "mov.b 32532,#18" } } */
+
+#define SFR (*((volatile unsigned char*)0x7f14))
+unsigned char *p = (unsigned char *) 0x7f14;
+
+void
+Do (void)
+{
+  SFR = 0x12;
+}
+
+int
+main (void)
+{
+  *p = 0x34;
+  Do ();
+  return (*p == 0x12) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/02_const_to_sfrw.c b/gcc/testsuite/gcc.target/xstormy16/sfr/02_const_to_sfrw.c
new file mode 100644 (file)
index 0000000..930ba4d
--- /dev/null
@@ -0,0 +1,19 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "mov.w 32532,#4660" } } */
+
+#define SFR (*((volatile unsigned short*)0x7f14))
+unsigned short *p = (unsigned short *) 0x7f14;
+
+void
+Do (void)
+{
+  SFR = 0x1234;
+}
+
+int
+main (void)
+{
+  *p = 0x9876;
+  Do ();
+  return (*p == 0x1234) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/03_var_to_sfrb.c b/gcc/testsuite/gcc.target/xstormy16/sfr/03_var_to_sfrb.c
new file mode 100644 (file)
index 0000000..8c4b1f1
--- /dev/null
@@ -0,0 +1,21 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "mov.b 32532,r" } } */
+
+#define SFR (*((volatile unsigned char*)0x7f14))
+unsigned char *p = (unsigned char *) 0x7f14;
+
+unsigned char yData = 0x12;
+
+void
+Do (void)
+{
+  SFR = yData;
+}
+
+int
+main (void)
+{
+  *p = 0x34;
+  Do ();
+  return (*p == 0x12) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/04_var_to_sfrw.c b/gcc/testsuite/gcc.target/xstormy16/sfr/04_var_to_sfrw.c
new file mode 100644 (file)
index 0000000..c8d4a0e
--- /dev/null
@@ -0,0 +1,21 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "mov.w 32532,r" } } */
+
+#define SFR (*((volatile unsigned short*)0x7f14))
+unsigned short *p = (unsigned short *) 0x7f14;
+
+unsigned short wData = 0x1234;
+
+void
+Do (void)
+{
+  SFR = wData;
+}
+
+int
+main (void)
+{
+  *p = 0x9876;
+  Do ();
+  return (*p == 0x1234) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/05_sfrb_to_var.c b/gcc/testsuite/gcc.target/xstormy16/sfr/05_sfrb_to_var.c
new file mode 100644 (file)
index 0000000..9471e29
--- /dev/null
@@ -0,0 +1,21 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "mov.b r., *32532" } } */
+
+#define SFR (*((volatile unsigned char*)0x7f14))
+unsigned char *p = (unsigned char *) 0x7f14;
+
+unsigned char yData = 0x12;
+
+void
+Do (void)
+{
+  yData = SFR;
+}
+
+int
+main (void)
+{
+  *p = 0x34;
+  Do ();
+  return (yData == 0x34) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/06_sfrw_to_var.c b/gcc/testsuite/gcc.target/xstormy16/sfr/06_sfrw_to_var.c
new file mode 100644 (file)
index 0000000..39cbab5
--- /dev/null
@@ -0,0 +1,21 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "mov.w r6,32532" } } */
+
+#define SFR (*((volatile unsigned short*)0x7f14))
+unsigned short *p = (unsigned short *) 0x7f14;
+
+unsigned short wData = 0x9876;
+
+void
+Do (void)
+{
+  wData = SFR;
+}
+
+int
+main (void)
+{
+  *p = 0x1234;
+  Do ();
+  return (wData == 0x1234) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/10_set_sfrb_bit_0.c b/gcc/testsuite/gcc.target/xstormy16/sfr/10_set_sfrb_bit_0.c
new file mode 100644 (file)
index 0000000..644afb5
--- /dev/null
@@ -0,0 +1,19 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "set1 32532,#0" } } */
+
+#define SFR (*((volatile unsigned char*)0x7f14))
+unsigned char *p = (unsigned char *) 0x7f14;
+
+void
+Do (void)
+{
+  SFR |= 0x01;
+}
+
+int
+main (void)
+{
+  *p = 0x34;
+  Do ();
+  return (*p == 0x35) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/10_set_sfrb_bit_7.c b/gcc/testsuite/gcc.target/xstormy16/sfr/10_set_sfrb_bit_7.c
new file mode 100644 (file)
index 0000000..90cd3c8
--- /dev/null
@@ -0,0 +1,19 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "set1 32532,#7" } } */
+
+#define SFR (*((volatile unsigned char*)0x7f14))
+unsigned char *p = (unsigned char *) 0x7f14;
+
+void
+Do (void)
+{
+  SFR |= 0x80;
+}
+
+int
+main (void)
+{
+  *p = 0x34;
+  Do ();
+  return (*p == 0xb4) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/11_clr_sfrb_bit_0.c b/gcc/testsuite/gcc.target/xstormy16/sfr/11_clr_sfrb_bit_0.c
new file mode 100644 (file)
index 0000000..59d6153
--- /dev/null
@@ -0,0 +1,19 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "clr1 32532,#0" } } */
+
+#define SFR (*((volatile unsigned char*)0x7f14))
+unsigned char *p = (unsigned char *) 0x7f14;
+
+void
+Do (void)
+{
+  SFR &= ~0x01;
+}
+
+int
+main (void)
+{
+  *p = 0xcb;
+  Do ();
+  return (*p == 0xca) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/11_clr_sfrb_bit_7.c b/gcc/testsuite/gcc.target/xstormy16/sfr/11_clr_sfrb_bit_7.c
new file mode 100644 (file)
index 0000000..0cb7e17
--- /dev/null
@@ -0,0 +1,19 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "clr1 32532,#7" } } */
+
+#define SFR (*((volatile unsigned char*)0x7f14))
+unsigned char *p = (unsigned char *) 0x7f14;
+
+void
+Do (void)
+{
+  SFR &= ~0x80;
+}
+
+int
+main (void)
+{
+  *p = 0xcb;
+  Do ();
+  return (*p == 0x4b) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/12_if1_sfrb_bit_0.c b/gcc/testsuite/gcc.target/xstormy16/sfr/12_if1_sfrb_bit_0.c
new file mode 100644 (file)
index 0000000..54b0b1f
--- /dev/null
@@ -0,0 +1,29 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] " } } */
+
+#define SFRA (*((volatile unsigned char*)0x7f14))
+unsigned char *pA = (unsigned char *) 0x7f14;
+#define SFRB (*((volatile unsigned char*)0x7f10))
+unsigned char *pB = (unsigned char *) 0x7f10;
+
+char *
+Do (void)
+{
+  if (SFRA & 0x01)
+    {
+      if (SFRB & 0x01)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0xcb;
+  *pB = 0x34;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/12_if1_sfrb_bit_3.c b/gcc/testsuite/gcc.target/xstormy16/sfr/12_if1_sfrb_bit_3.c
new file mode 100644 (file)
index 0000000..4a575cc
--- /dev/null
@@ -0,0 +1,29 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] " } } */
+
+#define SFRA (*((volatile unsigned char*)0x7f14))
+unsigned char *pA = (unsigned char *) 0x7f14;
+#define SFRB (*((volatile unsigned char*)0x7f10))
+unsigned char *pB = (unsigned char *) 0x7f10;
+
+char *
+Do (void)
+{
+  if (SFRA & 0x08)
+    {
+      if (SFRB & 0x08)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0xcb;
+  *pB = 0x34;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/12_if1_sfrb_bit_7.c b/gcc/testsuite/gcc.target/xstormy16/sfr/12_if1_sfrb_bit_7.c
new file mode 100644 (file)
index 0000000..747cbdd
--- /dev/null
@@ -0,0 +1,29 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] " } } */
+
+#define SFRA (*((volatile unsigned char*)0x7f14))
+unsigned char *pA = (unsigned char *) 0x7f14;
+#define SFRB (*((volatile unsigned char*)0x7f10))
+unsigned char *pB = (unsigned char *) 0x7f10;
+
+char *
+Do (void)
+{
+  if (SFRA & 0x80)
+    {
+      if (SFRB & 0x80)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0xcb;
+  *pB = 0x34;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/13_if0_sfrb_bit_0.c b/gcc/testsuite/gcc.target/xstormy16/sfr/13_if0_sfrb_bit_0.c
new file mode 100644 (file)
index 0000000..d149692
--- /dev/null
@@ -0,0 +1,29 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] " } } */
+
+#define SFRA (*((volatile unsigned char*)0x7f14))
+unsigned char *pA = (unsigned char *) 0x7f14;
+#define SFRB (*((volatile unsigned char*)0x7f10))
+unsigned char *pB = (unsigned char *) 0x7f10;
+
+char *
+Do (void)
+{
+  if (!(SFRA & 0x01))
+    {
+      if (!(SFRB & 0x01))
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0x34;
+  *pB = 0xcb;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/13_if0_sfrb_bit_3.c b/gcc/testsuite/gcc.target/xstormy16/sfr/13_if0_sfrb_bit_3.c
new file mode 100644 (file)
index 0000000..be6112c
--- /dev/null
@@ -0,0 +1,29 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] " } } */
+
+#define SFRA (*((volatile unsigned char*)0x7f14))
+unsigned char *pA = (unsigned char *) 0x7f14;
+#define SFRB (*((volatile unsigned char*)0x7f10))
+unsigned char *pB = (unsigned char *) 0x7f10;
+
+char *
+Do (void)
+{
+  if (!(SFRA & 0x08))
+    {
+      if (!(SFRB & 0x08))
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0x34;
+  *pB = 0xcb;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/13_if0_sfrb_bit_7.c b/gcc/testsuite/gcc.target/xstormy16/sfr/13_if0_sfrb_bit_7.c
new file mode 100644 (file)
index 0000000..12e68cd
--- /dev/null
@@ -0,0 +1,29 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] " } } */
+
+#define SFRA (*((volatile unsigned char*)0x7f14))
+unsigned char *pA = (unsigned char *) 0x7f14;
+#define SFRB (*((volatile unsigned char*)0x7f10))
+unsigned char *pB = (unsigned char *) 0x7f10;
+
+char *
+Do (void)
+{
+  if (!(SFRA & 0x80))
+    {
+      if (!(SFRB & 0x80))
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0x34;
+  *pB = 0xcb;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/14_set_sfrw_bit_0.c b/gcc/testsuite/gcc.target/xstormy16/sfr/14_set_sfrw_bit_0.c
new file mode 100644 (file)
index 0000000..00f4f78
--- /dev/null
@@ -0,0 +1,19 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "mov.w r.,32532" } } */
+
+#define SFR (*((volatile unsigned short*)0x7f14))
+unsigned short *p = (unsigned short *) 0x7f14;
+
+void
+Do (void)
+{
+  SFR |= 0x0001;
+}
+
+int
+main (void)
+{
+  *p = 0x1234;
+  Do ();
+  return (*p == 0x1235) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/14_set_sfrw_bit_3.c b/gcc/testsuite/gcc.target/xstormy16/sfr/14_set_sfrw_bit_3.c
new file mode 100644 (file)
index 0000000..b5741fc
--- /dev/null
@@ -0,0 +1,19 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "mov.w r.,32532" } } */
+
+#define SFR (*((volatile unsigned short*)0x7f14))
+unsigned short *p = (unsigned short *) 0x7f14;
+
+void
+Do (void)
+{
+  SFR |= 0x0008;
+}
+
+int
+main (void)
+{
+  *p = 0x1234;
+  Do ();
+  return (*p == 0x123c) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/14_set_sfrw_bit_7.c b/gcc/testsuite/gcc.target/xstormy16/sfr/14_set_sfrw_bit_7.c
new file mode 100644 (file)
index 0000000..ffcad45
--- /dev/null
@@ -0,0 +1,19 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "mov.w r.,32532" } } */
+
+#define SFR (*((volatile unsigned short*)0x7f14))
+unsigned short *p = (unsigned short *) 0x7f14;
+
+void
+Do (void)
+{
+  SFR |= 0x0080;
+}
+
+int
+main (void)
+{
+  *p = 0x1234;
+  Do ();
+  return (*p == 0x12b4) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/14_set_sfrw_bit_8.c b/gcc/testsuite/gcc.target/xstormy16/sfr/14_set_sfrw_bit_8.c
new file mode 100644 (file)
index 0000000..3f19329
--- /dev/null
@@ -0,0 +1,19 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "mov.w r.,32532" } } */
+
+#define SFR (*((volatile unsigned short*)0x7f14))
+unsigned short *p = (unsigned short *) 0x7f14;
+
+void
+Do (void)
+{
+  SFR |= 0x0100;
+}
+
+int
+main (void)
+{
+  *p = 0x1234;
+  Do ();
+  return (*p == 0x1334) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/14_set_sfrw_bit_b.c b/gcc/testsuite/gcc.target/xstormy16/sfr/14_set_sfrw_bit_b.c
new file mode 100644 (file)
index 0000000..b5e8bb9
--- /dev/null
@@ -0,0 +1,19 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "mov.w r.,32532" } } */
+
+#define SFR (*((volatile unsigned short*)0x7f14))
+unsigned short *p = (unsigned short *) 0x7f14;
+
+void
+Do (void)
+{
+  SFR |= 0x0800;
+}
+
+int
+main (void)
+{
+  *p = 0x1234;
+  Do ();
+  return (*p == 0x1a34) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/14_set_sfrw_bit_f.c b/gcc/testsuite/gcc.target/xstormy16/sfr/14_set_sfrw_bit_f.c
new file mode 100644 (file)
index 0000000..767e95f
--- /dev/null
@@ -0,0 +1,19 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "mov.w r.,32532" } } */
+
+#define SFR (*((volatile unsigned short*)0x7f14))
+unsigned short *p = (unsigned short *) 0x7f14;
+
+void
+Do (void)
+{
+  SFR |= 0x8000;
+}
+
+int
+main (void)
+{
+  *p = 0x1234;
+  Do ();
+  return (*p == 0x9234) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/15_clr_sfrw_bit_0.c b/gcc/testsuite/gcc.target/xstormy16/sfr/15_clr_sfrw_bit_0.c
new file mode 100644 (file)
index 0000000..fcabe09
--- /dev/null
@@ -0,0 +1,19 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "mov.w r.,32532" } } */
+
+#define SFR (*((volatile unsigned short*)0x7f14))
+unsigned short *p = (unsigned short *) 0x7f14;
+
+void
+Do (void)
+{
+  SFR &= ~0x0001;
+}
+
+int
+main (void)
+{
+  *p = 0xedcb;
+  Do ();
+  return (*p == 0xedca) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/15_clr_sfrw_bit_3.c b/gcc/testsuite/gcc.target/xstormy16/sfr/15_clr_sfrw_bit_3.c
new file mode 100644 (file)
index 0000000..26281be
--- /dev/null
@@ -0,0 +1,19 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "mov.w r.,32532" } } */
+
+#define SFR (*((volatile unsigned short*)0x7f14))
+unsigned short *p = (unsigned short *) 0x7f14;
+
+void
+Do (void)
+{
+  SFR &= ~0x0008;
+}
+
+int
+main (void)
+{
+  *p = 0xedcb;
+  Do ();
+  return (*p == 0xedc3) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/15_clr_sfrw_bit_7.c b/gcc/testsuite/gcc.target/xstormy16/sfr/15_clr_sfrw_bit_7.c
new file mode 100644 (file)
index 0000000..15ff063
--- /dev/null
@@ -0,0 +1,19 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "mov.w r.,32532" } } */
+
+#define SFR (*((volatile unsigned short*)0x7f14))
+unsigned short *p = (unsigned short *) 0x7f14;
+
+void
+Do (void)
+{
+  SFR &= ~0x0080;
+}
+
+int
+main (void)
+{
+  *p = 0xedcb;
+  Do ();
+  return (*p == 0xed4b) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/15_clr_sfrw_bit_8.c b/gcc/testsuite/gcc.target/xstormy16/sfr/15_clr_sfrw_bit_8.c
new file mode 100644 (file)
index 0000000..c44817a
--- /dev/null
@@ -0,0 +1,19 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "mov.w r.,32532" } } */
+
+#define SFR (*((volatile unsigned short*)0x7f14))
+unsigned short *p = (unsigned short *) 0x7f14;
+
+void
+Do (void)
+{
+  SFR &= ~0x0100;
+}
+
+int
+main (void)
+{
+  *p = 0xedcb;
+  Do ();
+  return (*p == 0xeccb) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/15_clr_sfrw_bit_b.c b/gcc/testsuite/gcc.target/xstormy16/sfr/15_clr_sfrw_bit_b.c
new file mode 100644 (file)
index 0000000..9f1c3a5
--- /dev/null
@@ -0,0 +1,19 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "mov.w r.,32532" } } */
+
+#define SFR (*((volatile unsigned short*)0x7f14))
+unsigned short *p = (unsigned short *) 0x7f14;
+
+void
+Do (void)
+{
+  SFR &= ~0x0800;
+}
+
+int
+main (void)
+{
+  *p = 0xedcb;
+  Do ();
+  return (*p == 0xe5cb) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/15_clr_sfrw_bit_f.c b/gcc/testsuite/gcc.target/xstormy16/sfr/15_clr_sfrw_bit_f.c
new file mode 100644 (file)
index 0000000..46eef43
--- /dev/null
@@ -0,0 +1,19 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "mov.w r.,32532" } } */
+
+#define SFR (*((volatile unsigned short*)0x7f14))
+unsigned short *p = (unsigned short *) 0x7f14;
+
+void
+Do (void)
+{
+  SFR &= ~0x8000;
+}
+
+int
+main (void)
+{
+  *p = 0xedcb;
+  Do ();
+  return (*p == 0x6dcb) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/16_if1_sfrw_bit_0.c b/gcc/testsuite/gcc.target/xstormy16/sfr/16_if1_sfrw_bit_0.c
new file mode 100644 (file)
index 0000000..287dd7a
--- /dev/null
@@ -0,0 +1,29 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "mov.w r.,32532" } } */
+
+#define SFRA (*((volatile unsigned short*)0x7f14))
+unsigned short *pA = (unsigned short *) 0x7f14;
+#define SFRB (*((volatile unsigned short*)0x7f10))
+unsigned short *pB = (unsigned short *) 0x7f10;
+
+char *
+Do (void)
+{
+  if (SFRA & 0x0001)
+    {
+      if (SFRB & 0x0001)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0xedcb;
+  *pB = 0x1234;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/16_if1_sfrw_bit_3.c b/gcc/testsuite/gcc.target/xstormy16/sfr/16_if1_sfrw_bit_3.c
new file mode 100644 (file)
index 0000000..719fa58
--- /dev/null
@@ -0,0 +1,29 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "mov.w r.,32532" } } */
+
+#define SFRA (*((volatile unsigned short*)0x7f14))
+unsigned short *pA = (unsigned short *) 0x7f14;
+#define SFRB (*((volatile unsigned short*)0x7f10))
+unsigned short *pB = (unsigned short *) 0x7f10;
+
+char *
+Do (void)
+{
+  if (SFRA & 0x0008)
+    {
+      if (SFRB & 0x0008)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0xedcb;
+  *pB = 0x1234;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/16_if1_sfrw_bit_7.c b/gcc/testsuite/gcc.target/xstormy16/sfr/16_if1_sfrw_bit_7.c
new file mode 100644 (file)
index 0000000..1b361c5
--- /dev/null
@@ -0,0 +1,29 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "mov.w r.,32532" } } */
+
+#define SFRA (*((volatile unsigned short*)0x7f14))
+unsigned short *pA = (unsigned short *) 0x7f14;
+#define SFRB (*((volatile unsigned short*)0x7f10))
+unsigned short *pB = (unsigned short *) 0x7f10;
+
+char *
+Do (void)
+{
+  if (SFRA & 0x0080)
+    {
+      if (SFRB & 0x0080)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0xedcb;
+  *pB = 0x1234;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/16_if1_sfrw_bit_8.c b/gcc/testsuite/gcc.target/xstormy16/sfr/16_if1_sfrw_bit_8.c
new file mode 100644 (file)
index 0000000..c8a3ba7
--- /dev/null
@@ -0,0 +1,29 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "mov.w r.,32532" } } */
+
+#define SFRA (*((volatile unsigned short*)0x7f14))
+unsigned short *pA = (unsigned short *) 0x7f14;
+#define SFRB (*((volatile unsigned short*)0x7f10))
+unsigned short *pB = (unsigned short *) 0x7f10;
+
+char *
+Do (void)
+{
+  if (SFRA & 0x0100)
+    {
+      if (SFRB & 0x0100)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0xedcb;
+  *pB = 0x1234;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/16_if1_sfrw_bit_b.c b/gcc/testsuite/gcc.target/xstormy16/sfr/16_if1_sfrw_bit_b.c
new file mode 100644 (file)
index 0000000..a0f5742
--- /dev/null
@@ -0,0 +1,29 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "mov.w r.,32532" } } */
+
+#define SFRA (*((volatile unsigned short*)0x7f14))
+unsigned short *pA = (unsigned short *) 0x7f14;
+#define SFRB (*((volatile unsigned short*)0x7f10))
+unsigned short *pB = (unsigned short *) 0x7f10;
+
+char *
+Do (void)
+{
+  if (SFRA & 0x0800)
+    {
+      if (SFRB & 0x0800)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0xedcb;
+  *pB = 0x1234;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/16_if1_sfrw_bit_f.c b/gcc/testsuite/gcc.target/xstormy16/sfr/16_if1_sfrw_bit_f.c
new file mode 100644 (file)
index 0000000..5e91bb2
--- /dev/null
@@ -0,0 +1,29 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "mov.w r.,32532" } } */
+
+#define SFRA (*((volatile unsigned short*)0x7f14))
+unsigned short *pA = (unsigned short *) 0x7f14;
+#define SFRB (*((volatile unsigned short*)0x7f10))
+unsigned short *pB = (unsigned short *) 0x7f10;
+
+char *
+Do (void)
+{
+  if (SFRA & 0x8000)
+    {
+      if (SFRB & 0x8000)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0xedcb;
+  *pB = 0x1234;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/17_if0_sfrw_bit_0.c b/gcc/testsuite/gcc.target/xstormy16/sfr/17_if0_sfrw_bit_0.c
new file mode 100644 (file)
index 0000000..ac5d87f
--- /dev/null
@@ -0,0 +1,29 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "mov.w r.,32532" } } */
+
+#define SFRA (*((volatile unsigned short*)0x7f14))
+unsigned short *pA = (unsigned short *) 0x7f14;
+#define SFRB (*((volatile unsigned short*)0x7f10))
+unsigned short *pB = (unsigned short *) 0x7f10;
+
+char *
+Do (void)
+{
+  if (!(SFRA & 0x0001))
+    {
+      if (!(SFRB & 0x0001))
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0x1234;
+  *pB = 0xedcb;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/17_if0_sfrw_bit_3.c b/gcc/testsuite/gcc.target/xstormy16/sfr/17_if0_sfrw_bit_3.c
new file mode 100644 (file)
index 0000000..fa77f1b
--- /dev/null
@@ -0,0 +1,29 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "mov.w r.,32532" } } */
+
+#define SFRA (*((volatile unsigned short*)0x7f14))
+unsigned short *pA = (unsigned short *) 0x7f14;
+#define SFRB (*((volatile unsigned short*)0x7f10))
+unsigned short *pB = (unsigned short *) 0x7f10;
+
+char *
+Do (void)
+{
+  if (!(SFRA & 0x0008))
+    {
+      if (!(SFRB & 0x0008))
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0x1234;
+  *pB = 0xedcb;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/17_if0_sfrw_bit_7.c b/gcc/testsuite/gcc.target/xstormy16/sfr/17_if0_sfrw_bit_7.c
new file mode 100644 (file)
index 0000000..cb331f0
--- /dev/null
@@ -0,0 +1,29 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "mov.w r.,32532" } } */
+
+#define SFRA (*((volatile unsigned short*)0x7f14))
+unsigned short *pA = (unsigned short *) 0x7f14;
+#define SFRB (*((volatile unsigned short*)0x7f10))
+unsigned short *pB = (unsigned short *) 0x7f10;
+
+char *
+Do (void)
+{
+  if (!(SFRA & 0x0080))
+    {
+      if (!(SFRB & 0x0080))
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0x1234;
+  *pB = 0xedcb;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/17_if0_sfrw_bit_8.c b/gcc/testsuite/gcc.target/xstormy16/sfr/17_if0_sfrw_bit_8.c
new file mode 100644 (file)
index 0000000..105bf4d
--- /dev/null
@@ -0,0 +1,29 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "mov.w r.,32532" } } */
+
+#define SFRA (*((volatile unsigned short*)0x7f14))
+unsigned short *pA = (unsigned short *) 0x7f14;
+#define SFRB (*((volatile unsigned short*)0x7f10))
+unsigned short *pB = (unsigned short *) 0x7f10;
+
+char *
+Do (void)
+{
+  if (!(SFRA & 0x0100))
+    {
+      if (!(SFRB & 0x0100))
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0x1234;
+  *pB = 0xedcb;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/17_if0_sfrw_bit_b.c b/gcc/testsuite/gcc.target/xstormy16/sfr/17_if0_sfrw_bit_b.c
new file mode 100644 (file)
index 0000000..768cfb9
--- /dev/null
@@ -0,0 +1,29 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "mov.w r.,32532" } } */
+
+#define SFRA (*((volatile unsigned short*)0x7f14))
+unsigned short *pA = (unsigned short *) 0x7f14;
+#define SFRB (*((volatile unsigned short*)0x7f10))
+unsigned short *pB = (unsigned short *) 0x7f10;
+
+char *
+Do (void)
+{
+  if (!(SFRA & 0x0800))
+    {
+      if (!(SFRB & 0x0800))
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0x1234;
+  *pB = 0xedcb;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/17_if0_sfrw_bit_f.c b/gcc/testsuite/gcc.target/xstormy16/sfr/17_if0_sfrw_bit_f.c
new file mode 100644 (file)
index 0000000..533a3c6
--- /dev/null
@@ -0,0 +1,29 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "mov.w r.,32532" } } */
+
+#define SFRA (*((volatile unsigned short*)0x7f14))
+unsigned short *pA = (unsigned short *) 0x7f14;
+#define SFRB (*((volatile unsigned short*)0x7f10))
+unsigned short *pB = (unsigned short *) 0x7f10;
+
+char *
+Do (void)
+{
+  if (!(SFRA & 0x8000))
+    {
+      if (!(SFRB & 0x8000))
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0x1234;
+  *pB = 0xedcb;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/20_set_sfrb_bitfield_0.c b/gcc/testsuite/gcc.target/xstormy16/sfr/20_set_sfrb_bitfield_0.c
new file mode 100644 (file)
index 0000000..3879ed4
--- /dev/null
@@ -0,0 +1,31 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "set1 32532,#0" } } */
+
+typedef struct
+{
+  unsigned char b0:1;
+  unsigned char b1:1;
+  unsigned char b2:1;
+  unsigned char b3:1;
+  unsigned char b4:1;
+  unsigned char b5:1;
+  unsigned char b6:1;
+  unsigned char b7:1;
+} BitField;
+
+#define SFR (*((volatile BitField*)0x7f14))
+unsigned char *p = (unsigned char *) 0x7f14;
+
+void
+Do (void)
+{
+  SFR.b0 = 1;
+}
+
+int
+main (void)
+{
+  *p = 0x34;
+  Do ();
+  return (*p == 0x35) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/20_set_sfrb_bitfield_7.c b/gcc/testsuite/gcc.target/xstormy16/sfr/20_set_sfrb_bitfield_7.c
new file mode 100644 (file)
index 0000000..1b7bb87
--- /dev/null
@@ -0,0 +1,31 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "set1 32532,#7" } } */
+
+typedef struct
+{
+  unsigned char b0:1;
+  unsigned char b1:1;
+  unsigned char b2:1;
+  unsigned char b3:1;
+  unsigned char b4:1;
+  unsigned char b5:1;
+  unsigned char b6:1;
+  unsigned char b7:1;
+} BitField;
+
+#define SFR (*((volatile BitField*)0x7f14))
+unsigned char *p = (unsigned char *) 0x7f14;
+
+void
+Do (void)
+{
+  SFR.b7 = 1;
+}
+
+int
+main (void)
+{
+  *p = 0x34;
+  Do ();
+  return (*p == 0xb4) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/21_clr_sfrb_bitfield_0.c b/gcc/testsuite/gcc.target/xstormy16/sfr/21_clr_sfrb_bitfield_0.c
new file mode 100644 (file)
index 0000000..6f73231
--- /dev/null
@@ -0,0 +1,31 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "clr1 32532,#0" } } */
+
+typedef struct
+{
+  unsigned char b0:1;
+  unsigned char b1:1;
+  unsigned char b2:1;
+  unsigned char b3:1;
+  unsigned char b4:1;
+  unsigned char b5:1;
+  unsigned char b6:1;
+  unsigned char b7:1;
+} BitField;
+
+#define SFR (*((volatile BitField*)0x7f14))
+unsigned char *p = (unsigned char *) 0x7f14;
+
+void
+Do (void)
+{
+  SFR.b0 = 0;
+}
+
+int
+main (void)
+{
+  *p = 0xcb;
+  Do ();
+  return (*p == 0xca) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/21_clr_sfrb_bitfield_7.c b/gcc/testsuite/gcc.target/xstormy16/sfr/21_clr_sfrb_bitfield_7.c
new file mode 100644 (file)
index 0000000..10063e4
--- /dev/null
@@ -0,0 +1,31 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "clr1 32532,#7" } } */
+
+typedef struct
+{
+  unsigned char b0:1;
+  unsigned char b1:1;
+  unsigned char b2:1;
+  unsigned char b3:1;
+  unsigned char b4:1;
+  unsigned char b5:1;
+  unsigned char b6:1;
+  unsigned char b7:1;
+} BitField;
+
+#define SFR (*((volatile BitField*)0x7f14))
+unsigned char *p = (unsigned char *) 0x7f14;
+
+void
+Do (void)
+{
+  SFR.b7 = 0;
+}
+
+int
+main (void)
+{
+  *p = 0xcb;
+  Do ();
+  return (*p == 0x4b) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/22_if1_sfrb_bitfield_0.c b/gcc/testsuite/gcc.target/xstormy16/sfr/22_if1_sfrb_bitfield_0.c
new file mode 100644 (file)
index 0000000..bb8489b
--- /dev/null
@@ -0,0 +1,41 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] " } } */
+
+typedef struct
+{
+  unsigned char b0:1;
+  unsigned char b1:1;
+  unsigned char b2:1;
+  unsigned char b3:1;
+  unsigned char b4:1;
+  unsigned char b5:1;
+  unsigned char b6:1;
+  unsigned char b7:1;
+} BitField;
+
+#define SFRA (*((volatile BitField*)0x7f14))
+unsigned char *pA = (unsigned char *) 0x7f14;
+#define SFRB (*((volatile BitField*)0x7f10))
+unsigned char *pB = (unsigned char *) 0x7f10;
+
+char *
+Do (void)
+{
+  if (SFRA.b0)
+    {
+      if (SFRB.b0)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0xcb;
+  *pB = 0x34;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/22_if1_sfrb_bitfield_3.c b/gcc/testsuite/gcc.target/xstormy16/sfr/22_if1_sfrb_bitfield_3.c
new file mode 100644 (file)
index 0000000..96b441c
--- /dev/null
@@ -0,0 +1,41 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] " } } */
+
+typedef struct
+{
+  unsigned char b0:1;
+  unsigned char b1:1;
+  unsigned char b2:1;
+  unsigned char b3:1;
+  unsigned char b4:1;
+  unsigned char b5:1;
+  unsigned char b6:1;
+  unsigned char b7:1;
+} BitField;
+
+#define SFRA (*((volatile BitField*)0x7f14))
+unsigned char *pA = (unsigned char *) 0x7f14;
+#define SFRB (*((volatile BitField*)0x7f10))
+unsigned char *pB = (unsigned char *) 0x7f10;
+
+char *
+Do (void)
+{
+  if (SFRA.b3)
+    {
+      if (SFRB.b3)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0xcb;
+  *pB = 0x34;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/22_if1_sfrb_bitfield_7.c b/gcc/testsuite/gcc.target/xstormy16/sfr/22_if1_sfrb_bitfield_7.c
new file mode 100644 (file)
index 0000000..ad7bebd
--- /dev/null
@@ -0,0 +1,41 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] " } } */
+
+typedef struct
+{
+  unsigned char b0:1;
+  unsigned char b1:1;
+  unsigned char b2:1;
+  unsigned char b3:1;
+  unsigned char b4:1;
+  unsigned char b5:1;
+  unsigned char b6:1;
+  unsigned char b7:1;
+} BitField;
+
+#define SFRA (*((volatile BitField*)0x7f14))
+unsigned char *pA = (unsigned char *) 0x7f14;
+#define SFRB (*((volatile BitField*)0x7f10))
+unsigned char *pB = (unsigned char *) 0x7f10;
+
+char *
+Do (void)
+{
+  if (SFRA.b7)
+    {
+      if (SFRB.b7)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0xcb;
+  *pB = 0x34;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/23_if0_sfrb_bitfield_0.c b/gcc/testsuite/gcc.target/xstormy16/sfr/23_if0_sfrb_bitfield_0.c
new file mode 100644 (file)
index 0000000..dfa59a9
--- /dev/null
@@ -0,0 +1,41 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] " } } */
+
+typedef struct
+{
+  unsigned char b0:1;
+  unsigned char b1:1;
+  unsigned char b2:1;
+  unsigned char b3:1;
+  unsigned char b4:1;
+  unsigned char b5:1;
+  unsigned char b6:1;
+  unsigned char b7:1;
+} BitField;
+
+#define SFRA (*((volatile BitField*)0x7f14))
+unsigned char *pA = (unsigned char *) 0x7f14;
+#define SFRB (*((volatile BitField*)0x7f10))
+unsigned char *pB = (unsigned char *) 0x7f10;
+
+char *
+Do (void)
+{
+  if (!SFRA.b0)
+    {
+      if (!SFRB.b0)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0x34;
+  *pB = 0xcb;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/23_if0_sfrb_bitfield_3.c b/gcc/testsuite/gcc.target/xstormy16/sfr/23_if0_sfrb_bitfield_3.c
new file mode 100644 (file)
index 0000000..c311877
--- /dev/null
@@ -0,0 +1,41 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] " } } */
+
+typedef struct
+{
+  unsigned char b0:1;
+  unsigned char b1:1;
+  unsigned char b2:1;
+  unsigned char b3:1;
+  unsigned char b4:1;
+  unsigned char b5:1;
+  unsigned char b6:1;
+  unsigned char b7:1;
+} BitField;
+
+#define SFRA (*((volatile BitField*)0x7f14))
+unsigned char *pA = (unsigned char *) 0x7f14;
+#define SFRB (*((volatile BitField*)0x7f10))
+unsigned char *pB = (unsigned char *) 0x7f10;
+
+char *
+Do (void)
+{
+  if (!SFRA.b3)
+    {
+      if (!SFRB.b3)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0x34;
+  *pB = 0xcb;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/23_if0_sfrb_bitfield_7.c b/gcc/testsuite/gcc.target/xstormy16/sfr/23_if0_sfrb_bitfield_7.c
new file mode 100644 (file)
index 0000000..2e4eea9
--- /dev/null
@@ -0,0 +1,41 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "b\[np\] " } } */
+
+typedef struct
+{
+  unsigned char b0:1;
+  unsigned char b1:1;
+  unsigned char b2:1;
+  unsigned char b3:1;
+  unsigned char b4:1;
+  unsigned char b5:1;
+  unsigned char b6:1;
+  unsigned char b7:1;
+} BitField;
+
+#define SFRA (*((volatile BitField*)0x7f14))
+unsigned char *pA = (unsigned char *) 0x7f14;
+#define SFRB (*((volatile BitField*)0x7f10))
+unsigned char *pB = (unsigned char *) 0x7f10;
+
+char *
+Do (void)
+{
+  if (!SFRA.b7)
+    {
+      if (!SFRB.b7)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0x34;
+  *pB = 0xcb;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/24_set_sfrw_bitfield_0.c b/gcc/testsuite/gcc.target/xstormy16/sfr/24_set_sfrw_bitfield_0.c
new file mode 100644 (file)
index 0000000..d235168
--- /dev/null
@@ -0,0 +1,39 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "set1 32532,#0" } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+#define SFR (*((volatile BitField*)0x7f14))
+unsigned short *p = (unsigned short *) 0x7f14;
+
+void
+Do (void)
+{
+  SFR.b0 = 1;
+}
+
+int
+main (void)
+{
+  *p = 0x1234;
+  Do ();
+  return (*p == 0x1235) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/24_set_sfrw_bitfield_7.c b/gcc/testsuite/gcc.target/xstormy16/sfr/24_set_sfrw_bitfield_7.c
new file mode 100644 (file)
index 0000000..6f1cf87
--- /dev/null
@@ -0,0 +1,39 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "set1 32532,#7" } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+#define SFR (*((volatile BitField*)0x7f14))
+unsigned short *p = (unsigned short *) 0x7f14;
+
+void
+Do (void)
+{
+  SFR.b7 = 1;
+}
+
+int
+main (void)
+{
+  *p = 0x1234;
+  Do ();
+  return (*p == 0x12b4) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/24_set_sfrw_bitfield_8.c b/gcc/testsuite/gcc.target/xstormy16/sfr/24_set_sfrw_bitfield_8.c
new file mode 100644 (file)
index 0000000..9de4c0d
--- /dev/null
@@ -0,0 +1,39 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "set1 32533,#0" } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+#define SFR (*((volatile BitField*)0x7f14))
+unsigned short *p = (unsigned short *) 0x7f14;
+
+void
+Do (void)
+{
+  SFR.b8 = 1;
+}
+
+int
+main (void)
+{
+  *p = 0x1234;
+  Do ();
+  return (*p == 0x1334) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/24_set_sfrw_bitfield_f.c b/gcc/testsuite/gcc.target/xstormy16/sfr/24_set_sfrw_bitfield_f.c
new file mode 100644 (file)
index 0000000..e89757f
--- /dev/null
@@ -0,0 +1,39 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "set1 32533,#7" } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+#define SFR (*((volatile BitField*)0x7f14))
+unsigned short *p = (unsigned short *) 0x7f14;
+
+void
+Do (void)
+{
+  SFR.b15 = 1;
+}
+
+int
+main (void)
+{
+  *p = 0x1234;
+  Do ();
+  return (*p == 0x9234) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/25_clr_sfrw_bitfield_0.c b/gcc/testsuite/gcc.target/xstormy16/sfr/25_clr_sfrw_bitfield_0.c
new file mode 100644 (file)
index 0000000..5acd858
--- /dev/null
@@ -0,0 +1,39 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "clr1 32532,#0" } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+#define SFR (*((volatile BitField*)0x7f14))
+unsigned short *p = (unsigned short *) 0x7f14;
+
+void
+Do (void)
+{
+  SFR.b0 = 0;
+}
+
+int
+main (void)
+{
+  *p = 0xedcb;
+  Do ();
+  return (*p == 0xedca) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/25_clr_sfrw_bitfield_7.c b/gcc/testsuite/gcc.target/xstormy16/sfr/25_clr_sfrw_bitfield_7.c
new file mode 100644 (file)
index 0000000..112714e
--- /dev/null
@@ -0,0 +1,39 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "clr1 32532,#7" } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+#define SFR (*((volatile BitField*)0x7f14))
+unsigned short *p = (unsigned short *) 0x7f14;
+
+void
+Do (void)
+{
+  SFR.b7 = 0;
+}
+
+int
+main (void)
+{
+  *p = 0xedcb;
+  Do ();
+  return (*p == 0xed4b) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/25_clr_sfrw_bitfield_8.c b/gcc/testsuite/gcc.target/xstormy16/sfr/25_clr_sfrw_bitfield_8.c
new file mode 100644 (file)
index 0000000..015f9bc
--- /dev/null
@@ -0,0 +1,39 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "clr1 32533,#0" } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+#define SFR (*((volatile BitField*)0x7f14))
+unsigned short *p = (unsigned short *) 0x7f14;
+
+void
+Do (void)
+{
+  SFR.b8 = 0;
+}
+
+int
+main (void)
+{
+  *p = 0xedcb;
+  Do ();
+  return (*p == 0xeccb) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/25_clr_sfrw_bitfield_f.c b/gcc/testsuite/gcc.target/xstormy16/sfr/25_clr_sfrw_bitfield_f.c
new file mode 100644 (file)
index 0000000..0c85ffa
--- /dev/null
@@ -0,0 +1,39 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "clr1 32533,#7" } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+#define SFR (*((volatile BitField*)0x7f14))
+unsigned short *p = (unsigned short *) 0x7f14;
+
+void
+Do (void)
+{
+  SFR.b15 = 0;
+}
+
+int
+main (void)
+{
+  *p = 0xedcb;
+  Do ();
+  return (*p == 0x6dcb) ? 0 : 1;
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/26_if1_sfrw_bitfield_0.c b/gcc/testsuite/gcc.target/xstormy16/sfr/26_if1_sfrw_bitfield_0.c
new file mode 100644 (file)
index 0000000..d4861b2
--- /dev/null
@@ -0,0 +1,49 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "bn 32532,#0" } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+#define SFRA (*((volatile BitField*)0x7f14))
+unsigned short *pA = (unsigned short *) 0x7f14;
+#define SFRB (*((volatile BitField*)0x7f10))
+unsigned short *pB = (unsigned short *) 0x7f10;
+
+char *
+Do (void)
+{
+  if (SFRA.b0)
+    {
+      if (SFRB.b0)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0xedcb;
+  *pB = 0x1234;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/26_if1_sfrw_bitfield_3.c b/gcc/testsuite/gcc.target/xstormy16/sfr/26_if1_sfrw_bitfield_3.c
new file mode 100644 (file)
index 0000000..5318305
--- /dev/null
@@ -0,0 +1,49 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "bn 32532,#3" } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+#define SFRA (*((volatile BitField*)0x7f14))
+unsigned short *pA = (unsigned short *) 0x7f14;
+#define SFRB (*((volatile BitField*)0x7f10))
+unsigned short *pB = (unsigned short *) 0x7f10;
+
+char *
+Do (void)
+{
+  if (SFRA.b3)
+    {
+      if (SFRB.b3)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0xedcb;
+  *pB = 0x1234;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/26_if1_sfrw_bitfield_7.c b/gcc/testsuite/gcc.target/xstormy16/sfr/26_if1_sfrw_bitfield_7.c
new file mode 100644 (file)
index 0000000..85b86a0
--- /dev/null
@@ -0,0 +1,49 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "mov.b r., *32532" } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+#define SFRA (*((volatile BitField*)0x7f14))
+unsigned short *pA = (unsigned short *) 0x7f14;
+#define SFRB (*((volatile BitField*)0x7f10))
+unsigned short *pB = (unsigned short *) 0x7f10;
+
+char *
+Do (void)
+{
+  if (SFRA.b7)
+    {
+      if (SFRB.b7)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0xedcb;
+  *pB = 0x1234;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/26_if1_sfrw_bitfield_8.c b/gcc/testsuite/gcc.target/xstormy16/sfr/26_if1_sfrw_bitfield_8.c
new file mode 100644 (file)
index 0000000..65412e3
--- /dev/null
@@ -0,0 +1,49 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "bn 32533,#0" } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+#define SFRA (*((volatile BitField*)0x7f14))
+unsigned short *pA = (unsigned short *) 0x7f14;
+#define SFRB (*((volatile BitField*)0x7f10))
+unsigned short *pB = (unsigned short *) 0x7f10;
+
+char *
+Do (void)
+{
+  if (SFRA.b8)
+    {
+      if (SFRB.b8)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0xedcb;
+  *pB = 0x1234;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/26_if1_sfrw_bitfield_b.c b/gcc/testsuite/gcc.target/xstormy16/sfr/26_if1_sfrw_bitfield_b.c
new file mode 100644 (file)
index 0000000..951db3f
--- /dev/null
@@ -0,0 +1,49 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "bn 32533,#3" } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+#define SFRA (*((volatile BitField*)0x7f14))
+unsigned short *pA = (unsigned short *) 0x7f14;
+#define SFRB (*((volatile BitField*)0x7f10))
+unsigned short *pB = (unsigned short *) 0x7f10;
+
+char *
+Do (void)
+{
+  if (SFRA.b11)
+    {
+      if (SFRB.b11)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0xedcb;
+  *pB = 0x1234;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/26_if1_sfrw_bitfield_f.c b/gcc/testsuite/gcc.target/xstormy16/sfr/26_if1_sfrw_bitfield_f.c
new file mode 100644 (file)
index 0000000..b51daa8
--- /dev/null
@@ -0,0 +1,49 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "mov.b r., *32533" } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+#define SFRA (*((volatile BitField*)0x7f14))
+unsigned short *pA = (unsigned short *) 0x7f14;
+#define SFRB (*((volatile BitField*)0x7f10))
+unsigned short *pB = (unsigned short *) 0x7f10;
+
+char *
+Do (void)
+{
+  if (SFRA.b15)
+    {
+      if (SFRB.b15)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0xedcb;
+  *pB = 0x1234;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/27_if0_sfrw_bitfield_0.c b/gcc/testsuite/gcc.target/xstormy16/sfr/27_if0_sfrw_bitfield_0.c
new file mode 100644 (file)
index 0000000..0680d4f
--- /dev/null
@@ -0,0 +1,49 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "bp 32532,#0" } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+#define SFRA (*((volatile BitField*)0x7f14))
+unsigned short *pA = (unsigned short *) 0x7f14;
+#define SFRB (*((volatile BitField*)0x7f10))
+unsigned short *pB = (unsigned short *) 0x7f10;
+
+char *
+Do (void)
+{
+  if (!SFRA.b0)
+    {
+      if (!SFRB.b0)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0x1234;
+  *pB = 0xedcb;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/27_if0_sfrw_bitfield_3.c b/gcc/testsuite/gcc.target/xstormy16/sfr/27_if0_sfrw_bitfield_3.c
new file mode 100644 (file)
index 0000000..17f07f9
--- /dev/null
@@ -0,0 +1,49 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "bp 32532,#3" } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+#define SFRA (*((volatile BitField*)0x7f14))
+unsigned short *pA = (unsigned short *) 0x7f14;
+#define SFRB (*((volatile BitField*)0x7f10))
+unsigned short *pB = (unsigned short *) 0x7f10;
+
+char *
+Do (void)
+{
+  if (!SFRA.b3)
+    {
+      if (!SFRB.b3)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0x1234;
+  *pB = 0xedcb;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/27_if0_sfrw_bitfield_7.c b/gcc/testsuite/gcc.target/xstormy16/sfr/27_if0_sfrw_bitfield_7.c
new file mode 100644 (file)
index 0000000..2c1cab8
--- /dev/null
@@ -0,0 +1,49 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "mov.b r., *32532" } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+#define SFRA (*((volatile BitField*)0x7f14))
+unsigned short *pA = (unsigned short *) 0x7f14;
+#define SFRB (*((volatile BitField*)0x7f10))
+unsigned short *pB = (unsigned short *) 0x7f10;
+
+char *
+Do (void)
+{
+  if (!SFRA.b7)
+    {
+      if (!SFRB.b7)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0x1234;
+  *pB = 0xedcb;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/27_if0_sfrw_bitfield_8.c b/gcc/testsuite/gcc.target/xstormy16/sfr/27_if0_sfrw_bitfield_8.c
new file mode 100644 (file)
index 0000000..2353cad
--- /dev/null
@@ -0,0 +1,49 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "bp 32533,#0" } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+#define SFRA (*((volatile BitField*)0x7f14))
+unsigned short *pA = (unsigned short *) 0x7f14;
+#define SFRB (*((volatile BitField*)0x7f10))
+unsigned short *pB = (unsigned short *) 0x7f10;
+
+char *
+Do (void)
+{
+  if (!SFRA.b8)
+    {
+      if (!SFRB.b8)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0x1234;
+  *pB = 0xedcb;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/27_if0_sfrw_bitfield_b.c b/gcc/testsuite/gcc.target/xstormy16/sfr/27_if0_sfrw_bitfield_b.c
new file mode 100644 (file)
index 0000000..123cb06
--- /dev/null
@@ -0,0 +1,49 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "bp 32533,#3" } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+#define SFRA (*((volatile BitField*)0x7f14))
+unsigned short *pA = (unsigned short *) 0x7f14;
+#define SFRB (*((volatile BitField*)0x7f10))
+unsigned short *pB = (unsigned short *) 0x7f10;
+
+char *
+Do (void)
+{
+  if (!SFRA.b11)
+    {
+      if (!SFRB.b11)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0x1234;
+  *pB = 0xedcb;
+  return Do ()[0] == 'F';
+}
diff --git a/gcc/testsuite/gcc.target/xstormy16/sfr/27_if0_sfrw_bitfield_f.c b/gcc/testsuite/gcc.target/xstormy16/sfr/27_if0_sfrw_bitfield_f.c
new file mode 100644 (file)
index 0000000..daf5090
--- /dev/null
@@ -0,0 +1,49 @@
+/* { dg-options { -nostartfiles below100.o -Tbelow100.ld -O2 } } */
+/* { dg-final { scan-assembler "mov.b r., *32533" } } */
+
+typedef struct
+{
+  unsigned short b0:1;
+  unsigned short b1:1;
+  unsigned short b2:1;
+  unsigned short b3:1;
+  unsigned short b4:1;
+  unsigned short b5:1;
+  unsigned short b6:1;
+  unsigned short b7:1;
+  unsigned short b8:1;
+  unsigned short b9:1;
+  unsigned short b10:1;
+  unsigned short b11:1;
+  unsigned short b12:1;
+  unsigned short b13:1;
+  unsigned short b14:1;
+  unsigned short b15:1;
+} BitField;
+
+#define SFRA (*((volatile BitField*)0x7f14))
+unsigned short *pA = (unsigned short *) 0x7f14;
+#define SFRB (*((volatile BitField*)0x7f10))
+unsigned short *pB = (unsigned short *) 0x7f10;
+
+char *
+Do (void)
+{
+  if (!SFRA.b15)
+    {
+      if (!SFRB.b15)
+       return "Fail";
+      else
+       return "Success";
+    }
+  else
+    return "Fail";
+}
+
+int
+main (void)
+{
+  *pA = 0x1234;
+  *pB = 0xedcb;
+  return Do ()[0] == 'F';
+}
index 2961cf1..49d32ec 100644 (file)
@@ -6,18 +6,37 @@ if {![istarget xstormy16-*-*]} {
 
 load_lib gcc-dg.exp
 
-# If a testcase doesn't have special options, use these.
-global DEFAULT_CFLAGS
-if ![info exists DEFAULT_CFLAGS] then {
-    set DEFAULT_CFLAGS " -ansi -pedantic-errors"
-}
-
 # Initialize `dg'.
 dg-init
 
+# Assemble the below100.S file which contains
+# support code for the rest of the tests.
+set old-dg-do-what-default "${dg-do-what-default}"
+set dg-do-what-default assemble
+dg-test -keep-output "$srcdir/$subdir/below100.S" "" ""
+set dg-do-what-default run
+
+
 # Main loop.
-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] \
-       "" $DEFAULT_CFLAGS
+foreach testcase [lsort [find $srcdir/$subdir *.c]] {
+    global test_counts;
+
+    set base "[file rootname [file tail $testcase]]"
+
+    if ![runtest_file_p $runtests $testcase] {
+        continue
+    }
+
+    set fails_before $test_counts(FAIL,count)
+    dg-test $testcase "--save-temps -fno-inline-functions -L$srcdir/$subdir" ""
+    set fails_after $test_counts(FAIL,count)
+
+    if { $fails_before == $fails_after } {
+        catch "exec rm -f $base.i $base.s $base.o"
+    }
+}
+
+set dg-do-what-default "${old-dg-do-what-default}"
 
 # All done.
 dg-finish