Field table for operands and bit-fields. */
-const field_t operand_fields[] =
+const field_t nds32_operand_fields[] =
{
{"rt", 20, 5, 0, HW_GPR, NULL},
{"ra", 15, 5, 0, HW_GPR, NULL},
{NULL, NULL, 0, 0, 0, 0, NULL, 0, NULL},
};
-const keyword_t keyword_gpr[] =
+const keyword_t nds32_keyword_gpr[] =
{
/* Standard names. */
{"r0", 0, ATTR (RDREG)}, {"r1", 1, ATTR (RDREG)}, {"r2", 2, ATTR (RDREG)},
{NULL, 0, 0}
};
-const keyword_t keyword_usr[] =
+static const keyword_t keyword_usr[] =
{
{"d0.lo", USRIDX (0, 0), 0},
{"d0.hi", USRIDX (0, 1), 0},
{NULL, 0, 0}
};
-const keyword_t keyword_dxr[] =
+static const keyword_t keyword_dxr[] =
{
{"d0", 0, 0}, {"d1", 1, 0}, {NULL, 0, 0}
};
-const keyword_t keyword_sr[] =
+static const keyword_t keyword_sr[] =
{
{"cpu_ver", SRIDX (0, 0, 0), 0}, {"cr0", SRIDX (0, 0, 0), 0},
{"icm_cfg", SRIDX (0, 1, 0), 0}, {"cr1", SRIDX (0, 1, 0), 0},
{NULL,0 ,0}
};
-const keyword_t keyword_cp[] =
+static const keyword_t keyword_cp[] =
{
{"cp0", 0, 0}, {"cp1", 1, 0}, {"cp2", 2, 0}, {"cp3", 3, 0}, {NULL, 0, 0}
};
-const keyword_t keyword_cpr[] =
+static const keyword_t keyword_cpr[] =
{
{"cpr0", 0, 0}, {"cpr1", 1, 0}, {"cpr2", 2, 0}, {"cpr3", 3, 0},
{"cpr4", 4, 0}, {"cpr5", 5, 0}, {"cpr6", 6, 0}, {"cpr7", 7, 0},
{NULL, 0, 0}
};
-const keyword_t keyword_fsr[] =
+static const keyword_t keyword_fsr[] =
{
{"fs0", 0, 0}, {"fs1", 1, 0}, {"fs2", 2, 0}, {"fs3", 3, 0}, {"fs4", 4, 0},
{"fs5", 5, 0}, {"fs6", 6, 0}, {"fs7", 7, 0}, {"fs8", 8, 0}, {"fs9", 9, 0},
{"fs30", 30, 0}, {"fs31", 31, 0}, {NULL, 0 ,0}
};
-const keyword_t keyword_fdr[] =
+static const keyword_t keyword_fdr[] =
{
{"fd0", 0, 0}, {"fd1", 1, 0}, {"fd2", 2, 0}, {"fd3", 3, 0}, {"fd4", 4, 0},
{"fd5", 5, 0}, {"fd6", 6, 0}, {"fd7", 7, 0}, {"fd8", 8, 0}, {"fd9", 9, 0},
{"fd30", 30, 0}, {"fd31", 31, 0}, {NULL, 0, 0}
};
-const keyword_t keyword_abdim[] =
+static const keyword_t keyword_abdim[] =
{
{"bi", 0, 0}, {"bim", 1, 0}, {"bd", 2, 0}, {"bdm", 3, 0},
{"ai", 4, 0}, {"aim", 5, 0}, {"ad", 6, 0}, {"adm", 7, 0},
{NULL, 0, 0}
};
-const keyword_t keyword_abm[] =
+static const keyword_t keyword_abm[] =
{
{"b", 0, 0}, {"bm", 1, 0}, {"bx", 2, 0}, {"bmx", 3, 0},
{"a", 4, 0}, {"am", 5, 0}, {"ax", 6, 0}, {"amx", 7, 0},
{"itoff", 1, 0}, {"toff", 3, 0}, {NULL, 0, 0}
};
-const keyword_t keyword_dpref_st[] =
+static const keyword_t keyword_dpref_st[] =
{
{"srd", 0, 0}, {"mrd", 1, 0}, {"swr", 2, 0}, {"mwr", 3, 0},
{"pte", 4, 0}, {"clwr", 5, 0}, {NULL, 0, 0}
{"l1d_wball", 0xf, 0}, {NULL, 0, 0}
};
-const keyword_t keyword_cctl_lv[] =
+static const keyword_t keyword_cctl_lv[] =
{
{"1level", 0, 0}, {"alevel", 1, 0}, {"0", 0, 0}, {"1", 1, 0},
{NULL, 0, 0},
{NULL, 0, 0},
};
-const keyword_t keyword_standby_st[] =
+static const keyword_t keyword_standby_st[] =
{
{"no_wake_grant", 0, 0},
{"wake_grant", 1, 0},
{NULL, 0, 0},
};
-const keyword_t keyword_msync_st[] =
+static const keyword_t keyword_msync_st[] =
{
{"all", 0, 0}, {"store", 1, 0},
{NULL, 0, 0}
};
-const keyword_t keyword_im5_i[] =
+static const keyword_t keyword_im5_i[] =
{
{"i0", 0, 0}, {"i1", 1, 0}, {"i2", 2, 0}, {"i3", 3, 0},
{"i4", 4, 0}, {"i5", 5, 0}, {"i6", 6, 0}, {"i7", 7, 0},
{NULL, 0, 0}
};
-const keyword_t keyword_im5_m[] =
+static const keyword_t keyword_im5_m[] =
{
{"m0", 0, 0}, {"m1", 1, 0}, {"m2", 2, 0}, {"m3", 3, 0},
{"m4", 4, 0}, {"m5", 5, 0}, {"m6", 6, 0}, {"m7", 7, 0},
{NULL, 0, 0}
};
-const keyword_t keyword_accumulator[] =
+static const keyword_t keyword_accumulator[] =
{
{"d0.lo", 0, 0}, {"d0.hi", 1, 0}, {"d1.lo", 2, 0}, {"d1.hi", 3, 0},
{NULL, 0, 0}
};
-const keyword_t keyword_aridx[] =
+static const keyword_t keyword_aridx[] =
{
{"i0", 0, 0}, {"i1", 1, 0}, {"i2", 2, 0}, {"i3", 3, 0},
{"i4", 4, 0}, {"i5", 5, 0}, {"i6", 6, 0}, {"i7", 7, 0},
{NULL, 0, 0}
};
-const keyword_t keyword_aridx2[] =
+static const keyword_t keyword_aridx2[] =
{
{"cbb0", 0, 0}, {"cbb1", 1, 0}, {"cbb2", 2, 0}, {"cbb3", 3, 0},
{"cbe0", 4, 0}, {"cbe1", 5, 0}, {"cbe2", 6, 0}, {"cbe3", 7, 0},
{NULL, 0, 0}
};
-const keyword_t keyword_aridxi[] =
+static const keyword_t keyword_aridxi[] =
{
{"i0", 0, 0}, {"i1", 1, 0}, {"i2", 2, 0}, {"i3", 3, 0},
{"i4", 4, 0}, {"i5", 5, 0}, {"i6", 6, 0}, {"i7", 7, 0},
{NULL, 0, 0}
};
-const keyword_t keyword_aridxi_mx[] =
+static const keyword_t keyword_aridxi_mx[] =
{
{"m1", 9, 0}, {"m2", 10, 0}, {"m3",11, 0},
{"m5",13, 0}, {"m6",14, 0}, {"m7",15, 0},
{NULL, 0, 0}
};
-const keyword_t *keywords[_HW_LAST] =
+const keyword_t *nds32_keywords[_HW_LAST] =
{
- keyword_gpr, keyword_usr, keyword_dxr, keyword_sr, keyword_fsr,
+ nds32_keyword_gpr, keyword_usr, keyword_dxr, keyword_sr, keyword_fsr,
keyword_fdr, keyword_cp, keyword_cpr, keyword_abdim, keyword_abm,
keyword_dtiton, keyword_dtitoff, keyword_dpref_st,
keyword_cctl_st0, keyword_cctl_st1, keyword_cctl_st2,
k = i;
}
}
- assert (fidx >= 0 && fidx < (int) ARRAY_SIZE (operand_fields));
+ assert (fidx >= 0 && fidx < (int) ARRAY_SIZE (nds32_operand_fields));
*plex |= LEX_SET_FIELD (k, fidx);
str += len;
pdesc->mach = flags & NASM_OPEN_ARCH_MASK;
/* Setup main core. */
- nds32_keyword_table[NDS32_MAIN_CORE] = &keywords[0];
+ nds32_keyword_table[NDS32_MAIN_CORE] = &nds32_keywords[0];
nds32_keyword_count_table[NDS32_MAIN_CORE] = _HW_LAST;
nds32_opcode_table[NDS32_MAIN_CORE] = &nds32_opcodes[0];
- nds32_field_table[NDS32_MAIN_CORE] = &operand_fields[0];
+ nds32_field_table[NDS32_MAIN_CORE] = &nds32_operand_fields[0];
/* Build operand hash table. */
build_operand_hash_table ();
extern opcode_t *nds32_opcode_table[NDS32_CORE_COUNT];
extern keyword_t **nds32_keyword_table[NDS32_CORE_COUNT];
extern struct nds32_opcode nds32_opcodes[];
-extern const field_t operand_fields[];
-extern keyword_t *keywords[];
-extern const keyword_t keyword_gpr[];
+extern const field_t nds32_operand_fields[];
+extern keyword_t *nds32_keywords[];
+extern const keyword_t nds32_keyword_gpr[];
static uint32_t nds32_mask_opcode (uint32_t);
static void nds32_special_opcode (uint32_t, struct nds32_opcode **);
int_value =
__GF (insn, pfd->bitpos, pfd->bitsize) << pfd->shift;
new_value = int_value;
- psys_reg = (keyword_t*) keywords[pfd->hw_res];
+ psys_reg = (keyword_t*) nds32_keywords[pfd->hw_res];
/* p = bit[4].bit[1:0], r = bit[4].bit[3:2]. */
if (strcmp (pfd->name, "im5_i") == 0)
case '=':
case '&':
pstr_src++;
- /* Compare with operand_fields[].name. */
+ /* Compare with nds32_operand_fields[].name. */
pstr_tmp = &tmp_string[0];
while (*pstr_src)
{
{
int_value = nds32_r45map[int_value];
}
- func (stream, "$%s", keyword_gpr[int_value].name);
+ func (stream, "$%s", nds32_keyword_gpr[int_value].name);
}
else if ((pfd->hw_res == HW_INT) || (pfd->hw_res == HW_UINT))
{
{
func (stream, "#%d ! {$r6", int_value);
if (push25gpr != 6)
- func (stream, "~$%s", keyword_gpr[push25gpr].name);
+ func (stream, "~$%s", nds32_keyword_gpr[push25gpr].name);
func (stream, ", $fp, $gp, $lp}");
}
else if (pfd->hw_res == HW_INT)
the convience comparing with bsp320. */
if (lsmwRb != 31 || lsmwRe != 31)
{
- func (stream, "$%s", keyword_gpr[lsmwRb].name);
+ func (stream, "$%s", nds32_keyword_gpr[lsmwRb].name);
if (lsmwRb != lsmwRe)
- func (stream, "~$%s", keyword_gpr[lsmwRe].name);
+ func (stream, "~$%s", nds32_keyword_gpr[lsmwRe].name);
ifthe1st = 0;
}
if (lsmwEnb4 != 0)
if (ifthe1st == 1)
{
ifthe1st = 0;
- func (stream, "$%s", keyword_gpr[28 + i].name);
+ func (stream, "$%s", nds32_keyword_gpr[28 + i].name);
}
else
- func (stream, ", $%s", keyword_gpr[28 + i].name);
+ func (stream, ", $%s", nds32_keyword_gpr[28 + i].name);
}
checkbit >>= 1;
}
return;
/* Setup main core. */
- nds32_keyword_table[NDS32_MAIN_CORE] = &keywords[0];
+ nds32_keyword_table[NDS32_MAIN_CORE] = &nds32_keywords[0];
nds32_opcode_table[NDS32_MAIN_CORE] = &nds32_opcodes[0];
- nds32_field_table[NDS32_MAIN_CORE] = &operand_fields[0];
+ nds32_field_table[NDS32_MAIN_CORE] = &nds32_operand_fields[0];
/* Build opcode table. */
opcode_htab = htab_create_alloc (1024, htab_hash_hash, htab_hash_eq,