We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have attached an arm assembly file which can demonstrate the issue. (The test case is an excerpt from compiler-rt ARM builtins library)
$ clang -mcpu=cortex-a9 -c /tmp/temp.s -no-integrated-as -o /tmp/temp.o /tmp/temp.s: Assembler messages: /tmp/temp.s:13: Error: branch out of range clang-3.5: error: assembler command failed with exit code 1 (use -v to see invocation)
$ clang -mcpu=cortex-a9 -c /tmp/temp.s -integrated-as -o /tmp/temp.o The integrated-as compiles the file with out an issue and generates bad assembly
$ arm-none-linux-gnueabi-objdump -S /tmp/temp.o /tmp/temp.o: file format elf32-littlearm Disassembly of section .text: 00000000 <__sync_fetch_and_add_8>: 0: b570 push {r4, r5, r6, lr} 2: f3bf 8f5f dmb sy 6: 4684 mov ip, r0 8: e8dc 017f ldrexd r0, r1, [ip] c: 1884 adds r4, r0, r2 e: eb41 0503 adc.w r5, r1, r3 12: e8cc 4576 strexd r6, r4, r5, [ip] 16: bbbe cbnz r6, 88 <__sync_fetch_and_add_8+0x88> 18: f3bf 8f5f dmb sy 1c: bd70 pop {r4, r5, r6, pc}
There is no address corresponding to 88 <__sync_fetch_and_add_8+0x88>.
The ARM manual on CBNZ says backward branching is not possible. Refer to http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0489c/Cjaghefc.html
The text was updated successfully, but these errors were encountered:
Test case
Sorry, something went wrong.
No branches or pull requests
Extended Description
I have attached an arm assembly file which can demonstrate the issue.
(The test case is an excerpt from compiler-rt ARM builtins library)
$ clang -mcpu=cortex-a9 -c /tmp/temp.s -no-integrated-as -o /tmp/temp.o
/tmp/temp.s: Assembler messages:
/tmp/temp.s:13: Error: branch out of range
clang-3.5: error: assembler command failed with exit code 1 (use -v to see invocation)
$ clang -mcpu=cortex-a9 -c /tmp/temp.s -integrated-as -o /tmp/temp.o
The integrated-as compiles the file with out an issue and generates bad assembly
$ arm-none-linux-gnueabi-objdump -S /tmp/temp.o
/tmp/temp.o: file format elf32-littlearm
Disassembly of section .text:
00000000 <__sync_fetch_and_add_8>:
0: b570 push {r4, r5, r6, lr}
2: f3bf 8f5f dmb sy
6: 4684 mov ip, r0
8: e8dc 017f ldrexd r0, r1, [ip]
c: 1884 adds r4, r0, r2
e: eb41 0503 adc.w r5, r1, r3
12: e8cc 4576 strexd r6, r4, r5, [ip]
16: bbbe cbnz r6, 88 <__sync_fetch_and_add_8+0x88>
18: f3bf 8f5f dmb sy
1c: bd70 pop {r4, r5, r6, pc}
There is no address corresponding to 88 <__sync_fetch_and_add_8+0x88>.
The ARM manual on CBNZ says backward branching is not possible.
Refer to http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0489c/Cjaghefc.html
The text was updated successfully, but these errors were encountered: