/* -- assembler routines inserted here. */
/* -- asm.c */
+
+#include "safe-ctype.h"
+
+static int iq2000_cgen_isa_register PARAMS ((const char **));
+static const char * parse_jtargq10 PARAMS ((CGEN_CPU_DESC, const char **, int, int, enum cgen_parse_operand_result *, unsigned long *));
static const char * parse_mimm PARAMS ((CGEN_CPU_DESC, const char **, int, long *));
static const char * parse_imm PARAMS ((CGEN_CPU_DESC, const char **, int, unsigned long *));
static const char * parse_hi16 PARAMS ((CGEN_CPU_DESC, const char **, int, unsigned long *));
static const char * parse_lo16 PARAMS ((CGEN_CPU_DESC, const char **, int, long *));
+static const char * parse_mlo16 PARAMS ((CGEN_CPU_DESC, const char **, int, long *));
/* Special check to ensure that instruction exists for given machine */
int
iq2000_cgen_insn_supported (cd, insn)
CGEN_CPU_DESC cd;
- CGEN_INSN *insn;
+ const CGEN_INSN *insn;
{
int machs = cd->machs;
return 1;
}
}
- if (**strp == '%' && tolower((*strp)[1]) != 'l' && tolower((*strp)[1]) != 'h')
+ if (**strp == '%' && TOLOWER((*strp)[1]) != 'l' && TOLOWER((*strp)[1]) != 'h')
return 1;
return 0;
}
long *valuep;
{
const char *errmsg;
- long value;
/* Verify this isn't a register */
if (iq2000_cgen_isa_register (strp))
if (errmsg == NULL)
{
long x = (-value) & 0xFFFF0000;
- if (x != 0 && x != 0xFFFF0000)
+ if (x != 0 && x != (long) 0xFFFF0000)
errmsg = _("immediate value out of range");
else
*valuep = (-value & 0xFFFF);
unsigned long *valuep;
{
const char *errmsg;
- long value;
if (iq2000_cgen_isa_register (strp))
errmsg = _("immediate value cannot be register");
if (errmsg == NULL)
{
long x = value & 0xFFFF0000;
- if (x != 0 && x != 0xFFFF0000)
+ if (x != 0 && x != (long) 0xFFFF0000)
errmsg = _("immediate value out of range");
else
*valuep = (value & 0xFFFF);
CGEN_CPU_DESC cd;
const char **strp;
int opindex;
- int reloc;
- enum cgen_parse_operand_result *type_addr;
+ int reloc ATTRIBUTE_UNUSED;
+ enum cgen_parse_operand_result *type_addr ATTRIBUTE_UNUSED;
unsigned long *valuep;
{
const char *errmsg;
switch (opindex)
{
+ case IQ2000_OPERAND__INDEX :
+ errmsg = cgen_parse_unsigned_integer (cd, strp, IQ2000_OPERAND__INDEX, &fields->f_index);
+ break;
case IQ2000_OPERAND_BASE :
errmsg = cgen_parse_keyword (cd, strp, & iq2000_cgen_opval_gr_names, & fields->f_rs);
break;
case IQ2000_OPERAND_EXECODE :
errmsg = cgen_parse_unsigned_integer (cd, strp, IQ2000_OPERAND_EXECODE, &fields->f_excode);
break;
- case IQ2000_OPERAND_F_INDEX :
- errmsg = cgen_parse_unsigned_integer (cd, strp, IQ2000_OPERAND_F_INDEX, &fields->f_index);
- break;
case IQ2000_OPERAND_HI16 :
errmsg = parse_hi16 (cd, strp, IQ2000_OPERAND_HI16, &fields->f_imm);
break;