Some const correctness.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3187
This commit is contained in:
parent
6d1979bb9d
commit
becde6b64c
1 changed files with 43 additions and 43 deletions
|
@ -176,9 +176,9 @@ static int addr32bit=0;
|
|||
|
||||
/* watch out for aad && aam with odd operands */
|
||||
|
||||
static char *(*opmap1)[256];
|
||||
static char const* (*opmap1)[256];
|
||||
|
||||
static char *op386map1[256] = {
|
||||
static char const * op386map1[256] = {
|
||||
/* 0 */
|
||||
"add %Eb,%Gb", "add %Ev,%Gv", "add %Gb,%Eb", "add %Gv,%Ev",
|
||||
"add al,%Ib", "add %eax,%Iv", "push es", "pop es",
|
||||
|
@ -266,7 +266,7 @@ static char *op386map1[256] = {
|
|||
"cld", "std", "%g3", "%g4"
|
||||
};
|
||||
|
||||
static char *second[] = {
|
||||
static char const *second[] = {
|
||||
/* 0 */
|
||||
"%g5", "%g6", "lar %Gv,%Ew", "lsl %Gv,%Ew",
|
||||
0, "[loadall]", "clts", "[loadall]",
|
||||
|
@ -333,7 +333,7 @@ static char *second[] = {
|
|||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
};
|
||||
|
||||
static char *groups[][8] = { /* group 0 is group 3 for %Ev set */
|
||||
static char const *groups[][8] = { /* group 0 is group 3 for %Ev set */
|
||||
/* 0 */
|
||||
{ "add", "or", "adc", "sbb",
|
||||
"and", "sub", "xor", "cmp" },
|
||||
|
@ -362,45 +362,45 @@ static char *groups[][8] = { /* group 0 is group 3 for %Ev set */
|
|||
|
||||
/* zero here means invalid. If first entry starts with '*', use st(i) */
|
||||
/* no assumed %EFs here. Indexed by RM(modrm()) */
|
||||
static char *f0[] = { 0, 0, 0, 0, 0, 0, 0, 0};
|
||||
static char *fop_8[] = { "*fld st,%GF" };
|
||||
static char *fop_9[] = { "*fxch st,%GF" };
|
||||
static char *fop_10[] = { "fnop", 0, 0, 0, 0, 0, 0, 0 };
|
||||
static char *fop_11[] = { "*fst st,%GF" };
|
||||
static char *fop_12[] = { "fchs", "fabs", 0, 0, "ftst", "fxam", 0, 0 };
|
||||
static char *fop_13[] = { "fld1", "fldl2t", "fldl2e", "fldpi",
|
||||
static char const *f0[] = { 0, 0, 0, 0, 0, 0, 0, 0};
|
||||
static char const *fop_8[] = { "*fld st,%GF" };
|
||||
static char const *fop_9[] = { "*fxch st,%GF" };
|
||||
static char const *fop_10[] = { "fnop", 0, 0, 0, 0, 0, 0, 0 };
|
||||
static char const *fop_11[] = { "*fst st,%GF" };
|
||||
static char const *fop_12[] = { "fchs", "fabs", 0, 0, "ftst", "fxam", 0, 0 };
|
||||
static char const *fop_13[] = { "fld1", "fldl2t", "fldl2e", "fldpi",
|
||||
"fldlg2", "fldln2", "fldz", 0 };
|
||||
static char *fop_14[] = { "f2xm1", "fyl2x", "fptan", "fpatan",
|
||||
static char const *fop_14[] = { "f2xm1", "fyl2x", "fptan", "fpatan",
|
||||
"fxtract", "fprem1", "fdecstp", "fincstp" };
|
||||
static char *fop_15[] = { "fprem", "fyl2xp1", "fsqrt", "fsincos",
|
||||
static char const *fop_15[] = { "fprem", "fyl2xp1", "fsqrt", "fsincos",
|
||||
"frndint", "fscale", "fsin", "fcos" };
|
||||
static char *fop_21[] = { 0, "fucompp", 0, 0, 0, 0, 0, 0 };
|
||||
static char *fop_28[] = { "[fneni]", "[fndis]", "fclex", "finit", "[fnsetpm]", "[frstpm]", 0, 0 };
|
||||
static char *fop_32[] = { "*fadd %GF,st" };
|
||||
static char *fop_33[] = { "*fmul %GF,st" };
|
||||
static char *fop_34[] = { "*fcom %GF,st" };
|
||||
static char *fop_35[] = { "*fcomp %GF,st" };
|
||||
static char *fop_36[] = { "*fsubr %GF,st" };
|
||||
static char *fop_37[] = { "*fsub %GF,st" };
|
||||
static char *fop_38[] = { "*fdivr %GF,st" };
|
||||
static char *fop_39[] = { "*fdiv %GF,st" };
|
||||
static char *fop_40[] = { "*ffree %GF" };
|
||||
static char *fop_41[] = { "*fxch %GF" };
|
||||
static char *fop_42[] = { "*fst %GF" };
|
||||
static char *fop_43[] = { "*fstp %GF" };
|
||||
static char *fop_44[] = { "*fucom %GF" };
|
||||
static char *fop_45[] = { "*fucomp %GF" };
|
||||
static char *fop_48[] = { "*faddp %GF,st" };
|
||||
static char *fop_49[] = { "*fmulp %GF,st" };
|
||||
static char *fop_50[] = { "*fcomp %GF,st" };
|
||||
static char *fop_51[] = { 0, "fcompp", 0, 0, 0, 0, 0, 0 };
|
||||
static char *fop_52[] = { "*fsubrp %GF,st" };
|
||||
static char *fop_53[] = { "*fsubp %GF,st" };
|
||||
static char *fop_54[] = { "*fdivrp %GF,st" };
|
||||
static char *fop_55[] = { "*fdivp %GF,st" };
|
||||
static char *fop_60[] = { "fstsw ax", 0, 0, 0, 0, 0, 0, 0 };
|
||||
static char const *fop_21[] = { 0, "fucompp", 0, 0, 0, 0, 0, 0 };
|
||||
static char const *fop_28[] = { "[fneni]", "[fndis]", "fclex", "finit", "[fnsetpm]", "[frstpm]", 0, 0 };
|
||||
static char const *fop_32[] = { "*fadd %GF,st" };
|
||||
static char const *fop_33[] = { "*fmul %GF,st" };
|
||||
static char const *fop_34[] = { "*fcom %GF,st" };
|
||||
static char const *fop_35[] = { "*fcomp %GF,st" };
|
||||
static char const *fop_36[] = { "*fsubr %GF,st" };
|
||||
static char const *fop_37[] = { "*fsub %GF,st" };
|
||||
static char const *fop_38[] = { "*fdivr %GF,st" };
|
||||
static char const *fop_39[] = { "*fdiv %GF,st" };
|
||||
static char const *fop_40[] = { "*ffree %GF" };
|
||||
static char const *fop_41[] = { "*fxch %GF" };
|
||||
static char const *fop_42[] = { "*fst %GF" };
|
||||
static char const *fop_43[] = { "*fstp %GF" };
|
||||
static char const *fop_44[] = { "*fucom %GF" };
|
||||
static char const *fop_45[] = { "*fucomp %GF" };
|
||||
static char const *fop_48[] = { "*faddp %GF,st" };
|
||||
static char const *fop_49[] = { "*fmulp %GF,st" };
|
||||
static char const *fop_50[] = { "*fcomp %GF,st" };
|
||||
static char const *fop_51[] = { 0, "fcompp", 0, 0, 0, 0, 0, 0 };
|
||||
static char const *fop_52[] = { "*fsubrp %GF,st" };
|
||||
static char const *fop_53[] = { "*fsubp %GF,st" };
|
||||
static char const *fop_54[] = { "*fdivrp %GF,st" };
|
||||
static char const *fop_55[] = { "*fdivp %GF,st" };
|
||||
static char const *fop_60[] = { "fstsw ax", 0, 0, 0, 0, 0, 0, 0 };
|
||||
|
||||
static char **fspecial[] = { /* 0=use st(i), 1=undefined 0 in fop_* means undefined */
|
||||
static char const **fspecial[] = { /* 0=use st(i), 1=undefined 0 in fop_* means undefined */
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
fop_8, fop_9, fop_10, fop_11, fop_12, fop_13, fop_14, fop_15,
|
||||
f0, f0, f0, f0, f0, fop_21, f0, f0,
|
||||
|
@ -411,7 +411,7 @@ static char **fspecial[] = { /* 0=use st(i), 1=undefined 0 in fop_* means undefi
|
|||
f0, f0, f0, f0, fop_60, f0, f0, f0,
|
||||
};
|
||||
|
||||
static char *floatops[] = { /* assumed " %EF" at end of each. mod != 3 only */
|
||||
static const char *floatops[] = { /* assumed " %EF" at end of each. mod != 3 only */
|
||||
/*00*/ "fadd", "fmul", "fcom", "fcomp",
|
||||
"fsub", "fsubr", "fdiv", "fdivr",
|
||||
/*08*/ "fld", 0, "fst", "fstp",
|
||||
|
@ -482,7 +482,7 @@ static int sib(void)
|
|||
|
||||
/*------------------------------------------------------------------------*/
|
||||
|
||||
static void uprintf(char *s, ...)
|
||||
static void uprintf(char const *s, ...)
|
||||
{
|
||||
va_list arg_ptr;
|
||||
va_start (arg_ptr, s);
|
||||
|
@ -674,7 +674,7 @@ static void reg_name(int regnum, char size)
|
|||
|
||||
/*------------------------------------------------------------------------*/
|
||||
|
||||
static void ua_str(char *str);
|
||||
static void ua_str(char const *str);
|
||||
|
||||
static void do_sib(int m)
|
||||
{
|
||||
|
@ -1035,7 +1035,7 @@ static void percent(char type, char subtype)
|
|||
}
|
||||
|
||||
|
||||
static void ua_str(char *str)
|
||||
static void ua_str(char const *str)
|
||||
{
|
||||
char c;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue