vex;
unsigned char need_vex;
- const char **names64;
- const char **names32;
- const char **names16;
- const char **names8;
- const char **names8rex;
- const char **names_seg;
+ const char *const *names64;
+ const char *const *names32;
+ const char *const *names16;
+ const char *const *names8;
+ const char *const *names8rex;
+ const char *const *names_seg;
const char *index64;
const char *index32;
- const char **index16;
- const char **names_bnd;
- const char **names_mm;
- const char **names_xmm;
- const char **names_ymm;
- const char **names_zmm;
- const char **names_tmm;
- const char **names_mask;
+ const char *const *index16;
+ const char *const *names_bnd;
+ const char *const *names_mm;
+ const char *const *names_xmm;
+ const char *const *names_ymm;
+ const char *const *names_zmm;
+ const char *const *names_tmm;
+ const char *const *names_mask;
/* Remember if the current op is a jump instruction. */
bool op_is_jump;
need to update onebyte_has_modrm or twobyte_has_modrm. */
#define MODRM_CHECK if (!ins->need_modrm) abort ()
-static const char *intel_names64[] = {
+static const char *const intel_names64[] = {
"rax", "rcx", "rdx", "rbx", "rsp", "rbp", "rsi", "rdi",
"r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15"
};
-static const char *intel_names32[] = {
+static const char *const intel_names32[] = {
"eax", "ecx", "edx", "ebx", "esp", "ebp", "esi", "edi",
"r8d", "r9d", "r10d", "r11d", "r12d", "r13d", "r14d", "r15d"
};
-static const char *intel_names16[] = {
+static const char *const intel_names16[] = {
"ax", "cx", "dx", "bx", "sp", "bp", "si", "di",
"r8w", "r9w", "r10w", "r11w", "r12w", "r13w", "r14w", "r15w"
};
-static const char *intel_names8[] = {
+static const char *const intel_names8[] = {
"al", "cl", "dl", "bl", "ah", "ch", "dh", "bh",
};
-static const char *intel_names8rex[] = {
+static const char *const intel_names8rex[] = {
"al", "cl", "dl", "bl", "spl", "bpl", "sil", "dil",
"r8b", "r9b", "r10b", "r11b", "r12b", "r13b", "r14b", "r15b"
};
-static const char *intel_names_seg[] = {
+static const char *const intel_names_seg[] = {
"es", "cs", "ss", "ds", "fs", "gs", "?", "?",
};
-static const char *intel_index64 = "riz";
-static const char *intel_index32 = "eiz";
-static const char *intel_index16[] = {
+static const char intel_index64[] = "riz";
+static const char intel_index32[] = "eiz";
+static const char *const intel_index16[] = {
"bx+si", "bx+di", "bp+si", "bp+di", "si", "di", "bp", "bx"
};
-static const char *att_names64[] = {
+static const char *const att_names64[] = {
"%rax", "%rcx", "%rdx", "%rbx", "%rsp", "%rbp", "%rsi", "%rdi",
"%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15"
};
-static const char *att_names32[] = {
+static const char *const att_names32[] = {
"%eax", "%ecx", "%edx", "%ebx", "%esp", "%ebp", "%esi", "%edi",
"%r8d", "%r9d", "%r10d", "%r11d", "%r12d", "%r13d", "%r14d", "%r15d"
};
-static const char *att_names16[] = {
+static const char *const att_names16[] = {
"%ax", "%cx", "%dx", "%bx", "%sp", "%bp", "%si", "%di",
"%r8w", "%r9w", "%r10w", "%r11w", "%r12w", "%r13w", "%r14w", "%r15w"
};
-static const char *att_names8[] = {
+static const char *const att_names8[] = {
"%al", "%cl", "%dl", "%bl", "%ah", "%ch", "%dh", "%bh",
};
-static const char *att_names8rex[] = {
+static const char *const att_names8rex[] = {
"%al", "%cl", "%dl", "%bl", "%spl", "%bpl", "%sil", "%dil",
"%r8b", "%r9b", "%r10b", "%r11b", "%r12b", "%r13b", "%r14b", "%r15b"
};
-static const char *att_names_seg[] = {
+static const char *const att_names_seg[] = {
"%es", "%cs", "%ss", "%ds", "%fs", "%gs", "%?", "%?",
};
-static const char *att_index64 = "%riz";
-static const char *att_index32 = "%eiz";
-static const char *att_index16[] = {
+static const char att_index64[] = "%riz";
+static const char att_index32[] = "%eiz";
+static const char *const att_index16[] = {
"%bx,%si", "%bx,%di", "%bp,%si", "%bp,%di", "%si", "%di", "%bp", "%bx"
};
-static const char *intel_names_mm[] = {
+static const char *const intel_names_mm[] = {
"mm0", "mm1", "mm2", "mm3",
"mm4", "mm5", "mm6", "mm7"
};
-static const char *att_names_mm[] = {
+static const char *const att_names_mm[] = {
"%mm0", "%mm1", "%mm2", "%mm3",
"%mm4", "%mm5", "%mm6", "%mm7"
};
-static const char *intel_names_bnd[] = {
+static const char *const intel_names_bnd[] = {
"bnd0", "bnd1", "bnd2", "bnd3"
};
-static const char *att_names_bnd[] = {
+static const char *const att_names_bnd[] = {
"%bnd0", "%bnd1", "%bnd2", "%bnd3"
};
-static const char *intel_names_xmm[] = {
+static const char *const intel_names_xmm[] = {
"xmm0", "xmm1", "xmm2", "xmm3",
"xmm4", "xmm5", "xmm6", "xmm7",
"xmm8", "xmm9", "xmm10", "xmm11",
"xmm24", "xmm25", "xmm26", "xmm27",
"xmm28", "xmm29", "xmm30", "xmm31"
};
-static const char *att_names_xmm[] = {
+static const char *const att_names_xmm[] = {
"%xmm0", "%xmm1", "%xmm2", "%xmm3",
"%xmm4", "%xmm5", "%xmm6", "%xmm7",
"%xmm8", "%xmm9", "%xmm10", "%xmm11",
"%xmm28", "%xmm29", "%xmm30", "%xmm31"
};
-static const char *intel_names_ymm[] = {
+static const char *const intel_names_ymm[] = {
"ymm0", "ymm1", "ymm2", "ymm3",
"ymm4", "ymm5", "ymm6", "ymm7",
"ymm8", "ymm9", "ymm10", "ymm11",
"ymm24", "ymm25", "ymm26", "ymm27",
"ymm28", "ymm29", "ymm30", "ymm31"
};
-static const char *att_names_ymm[] = {
+static const char *const att_names_ymm[] = {
"%ymm0", "%ymm1", "%ymm2", "%ymm3",
"%ymm4", "%ymm5", "%ymm6", "%ymm7",
"%ymm8", "%ymm9", "%ymm10", "%ymm11",
"%ymm28", "%ymm29", "%ymm30", "%ymm31"
};
-static const char *intel_names_zmm[] = {
+static const char *const intel_names_zmm[] = {
"zmm0", "zmm1", "zmm2", "zmm3",
"zmm4", "zmm5", "zmm6", "zmm7",
"zmm8", "zmm9", "zmm10", "zmm11",
"zmm24", "zmm25", "zmm26", "zmm27",
"zmm28", "zmm29", "zmm30", "zmm31"
};
-static const char *att_names_zmm[] = {
+static const char *const att_names_zmm[] = {
"%zmm0", "%zmm1", "%zmm2", "%zmm3",
"%zmm4", "%zmm5", "%zmm6", "%zmm7",
"%zmm8", "%zmm9", "%zmm10", "%zmm11",
"%zmm28", "%zmm29", "%zmm30", "%zmm31"
};
-static const char *intel_names_tmm[] = {
+static const char *const intel_names_tmm[] = {
"tmm0", "tmm1", "tmm2", "tmm3",
"tmm4", "tmm5", "tmm6", "tmm7"
};
-static const char *att_names_tmm[] = {
+static const char *const att_names_tmm[] = {
"%tmm0", "%tmm1", "%tmm2", "%tmm3",
"%tmm4", "%tmm5", "%tmm6", "%tmm7"
};
-static const char *intel_names_mask[] = {
+static const char *const intel_names_mask[] = {
"k0", "k1", "k2", "k3", "k4", "k5", "k6", "k7"
};
-static const char *att_names_mask[] = {
+static const char *const att_names_mask[] = {
"%k0", "%k1", "%k2", "%k3", "%k4", "%k5", "%k6", "%k7"
};
},
};
-static char *fgrps[][8] = {
+static const char *const fgrps[][8] = {
/* Bad opcode 0 */
{
"(bad)","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
print_register (instr_info *ins, unsigned int reg, unsigned int rexmask,
int bytemode, int sizeflag)
{
- const char **names;
+ const char *const *names;
USED_REX (rexmask);
if (ins->rex & rexmask)
|| bytemode == bnd_mode
|| bytemode == bnd_swap_mode);
bool check_gather = false;
- const char **indexes64 = ins->names64;
- const char **indexes32 = ins->names32;
+ const char *const *indexes64 = ins->names64;
+ const char *const *indexes32 = ins->names32;
havesib = 0;
havebase = 1;
int sizeflag ATTRIBUTE_UNUSED)
{
int reg = ins->modrm.reg;
- const char **names;
+ const char *const *names;
ins->used_prefixes |= (ins->prefixes & PREFIX_DATA);
if (ins->prefixes & PREFIX_DATA)
static void
print_vector_reg (instr_info *ins, unsigned int reg, int bytemode)
{
- const char **names;
+ const char *const *names;
if (bytemode == xmmq_mode
|| bytemode == evex_half_bcst_xmmqh_mode
OP_EM (instr_info *ins, int bytemode, int sizeflag)
{
int reg;
- const char **names;
+ const char *const *names;
if (ins->modrm.mod != 3)
{
/* monitor %{e,r,}ax,%ecx,%edx" */
if (!ins->intel_syntax)
{
- const char **names = (ins->address_mode == mode_64bit
- ? ins->names64 : ins->names32);
+ const char *const *names = (ins->address_mode == mode_64bit
+ ? ins->names64 : ins->names32);
if (ins->prefixes & PREFIX_ADDR)
{
static void
XMM_Fixup (instr_info *ins, int reg, int sizeflag ATTRIBUTE_UNUSED)
{
- const char **names;
+ const char *const *names;
if (ins->need_vex)
{
OP_VEX (instr_info *ins, int bytemode, int sizeflag ATTRIBUTE_UNUSED)
{
int reg, modrm_reg, sib_index = -1;
- const char **names;
+ const char *const *names;
if (!ins->need_vex)
abort ();
OP_REG_VexI4 (instr_info *ins, int bytemode, int sizeflag ATTRIBUTE_UNUSED)
{
int reg;
- const char **names = ins->names_xmm;
+ const char *const *names = ins->names_xmm;
FETCH_DATA (ins->info, ins->codep + 1);
reg = *ins->codep++;