diff options
author | marius <marius@FreeBSD.org> | 2008-08-12 19:43:36 +0000 |
---|---|---|
committer | marius <marius@FreeBSD.org> | 2008-08-12 19:43:36 +0000 |
commit | 2f734060b92f529ade432d31098548f04dc963a6 (patch) | |
tree | 778adc6814c72fa8fd739e3429333e9d436a2b86 /sys/sparc64 | |
parent | 88abc02c6e4b8a234a4db579912a993d4af1ff02 (diff) | |
download | FreeBSD-src-2f734060b92f529ade432d31098548f04dc963a6.zip FreeBSD-src-2f734060b92f529ade432d31098548f04dc963a6.tar.gz |
- Add sys_tick and the USIII and beyond sys_tick_cmpr to state_regs[].
- Const'ify and static'ize as appropriate.
- Use __FBSDID().
Diffstat (limited to 'sys/sparc64')
-rw-r--r-- | sys/sparc64/sparc64/db_disasm.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/sys/sparc64/sparc64/db_disasm.c b/sys/sparc64/sparc64/db_disasm.c index 32bdcca..1c244e0 100644 --- a/sys/sparc64/sparc64/db_disasm.c +++ b/sys/sparc64/sparc64/db_disasm.c @@ -28,9 +28,11 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * from: NetBSD: db_disasm.c,v 1.9 2000/08/16 11:29:42 pk Exp - * $FreeBSD$ */ +#include <sys/cdefs.h> +__FBSDID("$FreeBSD$"); + #include <sys/param.h> #include <sys/systm.h> @@ -76,18 +78,18 @@ struct sparc_insn { unsigned int match; - char* name; - char* format; + const char* name; + const char* format; }; -char* regs[] = { +static const char* regs[] = { "g0", "g1", "g2", "g3", "g4", "g5", "g6", "g7", "o0", "o1", "o2", "o3", "o4", "o5", "sp", "o7", "l0", "l1", "l2", "l3", "l4", "l5", "l6", "l7", "i0", "i1", "i2", "i3", "i4", "i5", "fp", "i7" }; -char* priv_regs[] = { +static const char* priv_regs[] = { "tpc", "tnpc", "tstate", "tt", "tick", "tba", "pstate", "tl", "pil", "cwp", "cansave", "canrestore", "cleanwin", "otherwin", "wstate", "fq", @@ -95,18 +97,18 @@ char* priv_regs[] = { "", "", "", "", "", "", "", "ver" }; -char* state_regs[] = { +static const char* state_regs[] = { "y", "", "ccr", "asi", "tick", "pc", "fprs", "asr", "", "", "", "", "", "", "", "", - "pcr", "pic", "dcr", "gsr", "set_softint", "clr_softint", "softint", "tick_cmpr", "", - "", "", "", "", "", "", "", "" + "pcr", "pic", "dcr", "gsr", "set_softint", "clr_softint", "softint", + "tick_cmpr", "sys_tick", "sys_tick_cmpr", "", "", "", "", "", "", "" }; -char* ccodes[] = { +static const char* ccodes[] = { "fcc0", "fcc1", "fcc2", "fcc3", "icc", "", "xcc", "" }; -char* prefetch[] = { +static const char* prefetch[] = { "n_reads", "one_read", "n_writes", "one_write", "page" }; @@ -162,7 +164,7 @@ V8 only: */ -struct sparc_insn sparc_i[] = { +static const struct sparc_insn sparc_i[] = { /* * Format 1: Call @@ -803,11 +805,10 @@ struct sparc_insn sparc_i[] = { db_addr_t db_disasm(db_addr_t loc, boolean_t altfmt) { - struct sparc_insn* i_ptr = (struct sparc_insn *)&sparc_i; - + const struct sparc_insn* i_ptr = (struct sparc_insn *)&sparc_i; unsigned int insn, you_lose, bitmask; int matchp; - char* f_ptr, *cp; + const char* f_ptr, *cp; you_lose = 0; matchp = 0; @@ -1028,4 +1029,3 @@ db_disasm(db_addr_t loc, boolean_t altfmt) return (loc + 4); } - |