Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/i386/i386 constify
details: https://anonhg.NetBSD.org/src/rev/93a6ba8487e6
branches: trunk
changeset: 500095:93a6ba8487e6
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Tue Dec 05 10:45:09 2000 +0000
description:
constify
diffstat:
sys/arch/i386/i386/db_disasm.c | 96 +++++++++++++++++++++---------------------
1 files changed, 48 insertions(+), 48 deletions(-)
diffs (truncated from 371 to 300 lines):
diff -r 2afdde0cc84f -r 93a6ba8487e6 sys/arch/i386/i386/db_disasm.c
--- a/sys/arch/i386/i386/db_disasm.c Tue Dec 05 10:26:12 2000 +0000
+++ b/sys/arch/i386/i386/db_disasm.c Tue Dec 05 10:45:09 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_disasm.c,v 1.24 2000/12/05 10:26:12 jdolecek Exp $ */
+/* $NetBSD: db_disasm.c,v 1.25 2000/12/05 10:45:09 jdolecek Exp $ */
/*
* Mach Operating System
@@ -111,7 +111,7 @@
(or pointer to table) */
};
-char * db_Grp6[] = {
+const char * const db_Grp6[] = {
"sldt",
"str",
"lldt",
@@ -122,7 +122,7 @@
""
};
-char * db_Grp7[] = {
+const char * const db_Grp7[] = {
"sgdt",
"sidt",
"lgdt",
@@ -133,7 +133,7 @@
"invlpg"
};
-char * db_Grp8[] = {
+const char * const db_Grp8[] = {
"",
"",
"",
@@ -144,7 +144,7 @@
"btc"
};
-char * db_Grp9[] = {
+const char * const db_Grp9[] = {
"",
"cmpxchg8b",
"",
@@ -155,7 +155,7 @@
"",
};
-struct inst db_inst_0f0x[] = {
+const struct inst db_inst_0f0x[] = {
/*00*/ { "", TRUE, NONE, op1(Ew), (char *)db_Grp6 },
/*01*/ { "", TRUE, NONE, op1(Ew), (char *)db_Grp7 },
/*02*/ { "lar", TRUE, LONG, op2(E,R), 0 },
@@ -175,7 +175,7 @@
/*0f*/ { "", FALSE, NONE, 0, 0 },
};
-struct inst db_inst_0f2x[] = {
+const struct inst db_inst_0f2x[] = {
/*20*/ { "mov", TRUE, LONG, op2(CR,E), 0 }, /* use E for reg */
/*21*/ { "mov", TRUE, LONG, op2(DR,E), 0 }, /* since mod == 11 */
/*22*/ { "mov", TRUE, LONG, op2(E,CR), 0 },
@@ -195,7 +195,7 @@
/*2f*/ { "", FALSE, NONE, 0, 0 },
};
-struct inst db_inst_0f3x[] = {
+const struct inst db_inst_0f3x[] = {
/*30*/ { "wrmsr", FALSE, NONE, 0, 0 },
/*31*/ { "rdtsc", FALSE, NONE, 0, 0 },
/*32*/ { "rdmsr", FALSE, NONE, 0, 0 },
@@ -215,7 +215,7 @@
/*3f*/ { "", FALSE, NONE, 0, 0 },
};
-struct inst db_inst_0f8x[] = {
+const struct inst db_inst_0f8x[] = {
/*80*/ { "jo", FALSE, NONE, op1(Dl), 0 },
/*81*/ { "jno", FALSE, NONE, op1(Dl), 0 },
/*82*/ { "jb", FALSE, NONE, op1(Dl), 0 },
@@ -235,7 +235,7 @@
/*8f*/ { "jnle", FALSE, NONE, op1(Dl), 0 },
};
-struct inst db_inst_0f9x[] = {
+const struct inst db_inst_0f9x[] = {
/*90*/ { "seto", TRUE, NONE, op1(Eb), 0 },
/*91*/ { "setno", TRUE, NONE, op1(Eb), 0 },
/*92*/ { "setb", TRUE, NONE, op1(Eb), 0 },
@@ -255,7 +255,7 @@
/*9f*/ { "setnle",TRUE, NONE, op1(Eb), 0 },
};
-struct inst db_inst_0fax[] = {
+const struct inst db_inst_0fax[] = {
/*a0*/ { "push", FALSE, NONE, op1(Si), 0 },
/*a1*/ { "pop", FALSE, NONE, op1(Si), 0 },
/*a2*/ { "cpuid", FALSE, NONE, 0, 0 },
@@ -275,7 +275,7 @@
/*a7*/ { "imul", TRUE, LONG, op2(E,R), 0 },
};
-struct inst db_inst_0fbx[] = {
+const struct inst db_inst_0fbx[] = {
/*b0*/ { "cmpxchg",TRUE, BYTE, op2(R, E), 0 },
/*b1*/ { "cmpxchg",TRUE, LONG, op2(R, E), 0 },
/*b2*/ { "lss", TRUE, LONG, op2(E, R), 0 },
@@ -295,7 +295,7 @@
/*bf*/ { "movsw", TRUE, LONG, op2(E, R), 0 },
};
-struct inst db_inst_0fcx[] = {
+const struct inst db_inst_0fcx[] = {
/*c0*/ { "xadd", TRUE, BYTE, op2(R, E), 0 },
/*c1*/ { "xadd", TRUE, LONG, op2(R, E), 0 },
/*c2*/ { "", FALSE, NONE, 0, 0 },
@@ -314,7 +314,7 @@
/*cf*/ { "bswap", FALSE, LONG, op1(Ri), 0 },
};
-struct inst *db_inst_0f[] = {
+const struct inst * const db_inst_0f[] = {
db_inst_0f0x,
0,
db_inst_0f2x,
@@ -333,43 +333,43 @@
0
};
-char * db_Esc92[] = {
+const char * const db_Esc92[] = {
"fnop", "", "", "", "", "", "", ""
};
-char * db_Esc93[] = {
+const char * const db_Esc93[] = {
"", "", "", "", "", "", "", ""
};
-char * db_Esc94[] = {
+const char * const db_Esc94[] = {
"fchs", "fabs", "", "", "ftst", "fxam", "", ""
};
-char * db_Esc95[] = {
+const char * const db_Esc95[] = {
"fld1", "fldl2t","fldl2e","fldpi","fldlg2","fldln2","fldz",""
};
-char * db_Esc96[] = {
+const char * const db_Esc96[] = {
"f2xm1","fyl2x","fptan","fpatan","fxtract","fprem1","fdecstp",
"fincstp"
};
-char * db_Esc97[] = {
+const char * const db_Esc97[] = {
"fprem","fyl2xp1","fsqrt","fsincos","frndint","fscale","fsin","fcos"
};
-char * db_Esca4[] = {
+const char * const db_Esca4[] = {
"", "fucompp","", "", "", "", "", ""
};
-char * db_Escb4[] = {
+const char * const db_Escb4[] = {
"", "", "fnclex","fninit","", "", "", ""
};
-char * db_Esce3[] = {
+const char * const db_Esce3[] = {
"", "fcompp","", "", "", "", "", ""
};
-char * db_Escf4[] = {
+const char * const db_Escf4[] = {
"fnstsw","", "", "", "", "", "", ""
};
-struct finst db_Esc8[] = {
+const struct finst db_Esc8[] = {
/*0*/ { "fadd", SNGL, op2(STI,ST), 0 },
/*1*/ { "fmul", SNGL, op2(STI,ST), 0 },
/*2*/ { "fcom", SNGL, op2(STI,ST), 0 },
@@ -380,7 +380,7 @@
/*7*/ { "fdivr", SNGL, op2(STI,ST), 0 },
};
-struct finst db_Esc9[] = {
+const struct finst db_Esc9[] = {
/*0*/ { "fld", SNGL, op1(STI), 0 },
/*1*/ { "", NONE, op1(STI), "fxch" },
/*2*/ { "fst", SNGL, op1(X), (char *)db_Esc92 },
@@ -391,7 +391,7 @@
/*7*/ { "fnstcw", NONE, op1(X), (char *)db_Esc97 },
};
-struct finst db_Esca[] = {
+const struct finst db_Esca[] = {
/*0*/ { "fiadd", WORD, 0, 0 },
/*1*/ { "fimul", WORD, 0, 0 },
/*2*/ { "ficom", WORD, 0, 0 },
@@ -402,7 +402,7 @@
/*7*/ { "fidivr", WORD, 0, 0 }
};
-struct finst db_Escb[] = {
+const struct finst db_Escb[] = {
/*0*/ { "fild", WORD, 0, 0 },
/*1*/ { "", NONE, 0, 0 },
/*2*/ { "fist", WORD, 0, 0 },
@@ -413,7 +413,7 @@
/*7*/ { "fstp", EXTR, 0, 0 },
};
-struct finst db_Escc[] = {
+const struct finst db_Escc[] = {
/*0*/ { "fadd", DBLR, op2(ST,STI), 0 },
/*1*/ { "fmul", DBLR, op2(ST,STI), 0 },
/*2*/ { "fcom", DBLR, op2(ST,STI), 0 },
@@ -424,7 +424,7 @@
/*7*/ { "fdivr", DBLR, op2(ST,STI), "fdiv" },
};
-struct finst db_Escd[] = {
+const struct finst db_Escd[] = {
/*0*/ { "fld", DBLR, op1(STI), "ffree" },
/*1*/ { "", NONE, 0, 0 },
/*2*/ { "fst", DBLR, op1(STI), 0 },
@@ -435,7 +435,7 @@
/*7*/ { "fnstsw", NONE, 0, 0 },
};
-struct finst db_Esce[] = {
+const struct finst db_Esce[] = {
/*0*/ { "fiadd", LONG, op2(ST,STI), "faddp" },
/*1*/ { "fimul", LONG, op2(ST,STI), "fmulp" },
/*2*/ { "ficom", LONG, 0, 0 },
@@ -446,7 +446,7 @@
/*7*/ { "fidivr", LONG, op2(ST,STI), "fdivp" },
};
-struct finst db_Escf[] = {
+const struct finst db_Escf[] = {
/*0*/ { "fild", LONG, 0, 0 },
/*1*/ { "", LONG, 0, 0 },
/*2*/ { "fist", LONG, 0, 0 },
@@ -457,12 +457,12 @@
/*7*/ { "fstp", QUAD, 0, 0 },
};
-struct finst *db_Esc_inst[] = {
+const struct finst * const db_Esc_inst[] = {
db_Esc8, db_Esc9, db_Esca, db_Escb,
db_Escc, db_Escd, db_Esce, db_Escf
};
-char * db_Grp1[] = {
+const char * const db_Grp1[] = {
"add",
"or",
"adc",
@@ -473,7 +473,7 @@
"cmp"
};
-char * db_Grp2[] = {
+const char * const db_Grp2[] = {
"rol",
"ror",
"rcl",
@@ -484,7 +484,7 @@
"sar"
};
-struct inst db_Grp3[] = {
+const struct inst db_Grp3[] = {
{ "test", TRUE, NONE, op2(I,E), 0 },
{ "test", TRUE, NONE, op2(I,E), 0 },
{ "not", TRUE, NONE, op1(E), 0 },
@@ -495,7 +495,7 @@
{ "idiv", TRUE, NONE, op2(E,A), 0 },
};
-struct inst db_Grp4[] = {
+const struct inst db_Grp4[] = {
{ "inc", TRUE, BYTE, op1(E), 0 },
{ "dec", TRUE, BYTE, op1(E), 0 },
{ "", TRUE, NONE, 0, 0 },
@@ -506,7 +506,7 @@
{ "", TRUE, NONE, 0, 0 }
};
-struct inst db_Grp5[] = {
+const struct inst db_Grp5[] = {
{ "inc", TRUE, LONG, op1(E), 0 },
{ "dec", TRUE, LONG, op1(E), 0 },
{ "call", TRUE, NONE, op1(Eind),0 },
@@ -517,7 +517,7 @@
{ "", TRUE, NONE, 0, 0 }
};
-struct inst db_inst_table[256] = {
Home |
Main Index |
Thread Index |
Old Index