Commit de40e4dd by Nick Clifton Committed by Nick Clifton

Add new tests for xstormy16

From-SVN: r91870
parent 75d0ac8d
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
......
/******************************************************************
*** ***
*** crt0 for __BELOW100__ attribute test with SID ***
*** ***
******************************************************************/
/*************************************/
/** Interrupt vectors at 0x8000 **/
/*************************************/
.section .int_vec,"ax"
.global _start
.align 1
_start:
jmpf _int_reset
//jmpf _int_basetimer
//jmpf _int_timer0
//jmpf _int_timer1
//jmpf _int_irq_4
//jmpf _int_irq_5
//jmpf _int_port0
//jmpf _int_port1
//jmpf _int_irq_8
//jmpf _int_irq_9
//jmpf _int_irq_a
//jmpf _int_irq_b
//jmpf _int_irq_c
//jmpf _int_irq_d
//jmpf _int_irq_e
//jmpf _int_irq_f
/*************************************/
/** reset code **/
/*************************************/
.text
_int_reset:
/*************************************/
/** setup stack pointer **/
/*************************************/
mov sp,#__stack
/*************************************/
/** zero .bss section **/
/*************************************/
mov r0,#__bss_start
mov r1,#__bss_end
mov r2,#0
1: mov.w (r0++),r2
blt r0,r1,1b
/*************************************/
/** copy inital value for .data **/
/*************************************/
mov r1,#__data_start
mov r3,#__data_end
mov r0,#@lo(__rdata)
mov r8,#@hi(__rdata)
2: movf.w r2,(r0++)
bnz r0,#0,3f
add r8,#1
3: mov.w (r1++),r2
blt r1,r3,2b
/*************************************/
/** call hardware init routine **/
/*************************************/
callf _hwinit
/*************************************/
/** call initializaton routines **/
/*************************************/
callf _init
/*************************************/
/** setup fini routines to be **/
/** called from exit **/
/*************************************/
mov r2,#@fptr(_fini)
callf atexit
/*************************************/
/** call main() with empty **/
/** argc/argv/envp **/
/*************************************/
mov r2,#0
mov r3,#0
mov r4,#0
callf main
/*************************************/
/** return from main() **/
/*************************************/
callf exit
/*************************************/
/** should never reach this code **/
/*************************************/
jmpf _start
/*************************************/
/** default h/w initialize routine **/
/** and default _init/_finit for **/
/** -nostartfiles option **/
/*************************************/
.globl _hwinit
.weak _hwinit
_hwinit:
.globl _init
.weak _init
_init:
.globl _fini
.weak _fini
_fini:
ret
/******************************************************************
*******************************************************************
*** ***
*** Chip information data for LC59_32K ***
*** Written by T.Matsukawa ***
*** ***
*******************************************************************
******************************************************************/
/*************************************/
/** Define convenient macros **/
/*************************************/
#define BCD(x) (((x)/10)%10)*0x10+((x)%10)
#define BCD4(x) BCD((x)/100),BCD(x)
#define BCD6(x) BCD((x)/10000),BCD((x)/100),BCD(x)
/*************************************/
/** Define memory sizes **/
/*************************************/
#define RAM_SIZE 0x7E00
#define ROM_SIZE 0x78000
#define VRAM_SIZE 0x0000
#define VRAM_ROW 0
#define VRAM_COLUMN 0
#define CGROM_SIZE 0x0000
#define PROTECT_SIZE 0x0000
/*************************************/
/** section ".chip_info" **/
/*************************************/
.section .chip_info,"a"
.space 0xb8,0x00
/*************************************/
/** B8-BB : User option address **/
/*************************************/
.word 0x00000
.global __reset_vector
#if 0x00000==0
.equ __reset_vector,0x08000
#else
.equ __reset_vector,0x00000
#endif
/*************************************/
/** BC-BF : Flash Protect address **/
/*************************************/
#if PROTECT_SIZE==0
.word 0x00000000
#else
.word 0x08000+ROM_SIZE-PROTECT_SIZE
#endif
/*************************************/
/** C0-CF : Fixed string **/
/*************************************/
.ascii "CHIPINFORMATION"
1: .space (0xd0-1b),0x00
/*************************************/
/** D0-DF : Chipname **/
/*************************************/
.ascii "LC59_32K"
2: .space (0xe0-2b),0x00
/*************************************/
/** E0-E1 : Format version(BCD4) **/
/*************************************/
.byte 0x10, 0x00
.space 6, 0x00
/*************************************/
/** E8-F5 : Memory sizes **/
/*************************************/
.byte BCD4(ROM_SIZE/1024)
.byte BCD6(RAM_SIZE)
.byte BCD6(VRAM_SIZE)
.byte BCD4(VRAM_ROW)
.byte BCD4(VRAM_COLUMN)
.byte BCD4(CGROM_SIZE/1024)
.space 3, 0x00
/*************************************/
/** F9 : Package type **/
/*************************************/
.byte 0xff
.space 6, 0x00
/*************************************/
/** In order to link BIOS in library**/
/*************************************/
.equ dummy,__bios_entry
/******************************************************************
*******************************************************************
*** ***
*** 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) }
}
/* { 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__));
......
/* { 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 ();
}
/* { 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;
}
/* { 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;
}
/* { 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;
}
/* { 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;
}
/* { 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;
}
/* { 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;
}
/* { 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;
}
/* { 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;
}
/* { 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;
}
/* { 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;
}
/* { 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';
}
/* { 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';
}
/* { 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';
}
/* { 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';
}
/* { 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';
}
/* { 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';
}
/* { 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;
}
/* { 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;
}
/* { 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;
}
/* { 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;
}
/* { 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;
}
/* { 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;
}
/* { 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;
}
/* { 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;
}
/* { 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';
}
/* { 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';
}
/* { 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';
}
/* { 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';
}
/* { 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';
}
/* { 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';
}
/* { 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';
}
/* { 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';
}
/* { 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';
}
/* { 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';
}
/* { 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';
}
/* { 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';
}
/* { 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;
}
/* { 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;
}
/* { 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;
}
/* { 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;
}
/* { 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';
}
/* { 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';
}
/* { 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';
}
/* { 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';
}
/* { 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';
}
/* { 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';
}
/* { 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;
}
/* { 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;
}
/* { 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;
}
/* { 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;
}
/* { 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;
}
/* { 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;
}
/* { 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;
}
/* { 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;
}
/* { 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';
}
/* { 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';
}
/* { 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';
}
/* { 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';
}
/* { 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';
}
/* { 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';
}
/* { 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';
}
/* { 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';
}
/* { 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';
}
/* { 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';
}
/* { 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';
}
/* { 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';
}
/* { 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;
}
/* { 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;
}
/* { 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;
}
/* { 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;
}
/* { 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;
}
/* { 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;
}
/* { 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;
}
/* { 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;
}
/* { 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;
}
/* { 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;
}
/* { 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';
}
/* { 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';
}
/* { 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';
}
/* { 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';
}
/* { 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';
}
/* { 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';
}
/* { 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;
}
/* { 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;
}
/* { 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;
}
/* { 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;
}
/* { 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;
}
/* { 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;
}
/* { 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;
}
/* { 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;
}
/* { 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';
}
/* { 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';
}
/* { 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';
}
/* { 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';
}
/* { 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';
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment