aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>1997-10-30 21:44:05 +0000
committerNick Clifton <nickc@redhat.com>1997-10-30 21:44:05 +0000
commit6e3fcdf01cff0f8e518b594ba5be4e063d00169f (patch)
treea254cfebc3c6e9cb4cba6a220f783b83786ce907
parenta8880edadc388da47360cf5f3476bf720c0e44cd (diff)
downloadgdb-6e3fcdf01cff0f8e518b594ba5be4e063d00169f.zip
gdb-6e3fcdf01cff0f8e518b594ba5be4e063d00169f.tar.gz
gdb-6e3fcdf01cff0f8e518b594ba5be4e063d00169f.tar.bz2
Fixes to Thumb ADR pseudo op from Tony Thompson at ARM (athompso@arm.com).
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/tc-arm.c6
2 files changed, 9 insertions, 2 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 4882f8b..fe30621 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+Thu Oct 30 13:46:20 1997 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-arm.c (md_apply_fix3): Fix thumb ADR pseudo op. Patch
+ from Tony Thompson at ARM: athompso@arm.com
+
start-sanitize-d30v
Thu Oct 30 11:11:26 1997 Michael Meissner <meissner@cygnus.com>
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index dcfa796..1a4a3f4 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -4566,7 +4566,7 @@ do_t_adr (str)
while (*str == ' ')
str++;
- if (reg_required_here (&str, 8) == FAIL
+ if (reg_required_here (&str, 4) == FAIL
|| skip_past_comma (&str) == FAIL
|| my_get_expression (&inst.reloc.exp, &str))
{
@@ -4945,7 +4945,8 @@ md_apply_fix3 (fixP, val, seg)
segT seg;
{
offsetT value = *val;
- offsetT newval, temp;
+ offsetT newval;
+ unsigned long temp;
int sign;
char *buf = fixP->fx_where + fixP->fx_frag->fr_literal;
arm_fix_data *arm_data = (arm_fix_data *) fixP->tc_fix_data;
@@ -5283,6 +5284,7 @@ md_apply_fix3 (fixP, val, seg)
as_bad_where (fixP->fx_file, fixP->fx_line,
"Invalid immediate for address calculation (value = 0x%08X)", value);
newval = (rs == REG_PC ? T_OPCODE_ADD_PC : T_OPCODE_ADD_SP);
+ newval |= rd << 8;
newval |= value >> 2;
}
else if (rs == rd)