This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[patch, testsuite] Fix usage of __thumb__ and __thumb2__
- From: Yao Qi <yao at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Date: Tue, 03 May 2011 13:30:45 +0800
- Subject: [patch, testsuite] Fix usage of __thumb__ and __thumb2__
In gcc, macro __thumb__ is defined for thumb code, both thumb and
thumb-2, while __thumb2__ is defined for thumb-2 only. Given this,
macro checking in arm-disp-step.S are redundant somewhere, and this
patch is to clean up these macro checking.
Re-run arm-disp-step.exp with
{-marm,-mthumb\}\{-march=armv7-a,-march=armv5te\}, no regression. OK
for mainline?
--
Yao (éå)
gdb/testsuite/
2011-05-03 Yao Qi <yao@codesourcery.com>
* gdb.arch/arm-disp-step.S : Fix usage of macros __thumb__
and __thumb2__.
---
gdb/testsuite/gdb.arch/arm-disp-step.S | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/gdb/testsuite/gdb.arch/arm-disp-step.S b/gdb/testsuite/gdb.arch/arm-disp-step.S
index fb76974..1463555 100644
--- a/gdb/testsuite/gdb.arch/arm-disp-step.S
+++ b/gdb/testsuite/gdb.arch/arm-disp-step.S
@@ -18,7 +18,7 @@
.syntax unified
.text
.type main,%function
-#if defined (__thumb__) || defined (__thumb2__)
+#if defined (__thumb__)
.code 16
.thumb_func
#endif
@@ -44,7 +44,7 @@ test_ret_end:
bl test_ldr_pc
/* Test ldm/stm only in ARM mode */
-#if !defined (__thumb__) && !defined (__thumb2__)
+#if !defined (__thumb__)
bl test_ldm_stm_pc
#endif
@@ -60,7 +60,7 @@ test_ret_end:
.size main, .-main
.global test_call_subr
-#if defined (__thumb__) || defined (__thumb2__)
+#if defined (__thumb__)
.code 16
.thumb_func
#endif
@@ -77,7 +77,7 @@ test_ret:
.global test_branch
-#if defined (__thumb__) || defined (__thumb2__)
+#if defined (__thumb__)
.code 16
.thumb_func
#endif
@@ -90,7 +90,7 @@ L_branch:
.size test_branch, .-test_branch
.global test_ldr_pc
-#if defined (__thumb__) || defined (__thumb2__)
+#if defined (__thumb__)
.code 16
.thumb_func
#endif
@@ -103,7 +103,7 @@ test_ldr_pc_ret:
bx lr
.size test_ldr_pc, .-test_ldr_pc
-#if !defined (__thumb__) && !defined (__thumb2__)
+#if !defined (__thumb__)
.global test_ldm_stm_pc
.type test_ldm_stm_pc, %function
test_ldm_stm_pc:
--
1.7.0.4