diff options
author | David S. Miller <davem@redhat.com> | 2006-02-25 01:33:24 +0000 |
---|---|---|
committer | David S. Miller <davem@redhat.com> | 2006-02-25 01:33:24 +0000 |
commit | ff3f9d5b2aa1a57de59495d64b77ded11bd4def2 (patch) | |
tree | 9c9f7fd61707033cf85453c5036a215fa6f69a39 /opcodes/sparc-dis.c | |
parent | c40c02dcc9eaad2b745e7a8bf023cae159f207eb (diff) | |
download | gdb-ff3f9d5b2aa1a57de59495d64b77ded11bd4def2.zip gdb-ff3f9d5b2aa1a57de59495d64b77ded11bd4def2.tar.gz gdb-ff3f9d5b2aa1a57de59495d64b77ded11bd4def2.tar.bz2 |
2006-02-24 David S. Miller <davem@sunset.davemloft.net>
* sparc-dis.c (v9_priv_reg_names): Add "gl" entry.
(v9_hpriv_reg_names): New table.
(print_insn_sparc): Allow values up to 16 for '?' and '!'.
New cases '$' and '%' for read/write hyperprivileged register.
* sparc-opc.c (sparc_opcodes): Add new entries for UA2005
window handling and rdhpr/wrhpr instructions.
Diffstat (limited to 'opcodes/sparc-dis.c')
-rw-r--r-- | opcodes/sparc-dis.c | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/opcodes/sparc-dis.c b/opcodes/sparc-dis.c index cbc6d60..bfa7ea2 100644 --- a/opcodes/sparc-dis.c +++ b/opcodes/sparc-dis.c @@ -85,11 +85,22 @@ static char *v9_priv_reg_names[] = { "tpc", "tnpc", "tstate", "tt", "tick", "tba", "pstate", "tl", "pil", "cwp", "cansave", "canrestore", "cleanwin", "otherwin", - "wstate", "fq" + "wstate", "fq", "gl" /* "ver" - special cased */ }; /* These are ordered according to there register number in + rdhpr and wrhpr insns. */ +static char *v9_hpriv_reg_names[] = +{ + "hpstate", "htstate", "resv2", "hintp", "resv4", "htba", "hver", + "resv7", "resv8", "resv9", "resv10", "resv11", "resv12", "resv13", + "resv14", "resv15", "resv16", "resv17", "resv18", "resv19", "resv20", + "resv21", "resv22", "resv23", "resv24", "resv25", "resv26", "resv27", + "resv28", "resv29", "resv30", "hstick_cmpr" +}; + +/* These are ordered according to there register number in rd and wr insns (-16). */ static char *v9a_asr_reg_names[] = { @@ -768,7 +779,7 @@ print_insn_sparc (bfd_vma memaddr, disassemble_info *info) case '?': if (X_RS1 (insn) == 31) (*info->fprintf_func) (stream, "%%ver"); - else if ((unsigned) X_RS1 (insn) < 16) + else if ((unsigned) X_RS1 (insn) < 17) (*info->fprintf_func) (stream, "%%%s", v9_priv_reg_names[X_RS1 (insn)]); else @@ -776,13 +787,29 @@ print_insn_sparc (bfd_vma memaddr, disassemble_info *info) break; case '!': - if ((unsigned) X_RD (insn) < 15) + if ((unsigned) X_RD (insn) < 17) (*info->fprintf_func) (stream, "%%%s", v9_priv_reg_names[X_RD (insn)]); else (*info->fprintf_func) (stream, "%%reserved"); break; + case '$': + if ((unsigned) X_RS1 (insn) < 32) + (*info->fprintf_func) (stream, "%%%s", + v9_hpriv_reg_names[X_RS1 (insn)]); + else + (*info->fprintf_func) (stream, "%%reserved"); + break; + + case '%': + if ((unsigned) X_RD (insn) < 32) + (*info->fprintf_func) (stream, "%%%s", + v9_hpriv_reg_names[X_RD (insn)]); + else + (*info->fprintf_func) (stream, "%%reserved"); + break; + case '/': if (X_RS1 (insn) < 16 || X_RS1 (insn) > 25) (*info->fprintf_func) (stream, "%%reserved"); |