aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorAnthony Green <green@moxielogic.com>2014-12-27 10:57:04 -0500
committerAnthony Green <green@moxielogic.com>2014-12-27 10:57:51 -0500
commitbffb60047d90919d8c3a11db9ae7e9f45553a657 (patch)
treeddec1391ed980be8ff3c38bb54c5860f1349b283 /gas
parent3b146284444f889294f0c1db13015c18bde0cf20 (diff)
downloadgdb-bffb60047d90919d8c3a11db9ae7e9f45553a657.zip
gdb-bffb60047d90919d8c3a11db9ae7e9f45553a657.tar.gz
gdb-bffb60047d90919d8c3a11db9ae7e9f45553a657.tar.bz2
Limit moxie sto/ldo offsets to 16 bits
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/tc-moxie.c16
2 files changed, 13 insertions, 8 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index ef7febf..b0d30b2 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2014-12-27 Anthony Green <green@moxielogic.com
+
+ * config/tc-moxie.c (md_assemble): ldo/sto instructions now use a
+ 16 bit offset instead of 32.
+
2014-12-25 Yaakov Selkowitz <yselkowi@redhat.com>
PR gas/17753
diff --git a/gas/config/tc-moxie.c b/gas/config/tc-moxie.c
index 02a59b7..fdd100c 100644
--- a/gas/config/tc-moxie.c
+++ b/gas/config/tc-moxie.c
@@ -404,7 +404,7 @@ md_assemble (char *str)
iword += (a << 4);
}
break;
- case MOXIE_F1_ABi4:
+ case MOXIE_F1_ABi2:
iword = opcode->opcode << 8;
while (ISSPACE (*op_end))
op_end++;
@@ -426,13 +426,13 @@ md_assemble (char *str)
op_end++;
op_end = parse_exp_save_ilp (op_end, &arg);
- offset = frag_more (4);
+ offset = frag_more (2);
fix_new_exp (frag_now,
(offset - frag_now->fr_literal),
- 4,
+ 2,
&arg,
0,
- BFD_RELOC_32);
+ BFD_RELOC_16);
if (*op_end != '(')
{
@@ -458,7 +458,7 @@ md_assemble (char *str)
iword += (a << 4) + b;
}
break;
- case MOXIE_F1_AiB4:
+ case MOXIE_F1_AiB2:
iword = opcode->opcode << 8;
while (ISSPACE (*op_end))
op_end++;
@@ -468,13 +468,13 @@ md_assemble (char *str)
int a, b;
op_end = parse_exp_save_ilp (op_end, &arg);
- offset = frag_more (4);
+ offset = frag_more (2);
fix_new_exp (frag_now,
(offset - frag_now->fr_literal),
- 4,
+ 2,
&arg,
0,
- BFD_RELOC_32);
+ BFD_RELOC_16);
if (*op_end != '(')
{