[Bug target/64516] [4.x Regression] arm: wrong unaligned load generated
markus at oberhumer dot com
gcc-bugzilla@gcc.gnu.org
Thu Feb 5 12:34:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64516
--- Comment #3 from Markus F.X.J. Oberhumer <markus at oberhumer dot com> ---
Just for reference, here is the expected result:
$ clang -target armv5-unknown-linux-gnu -marm -mfloat-abi=soft --version
clang version 3.5.1 (tags/RELEASE_351/final)
Target: armv5-unknown-linux-gnu
Thread model: posix
$ clang -target armv5-unknown-linux-gnu -marm -mfloat-abi=soft -O2 -Wall -W
-Wcast-align -c unaligned_load_bug.c
$ arm-linux-gnueabihf-objdump -d unaligned_load_bug.o
unaligned_load_bug.o: file format elf32-littlearm
Disassembly of section .text:
00000000 <put16_unaligned>:
0: e5c01000 strb r1, [r0]
4: e1a01421 lsr r1, r1, #8
8: e5c01001 strb r1, [r0, #1]
c: e12fff1e bx lr
00000010 <get16_unaligned>:
10: e5d01000 ldrb r1, [r0]
14: e5d00001 ldrb r0, [r0, #1]
18: e1810400 orr r0, r1, r0, lsl #8
1c: e12fff1e bx lr
00000020 <put16_aligned>:
20: e1c010b0 strh r1, [r0]
24: e12fff1e bx lr
00000028 <get16_aligned>:
28: e1d000b0 ldrh r0, [r0]
2c: e12fff1e bx lr
More information about the Gcc-bugs
mailing list