aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>1999-11-29 15:29:34 +0000
committerNick Clifton <nickc@redhat.com>1999-11-29 15:29:34 +0000
commita64bcdd8d378b892077d2a9ba108f310fa2b9e5b (patch)
treee0b3ebb77721dd0b6b43b411d18c7ade4305f63a /gas
parent43b4c25efc59aa9651305948196a7b00ae8fdfa1 (diff)
downloadgdb-a64bcdd8d378b892077d2a9ba108f310fa2b9e5b.zip
gdb-a64bcdd8d378b892077d2a9ba108f310fa2b9e5b.tar.gz
gdb-a64bcdd8d378b892077d2a9ba108f310fa2b9e5b.tar.bz2
Fix .force_thumb
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog7
-rw-r--r--gas/config/tc-arm.c11
2 files changed, 13 insertions, 5 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index f08fd68..384aae8 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,10 @@
+1999-11-29 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-arm.c (thumb_mode): Turn into a tristate variable.
+ (s_force_thumb): Set thumb_mode to 2.
+ (md_assemble): Do not complain about thumb instructions on a
+ non-thumb target if thumb_mode is set to 2.
+
1999-11-28 Michael Meissner <meissner@cygnus.com>
* config/tc-alpha.c (toplevel): Include struc-symbol.h.
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index fa61988..c6e2416 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -139,10 +139,11 @@ CONST char FLT_CHARS[] = "rRsSfFdDxXeEpP";
symbolS * GOT_symbol; /* Pre-defined "_GLOBAL_OFFSET_TABLE_" */
#endif
-CONST int md_reloc_size = 8; /* Size of relocation record */
-
-static int thumb_mode = 0; /* non-zero if assembling thumb instructions */
+CONST int md_reloc_size = 8; /* Size of relocation record */
+static int thumb_mode = 0; /* 0: assemble for ARM, 1: assemble for Thumb,
+ 2: assemble for Thumb even though target cpu
+ does not support thumb instructions */
typedef struct arm_fix
{
int thumb_mode;
@@ -1260,7 +1261,7 @@ s_force_thumb (ignore)
if (! thumb_mode)
{
- thumb_mode = 1;
+ thumb_mode = 2;
record_alignment (now_seg, 1);
}
@@ -6068,7 +6069,7 @@ md_assemble (str)
if (opcode)
{
/* Check that this instruction is supported for this CPU. */
- if ((opcode->variants & cpu_variant) == 0)
+ if (thumb_mode == 1 && (opcode->variants & cpu_variant) == 0)
{
as_bad (_("selected processor does not support this opcode"));
return;