aboutsummaryrefslogtreecommitdiff
path: root/gcc/fixed-value.cc
diff options
context:
space:
mode:
authorTorbjörn SVENSSON <torbjorn.svensson@foss.st.com>2024-11-08 18:52:53 +0100
committerTorbjörn SVENSSON <torbjorn.svensson@foss.st.com>2024-12-12 12:25:19 +0100
commitb7e11b49992f70f498044b9499201a5929df95e4 (patch)
tree016bf25211d311072d028c563964b9e7016b7639 /gcc/fixed-value.cc
parent95a0c7161277a71e45050e5b562710cf9e1d4d2a (diff)
downloadgcc-b7e11b49992f70f498044b9499201a5929df95e4.zip
gcc-b7e11b49992f70f498044b9499201a5929df95e4.tar.gz
gcc-b7e11b49992f70f498044b9499201a5929df95e4.tar.bz2
testsuite: arm: Check that a far jump is used in thumb1-far-jump-2.c
With the changes in r15-1579-g792f97b44ff, the code used as "padding" in the test case is optimized way. Prevent this optimization by forcing a read of the volatile memory. Also, validate that there is a far jump in the generated assembler. Without this patch, the generated assembler is reduced to: f3: cmp r0, #0 beq .L1 ldr r4, .L6 .L1: bx lr .L7: .align 2 .L6: .word g_0_1 With the patch, the generated assembler is: f3: movs r2, #1 ldr r3, .L6 push {lr} str r2, [r3] cmp r0, #0 bne .LCB10 bl .L1 @far jump .LCB10: b .L7 .L8: .align 2 .L6: .word .LANCHOR0 .L7: str r2, [r3] ... str r2, [r3] .L1: pop {pc} gcc/testsuite/ChangeLog: * gcc.target/arm/thumb1-far-jump-2.c: Write to volatile memmory in macro to avoid optimization. Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
Diffstat (limited to 'gcc/fixed-value.cc')
0 files changed, 0 insertions, 0 deletions