static void
tic54x_mmregs (int ignored ATTRIBUTE_UNUSED)
{
- symbol *sym;
+ tic54x_symbol *sym;
ILLEGAL_WITHIN_STRUCT ();
- for (sym = (symbol *) mmregs; sym->name; sym++)
+ for (sym = (tic54x_symbol *) mmregs; sym->name; sym++)
{
symbolS *symbolP = symbol_new (sym->name, absolute_section,
(valueT) sym->value, &zero_address_frag);
md_begin (void)
{
insn_template *tm;
- symbol *sym;
+ tic54x_symbol *sym;
const subsym_proc_entry *subsym_proc;
const math_proc_entry *math_proc;
const char *hash_err;
tm->name, hash_err);
}
reg_hash = hash_new ();
- for (sym = (symbol *) regs; sym->name; sym++)
+ for (sym = (tic54x_symbol *) regs; sym->name; sym++)
{
/* Add basic registers to the symbol table. */
symbolS *symbolP = symbol_new (sym->name, absolute_section,
symbol_table_insert (symbolP);
hash_err = hash_insert (reg_hash, sym->name, (char *) sym);
}
- for (sym = (symbol *) mmregs; sym->name; sym++)
+ for (sym = (tic54x_symbol *) mmregs; sym->name; sym++)
hash_err = hash_insert (reg_hash, sym->name, (char *) sym);
mmreg_hash = hash_new ();
- for (sym = (symbol *) mmregs; sym->name; sym++)
+ for (sym = (tic54x_symbol *) mmregs; sym->name; sym++)
hash_err = hash_insert (mmreg_hash, sym->name, (char *) sym);
cc_hash = hash_new ();
- for (sym = (symbol *) condition_codes; sym->name; sym++)
+ for (sym = (tic54x_symbol *) condition_codes; sym->name; sym++)
hash_err = hash_insert (cc_hash, sym->name, (char *) sym);
cc2_hash = hash_new ();
- for (sym = (symbol *) cc2_codes; sym->name; sym++)
+ for (sym = (tic54x_symbol *) cc2_codes; sym->name; sym++)
hash_err = hash_insert (cc2_hash, sym->name, (char *) sym);
cc3_hash = hash_new ();
- for (sym = (symbol *) cc3_codes; sym->name; sym++)
+ for (sym = (tic54x_symbol *) cc3_codes; sym->name; sym++)
hash_err = hash_insert (cc3_hash, sym->name, (char *) sym);
sbit_hash = hash_new ();
- for (sym = (symbol *) status_bits; sym->name; sym++)
+ for (sym = (tic54x_symbol *) status_bits; sym->name; sym++)
hash_err = hash_insert (sbit_hash, sym->name, (char *) sym);
misc_symbol_hash = hash_new ();
static int
encode_condition (tic54x_insn *insn, struct opstruct *operand)
{
- symbol *cc = (symbol *) hash_find (cc_hash, operand->buf);
+ tic54x_symbol *cc = (tic54x_symbol *) hash_find (cc_hash, operand->buf);
if (!cc)
{
as_bad (_("Unrecognized condition code \"%s\""), operand->buf);
static int
encode_cc3 (tic54x_insn *insn, struct opstruct *operand)
{
- symbol *cc3 = (symbol *) hash_find (cc3_hash, operand->buf);
+ tic54x_symbol *cc3 = (tic54x_symbol *) hash_find (cc3_hash, operand->buf);
int value = cc3 ? cc3->value : operand->exp.X_add_number << 8;
if ((value & 0x0300) != value)
static int
encode_cc2 (tic54x_insn *insn, struct opstruct *operand)
{
- symbol *cc2 = (symbol *) hash_find (cc2_hash, operand->buf);
+ tic54x_symbol *cc2 = (tic54x_symbol *) hash_find (cc2_hash, operand->buf);
if (!cc2)
{
0, 65535, 0xFFFF);
case OP_SBIT:
{
- symbol *sbit = (symbol *) hash_find (sbit_hash, operand->buf);
+ tic54x_symbol *sbit = (tic54x_symbol *)
+ hash_find (sbit_hash, operand->buf);
int value = is_absolute (operand) ?
operand->exp.X_add_number : (sbit ? sbit->value : -1);
int reg = 0;
}
/* Guess the register based on the status bit; "ovb" is the last
status bit defined for st0. */
- if (sbit > (symbol *) hash_find (sbit_hash, "ovb"))
+ if (sbit > (tic54x_symbol *) hash_find (sbit_hash, "ovb"))
reg = 1;
}
if (value == -1)
symbolS *
tic54x_undefined_symbol (char *name)
{
- symbol *sym;
+ tic54x_symbol *sym;
/* Not sure how to handle predefined symbols. */
- if ((sym = (symbol *) hash_find (cc_hash, name)) != NULL ||
- (sym = (symbol *) hash_find (cc2_hash, name)) != NULL ||
- (sym = (symbol *) hash_find (cc3_hash, name)) != NULL ||
- (sym = (symbol *) hash_find (misc_symbol_hash, name)) != NULL ||
- (sym = (symbol *) hash_find (sbit_hash, name)) != NULL)
+ if ((sym = (tic54x_symbol *) hash_find (cc_hash, name)) != NULL ||
+ (sym = (tic54x_symbol *) hash_find (cc2_hash, name)) != NULL ||
+ (sym = (tic54x_symbol *) hash_find (cc3_hash, name)) != NULL ||
+ (sym = (tic54x_symbol *) hash_find (misc_symbol_hash, name)) != NULL ||
+ (sym = (tic54x_symbol *) hash_find (sbit_hash, name)) != NULL)
{
return symbol_new (name, reg_section,
(valueT) sym->value,
&zero_address_frag);
}
- if ((sym = (symbol *) hash_find (reg_hash, name)) != NULL ||
- (sym = (symbol *) hash_find (mmreg_hash, name)) != NULL ||
+ if ((sym = (tic54x_symbol *) hash_find (reg_hash, name)) != NULL ||
+ (sym = (tic54x_symbol *) hash_find (mmreg_hash, name)) != NULL ||
!strcasecmp (name, "a") || !strcasecmp (name, "b"))
{
return symbol_new (name, reg_section,
#include "opcode/tic54x.h"
/* these are the only register names not found in mmregs */
-const symbol regs[] = {
+const tic54x_symbol regs[] = {
{ "AR0", 16 }, { "ar0", 16 },
{ "AR1", 17 }, { "ar1", 17 },
{ "AR2", 18 }, { "ar2", 18 },
/* status bits, MM registers, condition codes, etc */
/* some symbols are only valid for certain chips... */
-const symbol mmregs[] = {
+const tic54x_symbol mmregs[] = {
{ "IMR", 0 }, { "imr", 0 },
{ "IFR", 1 }, { "ifr", 1 },
{ "ST0", 6 }, { "st0", 6 },
{ NULL, 0},
};
-const symbol condition_codes[] = {
+const tic54x_symbol condition_codes[] = {
/* condition codes */
{ "UNC", 0 }, { "unc", 0 },
#define CC1 0x40
{ NULL, 0 }
};
-const symbol cc2_codes[] = {
+const tic54x_symbol cc2_codes[] = {
{ "UNC", 0 }, { "unc", 0 },
{ "AEQ", 5 }, { "aeq", 5 },
{ "ANEQ", 4 }, { "aneq", 4 },
{ NULL, 0 },
};
-const symbol cc3_codes[] = {
+const tic54x_symbol cc3_codes[] = {
{ "EQ", 0x0000 }, { "eq", 0x0000 },
{ "LT", 0x0100 }, { "lt", 0x0100 },
{ "GT", 0x0200 }, { "gt", 0x0200 },
};
/* FIXME -- also allow decimal digits */
-const symbol status_bits[] = {
+const tic54x_symbol status_bits[] = {
/* status register 0 */
{ "TC", 12 }, { "tc", 12 },
{ "C", 11 }, { "c", 11 },