[Bug target/59593] [arm big-endian] using "ldrh" access a immediate which stored in a memory by word
wad at infinet dot ru
gcc-bugzilla@gcc.gnu.org
Tue Jun 2 06:28:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59593
Andrew <wad at infinet dot ru> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |wad at infinet dot ru
--- Comment #10 from Andrew <wad at infinet dot ru> ---
Same bug int gcc 4.9.2
Command line:
arm-rtems-gcc -S -O2 -mbig-endian testbige.c
File testbige.c:
struct test1_s
{
unsigned short st;
};
struct test1_s f1(void)
{
struct test1_s v = {258};
return v;
}
Generated code:
.cpu arm7tdmi
.fpu softvfp
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 2
.eabi_attribute 34, 0
.eabi_attribute 18, 4
.file "testbige.c"
.text
.align 2
.global f1
.type f1, %function
f1:
@ Function supports interworking.
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 0, uses_anonymous_args = 0
@ link register save eliminated.
ldrh r0, .L2 @ movhi
mov r0, r0, asl #16
bx lr
.L3:
.align 2
.L2:
.word 258
.size f1, .-f1
.ident "GCC: (GNU) 4.9.2"
More information about the Gcc-bugs
mailing list