aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorJim Wilson <wilson@tuliptree.org>1992-08-31 17:03:47 +0000
committerJim Wilson <wilson@tuliptree.org>1992-08-31 17:03:47 +0000
commit93fd00fbbf104fc022215ecff7cef252bd4babb8 (patch)
treeb41e170d50885dcc24099e7cf5366ec68ede76f9 /binutils
parent2768b3f76344dafefbe26628465d7282ce11b3e1 (diff)
downloadgdb-93fd00fbbf104fc022215ecff7cef252bd4babb8.zip
gdb-93fd00fbbf104fc022215ecff7cef252bd4babb8.tar.gz
gdb-93fd00fbbf104fc022215ecff7cef252bd4babb8.tar.bz2
Handle new v9 insn argument codes, and delete support for obsolete ones.
Otherwise not updated or tested, since v9 support is obviously incomplete, and it can't possibly work right without some effort.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/sparc-pinsn.c54
1 files changed, 40 insertions, 14 deletions
diff --git a/binutils/sparc-pinsn.c b/binutils/sparc-pinsn.c
index 2430b5d..a512c77 100644
--- a/binutils/sparc-pinsn.c
+++ b/binutils/sparc-pinsn.c
@@ -251,16 +251,6 @@ memcpy(&insn,buffer, sizeof (insn));
freg (insn.rs2);
break;
-#ifndef NO_V9
-/* Somebody who know needs to define rs3.
- case 'j':
- case 'u': * double/even *
- case 'U': * quad/multiple of 4 *
- freg (insn.rs3);
- break;
-*/
-#endif /* NO_V9 */
-
case 'g':
case 'H': /* double/even */
case 'J': /* quad/multiple of 4 */
@@ -311,6 +301,38 @@ memcpy(&insn,buffer, sizeof (insn));
break;
#ifndef NO_V9
+ case 'I': /* 11 bit immediate. */
+ case 'j': /* 10 bit immediate. */
+ {
+ /* We cannot trust the compiler to sign-extend
+ when extracting the bitfield, hence the shifts. */
+ int imm;
+
+ if (*s == 'I')
+ imm = ((int) insn.imm13 << 21) >> 21;
+ else
+ imm = ((int) insn.imm13 << 22) >> 22;
+
+ /* Check to see whether we have a 1+i, and take
+ note of that fact.
+
+ Note: because of the way we sort the table,
+ we will be matching 1+i rather than i+1,
+ so it is OK to assume that i is after +,
+ not before it. */
+ if (found_plus)
+ imm_added_to_rs1 = 1;
+
+ if (imm <= 9)
+ fprintf (stream, "%d", imm);
+ else
+ fprintf (stream, "%#x", (unsigned) imm);
+ }
+ break;
+
+
+
+
case 'k':
print_address ((bfd_vma)
(memaddr
@@ -326,10 +348,6 @@ memcpy(&insn,buffer, sizeof (insn));
stream);
break;
- case 'Y':
- fputs ("%amr", stream);
- break;
-
case '6':
case '7':
case '8':
@@ -344,6 +362,14 @@ memcpy(&insn,buffer, sizeof (insn));
case 'Z':
fputs ("xcc", stream);
break;
+
+ case 'E':
+ fputs ("%ccr", stream);
+ break;
+
+ case 's':
+ fputs ("%fprs", stream);
+ break;
#endif /* NO_V9 */
case 'M':