aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1999-08-28 08:48:40 +0000
committerJeff Law <law@redhat.com>1999-08-28 08:48:40 +0000
commit413c94bacac04e4dd163a9882689bd35dd178d37 (patch)
tree104023e55d0ff14aa928c40c466cbea2800436d4 /gas
parent1eee34f59f8734c3f7aaeabcdfb8ba7cdb00a0b1 (diff)
downloadgdb-413c94bacac04e4dd163a9882689bd35dd178d37.zip
gdb-413c94bacac04e4dd163a9882689bd35dd178d37.tar.gz
gdb-413c94bacac04e4dd163a9882689bd35dd178d37.tar.bz2
* config/tc-hppa.c (pa_ip): Add completer codes 'a', 'ch', 'cH',
'cS', and 'c*'.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog3
-rw-r--r--gas/config/tc-hppa.c103
2 files changed, 106 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 14313ce..f8a6985 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -4,6 +4,9 @@ Sat Aug 28 01:23:11 1999 Jeffrey A Law (law@cygnus.com)
Sat Aug 28 00:26:26 1999 Jerry Quinn <jquinn@nortelnetworks.com>
+ * config/tc-hppa.c (pa_ip): Add completer codes 'a', 'ch', 'cH',
+ 'cS', and 'c*'.
+
* config/tc-hppa.c (pa_ip): Place completers behind prefix 'c'.
* config/tc-hppa.c (pa_ip): Add cases for '.', '~'. '$'. and '!'
diff --git a/gas/config/tc-hppa.c b/gas/config/tc-hppa.c
index 77c4153..34a0034 100644
--- a/gas/config/tc-hppa.c
+++ b/gas/config/tc-hppa.c
@@ -1601,6 +1601,13 @@ pa_ip (str)
CHECK_FIELD (num, 31, 0, 0);
INSERT_FIELD_AND_CONTINUE (opcode, num, 0);
+ /* Handle a 5 bit register field at 10 and 15. */
+ case 'a':
+ num = pa_parse_number (&s, 0);
+ CHECK_FIELD (num, 31, 0, 0);
+ opcode |= num << 16;
+ INSERT_FIELD_AND_CONTINUE (opcode, num, 21);
+
/* Handle a 5 bit field length at 31. */
case 'T':
num = pa_get_absolute_expression (&the_insn, &s);
@@ -1752,6 +1759,95 @@ pa_ip (str)
INSERT_FIELD_AND_CONTINUE (opcode, flag, 5);
+ /* Handle signed/unsigned at 21. */
+ case 'S':
+ {
+ int sign = 1;
+ if (strncasecmp (s, ",s", 2) == 0)
+ {
+ sign = 1;
+ s += 2;
+ }
+ else if (strncasecmp (s, ",u", 2) == 0)
+ {
+ sign = 0;
+ s += 2;
+ }
+
+ INSERT_FIELD_AND_CONTINUE (opcode, sign, 10);
+ }
+
+ /* Handle left/right combination at 17:18. */
+ case 'h':
+ if (*s++ == ',')
+ {
+ int lr = 0;
+ if (*s == 'r')
+ lr = 2;
+ else if (*s == 'l')
+ lr = 0;
+ else
+ as_bad(_("Invalid left/right combination completer"));
+
+ s++;
+ INSERT_FIELD_AND_CONTINUE (opcode, lr, 13);
+ }
+ else
+ as_bad(_("Invalid left/right combination completer"));
+ break;
+
+ /* Handle saturation at 24:25. */
+ case 'H':
+ {
+ int sat = 3;
+ if (strncasecmp (s, ",ss", 3) == 0)
+ {
+ sat = 1;
+ s += 3;
+ }
+ else if (strncasecmp (s, ",us", 3) == 0)
+ {
+ sat = 0;
+ s += 3;
+ }
+
+ INSERT_FIELD_AND_CONTINUE (opcode, sat, 6);
+ }
+
+ /* Handle permutation completer. */
+ case '*':
+ if (*s++ == ',')
+ {
+ int permloc[4] = {13,10,8,6};
+ int perm = 0;
+ int i = 0;
+ for (; i < 4; i++)
+ {
+ switch (*s++)
+ {
+ case '0':
+ perm = 0;
+ break;
+ case '1':
+ perm = 1;
+ break;
+ case '2':
+ perm = 2;
+ break;
+ case '3':
+ perm = 3;
+ break;
+ default:
+ as_bad(_("Invalid permutation completer"));
+ }
+ opcode |= perm << permloc[i];
+ }
+ continue;
+ }
+ else
+ as_bad(_("Invalid permutation completer"));
+ break;
+
default:
abort ();
}
@@ -2481,6 +2577,13 @@ pa_ip (str)
CHECK_FIELD (num, 3, 1, 0);
INSERT_FIELD_AND_CONTINUE (opcode, num, 6);
+ /* Handle a 4 bit shift count at 25. */
+ case '*':
+ num = pa_get_absolute_expression (&the_insn, &s);
+ s = expr_end;
+ CHECK_FIELD (num, 15, 0, 0);
+ INSERT_FIELD_AND_CONTINUE (opcode, num, 6);
+
/* Handle a 5 bit shift count at 26. */
case 'p':
num = pa_get_absolute_expression (&the_insn, &s);