aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1999-09-19 19:23:08 +0000
committerJeff Law <law@redhat.com>1999-09-19 19:23:08 +0000
commit61dd1d313e032875de06281b658aa11d2c709abf (patch)
treedb6ab6d71e0783b82ef77939fa304da78c539933 /gas
parent5d2e7eccb2990b501fd1ce8cfcc2dc375b537784 (diff)
downloadgdb-61dd1d313e032875de06281b658aa11d2c709abf.zip
gdb-61dd1d313e032875de06281b658aa11d2c709abf.tar.gz
gdb-61dd1d313e032875de06281b658aa11d2c709abf.tar.bz2
* config/tc-hppa.c (pa_ip): Handle 'd', '#' and 'cq'.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog2
-rw-r--r--gas/config/tc-hppa.c73
2 files changed, 73 insertions, 2 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 6ec8c8d..913dd76 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,7 @@
Sun Sep 19 10:43:31 1999 Jeffrey A Law (law@cygnus.com)
+ * config/tc-hppa.c (pa_ip): Handle 'd', '#' and 'cq'.
+
* config/tc-hppa.c (struct pa_it): New field "trunc".
(pa_ip): Hadnle 'h', 'm', '=', '{', and '_' operands.
(pa_parse_ftest_gfx_completer): New function
diff --git a/gas/config/tc-hppa.c b/gas/config/tc-hppa.c
index e72da28..755585a 100644
--- a/gas/config/tc-hppa.c
+++ b/gas/config/tc-hppa.c
@@ -1785,6 +1785,7 @@ pa_ip (str)
/* Handle a short load/store completer. */
case 'm':
+ case 'q':
{
int a = 0;
int m = 0;
@@ -1809,8 +1810,18 @@ pa_ip (str)
s += 2;
}
- opcode |= m << 5;
- INSERT_FIELD_AND_CONTINUE (opcode, a, 13);
+ /* 'm' and 'q' are the same, except for where they encode
+ the before/after field. */
+ if (*args == 'm')
+ {
+ opcode |= m << 5;
+ INSERT_FIELD_AND_CONTINUE (opcode, a, 13);
+ }
+ else if (*args == 'q')
+ {
+ opcode |= m << 3;
+ INSERT_FIELD_AND_CONTINUE (opcode, a, 2);
+ }
}
/* Handle a stbys completer. */
@@ -2789,6 +2800,64 @@ pa_ip (str)
continue;
}
+ /* Handle 14 bit immediated, shifted left three times. */
+ case '#':
+ the_insn.field_selector = pa_chk_field_selector (&s);
+ get_expression (s);
+ s = expr_end;
+ if (the_insn.exp.X_op == O_constant)
+ {
+ num = evaluate_absolute (&the_insn);
+ if (num & 0x7)
+ break;
+ CHECK_FIELD (num, 8191, -8192, 0);
+ if (num < 0)
+ opcode |= 1;
+ num &= 0x1fff;
+ num >>= 3;
+ INSERT_FIELD_AND_CONTINUE (opcode, num, 4);
+ }
+ else
+ {
+ if (is_DP_relative (the_insn.exp))
+ the_insn.reloc = R_HPPA_GOTOFF;
+ else if (is_PC_relative (the_insn.exp))
+ the_insn.reloc = R_HPPA_PCREL_CALL;
+ else
+ the_insn.reloc = R_HPPA;
+ the_insn.format = 14;
+ continue;
+ }
+ break;
+
+ /* Handle 14 bit immediate, shifted left twice. */
+ case 'd':
+ the_insn.field_selector = pa_chk_field_selector (&s);
+ get_expression (s);
+ s = expr_end;
+ if (the_insn.exp.X_op == O_constant)
+ {
+ num = evaluate_absolute (&the_insn);
+ if (num & 0x3)
+ break;
+ CHECK_FIELD (num, 8191, -8192, 0);
+ if (num < 0)
+ opcode |= 1;
+ num &= 0x1fff;
+ num >>= 2;
+ INSERT_FIELD_AND_CONTINUE (opcode, num, 3);
+ }
+ else
+ {
+ if (is_DP_relative (the_insn.exp))
+ the_insn.reloc = R_HPPA_GOTOFF;
+ else if (is_PC_relative (the_insn.exp))
+ the_insn.reloc = R_HPPA_PCREL_CALL;
+ else
+ the_insn.reloc = R_HPPA;
+ the_insn.format = 14;
+ continue;
+ }
/* Handle a 14 bit immediate at 31. */
case 'j':