aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.arch/arm-disp-step.S
diff options
context:
space:
mode:
authorYao Qi <yao@codesourcery.com>2011-05-05 02:51:28 +0000
committerYao Qi <yao@codesourcery.com>2011-05-05 02:51:28 +0000
commit0c51be18c45bee00b7cb15079f9c6e9524c1d1eb (patch)
tree9c711a05af973e06a0cd3854f6e2964e4db87aec /gdb/testsuite/gdb.arch/arm-disp-step.S
parente41e6462129a9020f186bd756aad57d81d3f5cdb (diff)
downloadgdb-0c51be18c45bee00b7cb15079f9c6e9524c1d1eb.zip
gdb-0c51be18c45bee00b7cb15079f9c6e9524c1d1eb.tar.gz
gdb-0c51be18c45bee00b7cb15079f9c6e9524c1d1eb.tar.bz2
2011-05-05 Yao Qi <yao@codesourcery.com>
* gdb.arch/arm-disp-step.S(test_ldr_literal): New. (test_adr_32bit, test_pop_pc): New. * gdb.arch/arm-disp-step.exp (test_ldr_literal): New. (test_adr_32bit, test_pop_pc): New.
Diffstat (limited to 'gdb/testsuite/gdb.arch/arm-disp-step.S')
-rw-r--r--gdb/testsuite/gdb.arch/arm-disp-step.S79
1 files changed, 79 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.arch/arm-disp-step.S b/gdb/testsuite/gdb.arch/arm-disp-step.S
index 1463555..fa69e31 100644
--- a/gdb/testsuite/gdb.arch/arm-disp-step.S
+++ b/gdb/testsuite/gdb.arch/arm-disp-step.S
@@ -48,6 +48,20 @@ test_ret_end:
bl test_ldm_stm_pc
#endif
+ /* Test ldrX literal in ARM */
+#if !defined (__thumb__)
+ bl test_ldr_literal
+#endif
+
+ /* Test 32-bit adr in ARM */
+#if !defined(__thumb__)
+ bl test_adr_32bit
+#endif
+
+#if !defined(__thumb__)
+ bl test_pop_pc
+#endif
+
/* Test str in ARM mode and Thumb-2 */
#if !defined(__thumb__)
bl test_str_pc
@@ -123,6 +137,71 @@ test_ldm_stm_pc_ret:
.size test_ldm_stm_pc, .-test_ldm_stm_pc
#endif
+#if !defined (__thumb__)
+ .global test_ldr_literal
+ .type test_ldr_literal, %function
+test_ldr_literal:
+ ldrh r0, [pc]
+ .global test_ldrsb_literal
+test_ldrsb_literal:
+ ldrsb r0, [pc]
+ .global test_ldrsh_literal
+test_ldrsh_literal:
+ ldrsh r0, [pc]
+ .global test_ldr_literal_end
+test_ldr_literal_end:
+ bx lr
+ .size test_ldr_literal, .-test_ldr_literal
+#endif
+
+
+#if !defined(__thumb__)
+ .global test_adr_32bit
+#if defined(__thumb2__)
+ .code 16
+ .thumb_func
+#endif
+test_adr_32bit:
+ adr r0, .L6
+ nop
+.L6:
+ nop
+ .global test_adr_32bit_after
+test_adr_32bit_after:
+ adr r0, .L6
+
+ .global test_adr_32bit_end
+test_adr_32bit_end:
+ bx lr
+ .size test_adr_32bit, .-test_adr_32bit
+#endif
+
+ .global test_pop_pc
+ .type test_pop_pc, %function
+#if defined(__thumb__)
+ .code 16
+ .thumb_func
+#endif
+
+test_pop_pc:
+ ldr r1, .L5
+#if defined(__thumb__)
+ movs r0, #1
+ orrs r1, r0
+#endif
+ push {r1}
+ push {r1}
+ .global test_pop_pc_1
+test_pop_pc_1:
+ pop {r1, pc}
+ .global test_pop_pc_ret
+test_pop_pc_ret:
+ bx lr
+ .align 2
+.L5:
+ .word test_pop_pc_ret
+ .size test_pop_pc, .-test_pop_pc
+
#if !defined(__thumb__)
#if defined (__thumb2__)
.code 16