static long extract_bdm (unsigned long, int, int *);
static unsigned long insert_bdp (unsigned long, long, int, const char **);
static long extract_bdp (unsigned long, int, int *);
-static int valid_bo (long, int);
static unsigned long insert_bo (unsigned long, long, int, const char **);
static long extract_bo (unsigned long, int, int *);
static unsigned long insert_boe (unsigned long, long, int, const char **);
/*ARGSUSED*/
static unsigned long
-insert_bat (insn, value, dialect, errmsg)
- unsigned long insn;
- long value ATTRIBUTE_UNUSED;
- int dialect ATTRIBUTE_UNUSED;
- const char **errmsg ATTRIBUTE_UNUSED;
+insert_bat (unsigned long insn,
+ long value ATTRIBUTE_UNUSED,
+ int dialect ATTRIBUTE_UNUSED,
+ const char **errmsg ATTRIBUTE_UNUSED)
{
return insn | (((insn >> 21) & 0x1f) << 16);
}
static long
-extract_bat (insn, dialect, invalid)
- unsigned long insn;
- int dialect ATTRIBUTE_UNUSED;
- int *invalid;
+extract_bat (unsigned long insn,
+ int dialect ATTRIBUTE_UNUSED,
+ int *invalid)
{
- if (invalid != (int *) NULL
+ if (invalid != NULL
&& ((insn >> 21) & 0x1f) != ((insn >> 16) & 0x1f))
*invalid = 1;
return 0;
/*ARGSUSED*/
static unsigned long
-insert_bba (insn, value, dialect, errmsg)
- unsigned long insn;
- long value ATTRIBUTE_UNUSED;
- int dialect ATTRIBUTE_UNUSED;
- const char **errmsg ATTRIBUTE_UNUSED;
+insert_bba (unsigned long insn,
+ long value ATTRIBUTE_UNUSED,
+ int dialect ATTRIBUTE_UNUSED,
+ const char **errmsg ATTRIBUTE_UNUSED)
{
return insn | (((insn >> 16) & 0x1f) << 11);
}
static long
-extract_bba (insn, dialect, invalid)
- unsigned long insn;
- int dialect ATTRIBUTE_UNUSED;
- int *invalid;
+extract_bba (unsigned long insn,
+ int dialect ATTRIBUTE_UNUSED,
+ int *invalid)
{
- if (invalid != (int *) NULL
+ if (invalid != NULL
&& ((insn >> 16) & 0x1f) != ((insn >> 11) & 0x1f))
*invalid = 1;
return 0;
/*ARGSUSED*/
static unsigned long
-insert_bd (insn, value, dialect, errmsg)
- unsigned long insn;
- long value;
- int dialect ATTRIBUTE_UNUSED;
- const char **errmsg ATTRIBUTE_UNUSED;
+insert_bd (unsigned long insn,
+ long value,
+ int dialect ATTRIBUTE_UNUSED,
+ const char **errmsg ATTRIBUTE_UNUSED)
{
return insn | (value & 0xfffc);
}
/*ARGSUSED*/
static long
-extract_bd (insn, dialect, invalid)
- unsigned long insn;
- int dialect ATTRIBUTE_UNUSED;
- int *invalid ATTRIBUTE_UNUSED;
+extract_bd (unsigned long insn,
+ int dialect ATTRIBUTE_UNUSED,
+ int *invalid ATTRIBUTE_UNUSED)
{
return ((insn & 0xfffc) ^ 0x8000) - 0x8000;
}
/*ARGSUSED*/
static unsigned long
-insert_bdm (insn, value, dialect, errmsg)
- unsigned long insn;
- long value;
- int dialect;
- const char **errmsg ATTRIBUTE_UNUSED;
+insert_bdm (unsigned long insn,
+ long value,
+ int dialect,
+ const char **errmsg ATTRIBUTE_UNUSED)
{
if ((dialect & PPC_OPCODE_POWER4) == 0)
{
}
static long
-extract_bdm (insn, dialect, invalid)
- unsigned long insn;
- int dialect;
- int *invalid;
+extract_bdm (unsigned long insn,
+ int dialect,
+ int *invalid)
{
- if (invalid != (int *) NULL)
+ if (invalid != NULL)
{
if ((dialect & PPC_OPCODE_POWER4) == 0)
{
/*ARGSUSED*/
static unsigned long
-insert_bdp (insn, value, dialect, errmsg)
- unsigned long insn;
- long value;
- int dialect;
- const char **errmsg ATTRIBUTE_UNUSED;
+insert_bdp (unsigned long insn,
+ long value,
+ int dialect,
+ const char **errmsg ATTRIBUTE_UNUSED)
{
if ((dialect & PPC_OPCODE_POWER4) == 0)
{
}
static long
-extract_bdp (insn, dialect, invalid)
- unsigned long insn;
- int dialect;
- int *invalid;
+extract_bdp (unsigned long insn,
+ int dialect,
+ int *invalid)
{
- if (invalid != (int *) NULL)
+ if (invalid != NULL)
{
if ((dialect & PPC_OPCODE_POWER4) == 0)
{
/* Check for legal values of a BO field. */
static int
-valid_bo (value, dialect)
- long value;
- int dialect;
+valid_bo (long value, int dialect)
{
if ((dialect & PPC_OPCODE_POWER4) == 0)
{
the field to an illegal value. */
static unsigned long
-insert_bo (insn, value, dialect, errmsg)
- unsigned long insn;
- long value;
- int dialect;
- const char **errmsg;
+insert_bo (unsigned long insn,
+ long value,
+ int dialect,
+ const char **errmsg)
{
- if (errmsg != (const char **) NULL
+ if (errmsg != NULL
&& ! valid_bo (value, dialect))
*errmsg = _("invalid conditional option");
return insn | ((value & 0x1f) << 21);
}
static long
-extract_bo (insn, dialect, invalid)
- unsigned long insn;
- int dialect;
- int *invalid;
+extract_bo (unsigned long insn,
+ int dialect,
+ int *invalid)
{
long value;
value = (insn >> 21) & 0x1f;
- if (invalid != (int *) NULL
+ if (invalid != NULL
&& ! valid_bo (value, dialect))
*invalid = 1;
return value;
extracting it, we force it to be even. */
static unsigned long
-insert_boe (insn, value, dialect, errmsg)
- unsigned long insn;
- long value;
- int dialect;
- const char **errmsg;
+insert_boe (unsigned long insn,
+ long value,
+ int dialect,
+ const char **errmsg)
{
- if (errmsg != (const char **) NULL)
+ if (errmsg != NULL)
{
if (! valid_bo (value, dialect))
*errmsg = _("invalid conditional option");
}
static long
-extract_boe (insn, dialect, invalid)
- unsigned long insn;
- int dialect;
- int *invalid;
+extract_boe (unsigned long insn,
+ int dialect,
+ int *invalid)
{
long value;
value = (insn >> 21) & 0x1f;
- if (invalid != (int *) NULL
+ if (invalid != NULL
&& ! valid_bo (value, dialect))
*invalid = 1;
return value & 0x1e;
/*ARGSUSED*/
static unsigned long
-insert_dq (insn, value, dialect, errmsg)
- unsigned long insn;
- long value;
- int dialect ATTRIBUTE_UNUSED;
- const char ** errmsg ATTRIBUTE_UNUSED;
+insert_dq (unsigned long insn,
+ long value,
+ int dialect ATTRIBUTE_UNUSED,
+ const char ** errmsg ATTRIBUTE_UNUSED)
{
if ((value & 0xf) != 0 && errmsg != NULL)
*errmsg = _("offset not a multiple of 16");
/*ARGSUSED*/
static long
-extract_dq (insn, dialect, invalid)
- unsigned long insn;
- int dialect ATTRIBUTE_UNUSED;
- int *invalid ATTRIBUTE_UNUSED;
+extract_dq (unsigned long insn,
+ int dialect ATTRIBUTE_UNUSED,
+ int *invalid ATTRIBUTE_UNUSED)
{
return ((insn & 0xfff0) ^ 0x8000) - 0x8000;
}
static unsigned long
-insert_ev2 (insn, value, dialect, errmsg)
- unsigned long insn;
- long value;
- int dialect ATTRIBUTE_UNUSED;
- const char ** errmsg ATTRIBUTE_UNUSED;
+insert_ev2 (unsigned long insn,
+ long value,
+ int dialect ATTRIBUTE_UNUSED,
+ const char ** errmsg ATTRIBUTE_UNUSED)
{
if ((value & 1) != 0 && errmsg != NULL)
*errmsg = _("offset not a multiple of 2");
}
static long
-extract_ev2 (insn, dialect, invalid)
- unsigned long insn;
- int dialect ATTRIBUTE_UNUSED;
- int * invalid ATTRIBUTE_UNUSED;
+extract_ev2 (unsigned long insn,
+ int dialect ATTRIBUTE_UNUSED,
+ int *invalid ATTRIBUTE_UNUSED)
{
return (insn >> 10) & 0x3e;
}
static unsigned long
-insert_ev4 (insn, value, dialect, errmsg)
- unsigned long insn;
- long value;
- int dialect ATTRIBUTE_UNUSED;
- const char ** errmsg ATTRIBUTE_UNUSED;
+insert_ev4 (unsigned long insn,
+ long value,
+ int dialect ATTRIBUTE_UNUSED,
+ const char **errmsg ATTRIBUTE_UNUSED)
{
if ((value & 3) != 0 && errmsg != NULL)
*errmsg = _("offset not a multiple of 4");
}
static long
-extract_ev4 (insn, dialect, invalid)
- unsigned long insn;
- int dialect ATTRIBUTE_UNUSED;
- int * invalid ATTRIBUTE_UNUSED;
+extract_ev4 (unsigned long insn,
+ int dialect ATTRIBUTE_UNUSED,
+ int *invalid ATTRIBUTE_UNUSED)
{
return (insn >> 9) & 0x7c;
}
static unsigned long
-insert_ev8 (insn, value, dialect, errmsg)
- unsigned long insn;
- long value;
- int dialect ATTRIBUTE_UNUSED;
- const char ** errmsg ATTRIBUTE_UNUSED;
+insert_ev8 (unsigned long insn,
+ long value,
+ int dialect ATTRIBUTE_UNUSED,
+ const char **errmsg ATTRIBUTE_UNUSED)
{
if ((value & 7) != 0 && errmsg != NULL)
*errmsg = _("offset not a multiple of 8");
}
static long
-extract_ev8 (insn, dialect, invalid)
- unsigned long insn;
- int dialect ATTRIBUTE_UNUSED;
- int * invalid ATTRIBUTE_UNUSED;
+extract_ev8 (unsigned long insn,
+ int dialect ATTRIBUTE_UNUSED,
+ int * invalid ATTRIBUTE_UNUSED)
{
return (insn >> 8) & 0xf8;
}
/*ARGSUSED*/
static unsigned long
-insert_ds (insn, value, dialect, errmsg)
- unsigned long insn;
- long value;
- int dialect ATTRIBUTE_UNUSED;
- const char **errmsg;
+insert_ds (unsigned long insn,
+ long value,
+ int dialect ATTRIBUTE_UNUSED,
+ const char **errmsg)
{
if ((value & 3) != 0 && errmsg != NULL)
*errmsg = _("offset not a multiple of 4");
/*ARGSUSED*/
static long
-extract_ds (insn, dialect, invalid)
- unsigned long insn;
- int dialect ATTRIBUTE_UNUSED;
- int *invalid ATTRIBUTE_UNUSED;
+extract_ds (unsigned long insn,
+ int dialect ATTRIBUTE_UNUSED,
+ int *invalid ATTRIBUTE_UNUSED)
{
return ((insn & 0xfffc) ^ 0x8000) - 0x8000;
}
/*ARGSUSED*/
static unsigned long
-insert_de (insn, value, dialect, errmsg)
- unsigned long insn;
- long value;
- int dialect ATTRIBUTE_UNUSED;
- const char **errmsg;
+insert_de (unsigned long insn,
+ long value,
+ int dialect ATTRIBUTE_UNUSED,
+ const char **errmsg)
{
if ((value > 2047 || value < -2048) && errmsg != NULL)
*errmsg = _("offset not between -2048 and 2047");
/*ARGSUSED*/
static long
-extract_de (insn, dialect, invalid)
- unsigned long insn;
- int dialect ATTRIBUTE_UNUSED;
- int *invalid ATTRIBUTE_UNUSED;
+extract_de (unsigned long insn,
+ int dialect ATTRIBUTE_UNUSED,
+ int *invalid ATTRIBUTE_UNUSED)
{
return (insn & 0xfff0) >> 4;
}
/*ARGSUSED*/
static unsigned long
-insert_des (insn, value, dialect, errmsg)
- unsigned long insn;
- long value;
- int dialect ATTRIBUTE_UNUSED;
- const char **errmsg;
+insert_des (unsigned long insn,
+ long value,
+ int dialect ATTRIBUTE_UNUSED,
+ const char **errmsg)
{
if ((value > 8191 || value < -8192) && errmsg != NULL)
*errmsg = _("offset not between -8192 and 8191");
/*ARGSUSED*/
static long
-extract_des (insn, dialect, invalid)
- unsigned long insn;
- int dialect ATTRIBUTE_UNUSED;
- int *invalid ATTRIBUTE_UNUSED;
+extract_des (unsigned long insn,
+ int dialect ATTRIBUTE_UNUSED,
+ int *invalid ATTRIBUTE_UNUSED)
{
return (((insn >> 2) & 0x3ffc) ^ 0x2000) - 0x2000;
}
-static unsigned long insert_fxm (unsigned long insn,
- long value,
- int dialect,
- const char **errmsg)
+/* FXM mask in mfcr and mtcrf instructions. */
+
+static unsigned long
+insert_fxm (unsigned long insn,
+ long value,
+ int dialect,
+ const char **errmsg)
{
/* If the optional field on mfcr is missing that means we want to use
the old form of the instruction that moves the whole cr. In that
return insn | ((value & 0xff) << 12);
}
-static long extract_fxm (unsigned long insn, int dialect, int *invalid)
+static long
+extract_fxm (unsigned long insn,
+ int dialect,
+ int *invalid)
{
long mask = (insn >> 12) & 0xff;
/*ARGSUSED*/
static unsigned long
-insert_li (insn, value, dialect, errmsg)
- unsigned long insn;
- long value;
- int dialect ATTRIBUTE_UNUSED;
- const char **errmsg;
+insert_li (unsigned long insn,
+ long value,
+ int dialect ATTRIBUTE_UNUSED,
+ const char **errmsg)
{
- if ((value & 3) != 0 && errmsg != (const char **) NULL)
+ if ((value & 3) != 0 && errmsg != NULL)
*errmsg = _("ignoring least significant bits in branch offset");
return insn | (value & 0x3fffffc);
}
/*ARGSUSED*/
static long
-extract_li (insn, dialect, invalid)
- unsigned long insn;
- int dialect ATTRIBUTE_UNUSED;
- int *invalid ATTRIBUTE_UNUSED;
+extract_li (unsigned long insn,
+ int dialect ATTRIBUTE_UNUSED,
+ int *invalid ATTRIBUTE_UNUSED)
{
return ((insn & 0x3fffffc) ^ 0x2000000) - 0x2000000;
}
instruction which uses a field of this type. */
static unsigned long
-insert_mbe (insn, value, dialect, errmsg)
- unsigned long insn;
- long value;
- int dialect ATTRIBUTE_UNUSED;
- const char **errmsg;
+insert_mbe (unsigned long insn,
+ long value,
+ int dialect ATTRIBUTE_UNUSED,
+ const char **errmsg)
{
unsigned long uval, mask;
int mb, me, mx, count, last;
if (uval == 0)
{
- if (errmsg != (const char **) NULL)
+ if (errmsg != NULL)
*errmsg = _("illegal bitmask");
return insn;
}
/* me: location of last 1->0 transition */
/* count: # transitions */
- for (mx = 0, mask = (long) 1 << 31; mx < 32; ++mx, mask >>= 1)
+ for (mx = 0, mask = 1 << 31; mx < 32; ++mx, mask >>= 1)
{
if ((uval & mask) && !last)
{
if (count != 2 && (count != 0 || ! last))
{
- if (errmsg != (const char **) NULL)
+ if (errmsg != NULL)
*errmsg = _("illegal bitmask");
}
}
static long
-extract_mbe (insn, dialect, invalid)
- unsigned long insn;
- int dialect ATTRIBUTE_UNUSED;
- int *invalid;
+extract_mbe (unsigned long insn,
+ int dialect ATTRIBUTE_UNUSED,
+ int *invalid)
{
long ret;
int mb, me;
int i;
- if (invalid != (int *) NULL)
+ if (invalid != NULL)
*invalid = 1;
mb = (insn >> 6) & 0x1f;
{
ret = 0;
for (i = mb; i <= me; i++)
- ret |= (long) 1 << (31 - i);
+ ret |= 1 << (31 - i);
}
else if (mb == me + 1)
- ret = ~0;
+ ret = -1;
else /* (mb > me + 1) */
{
- ret = ~ (long) 0;
+ ret = ~0;
for (i = me + 1; i < mb; i++)
- ret &= ~ ((long) 1 << (31 - i));
+ ret &= ~ (1 << (31 - i));
}
return ret;
}
/*ARGSUSED*/
static unsigned long
-insert_mb6 (insn, value, dialect, errmsg)
- unsigned long insn;
- long value;
- int dialect ATTRIBUTE_UNUSED;
- const char **errmsg ATTRIBUTE_UNUSED;
+insert_mb6 (unsigned long insn,
+ long value,
+ int dialect ATTRIBUTE_UNUSED,
+ const char **errmsg ATTRIBUTE_UNUSED)
{
return insn | ((value & 0x1f) << 6) | (value & 0x20);
}
/*ARGSUSED*/
static long
-extract_mb6 (insn, dialect, invalid)
- unsigned long insn;
- int dialect ATTRIBUTE_UNUSED;
- int *invalid ATTRIBUTE_UNUSED;
+extract_mb6 (unsigned long insn,
+ int dialect ATTRIBUTE_UNUSED,
+ int *invalid ATTRIBUTE_UNUSED)
{
return ((insn >> 6) & 0x1f) | (insn & 0x20);
}
0. */
static unsigned long
-insert_nb (insn, value, dialect, errmsg)
- unsigned long insn;
- long value;
- int dialect ATTRIBUTE_UNUSED;
- const char **errmsg;
+insert_nb (unsigned long insn,
+ long value,
+ int dialect ATTRIBUTE_UNUSED,
+ const char **errmsg)
{
if (value < 0 || value > 32)
*errmsg = _("value out of range");
/*ARGSUSED*/
static long
-extract_nb (insn, dialect, invalid)
- unsigned long insn;
- int dialect ATTRIBUTE_UNUSED;
- int *invalid ATTRIBUTE_UNUSED;
+extract_nb (unsigned long insn,
+ int dialect ATTRIBUTE_UNUSED,
+ int *invalid ATTRIBUTE_UNUSED)
{
long ret;
/*ARGSUSED*/
static unsigned long
-insert_nsi (insn, value, dialect, errmsg)
- unsigned long insn;
- long value;
- int dialect ATTRIBUTE_UNUSED;
- const char **errmsg ATTRIBUTE_UNUSED;
+insert_nsi (unsigned long insn,
+ long value,
+ int dialect ATTRIBUTE_UNUSED,
+ const char **errmsg ATTRIBUTE_UNUSED)
{
- return insn | ((- value) & 0xffff);
+ return insn | (-value & 0xffff);
}
static long
-extract_nsi (insn, dialect, invalid)
- unsigned long insn;
- int dialect ATTRIBUTE_UNUSED;
- int *invalid;
+extract_nsi (unsigned long insn,
+ int dialect ATTRIBUTE_UNUSED,
+ int *invalid)
{
- if (invalid != (int *) NULL)
+ if (invalid != NULL)
*invalid = 1;
- return - (((insn & 0xffff) ^ 0x8000) - 0x8000);
+ return -(((insn & 0xffff) ^ 0x8000) - 0x8000);
}
/* The RA field in a D or X form instruction which is an updating
equal the RT field. */
static unsigned long
-insert_ral (insn, value, dialect, errmsg)
- unsigned long insn;
- long value;
- int dialect ATTRIBUTE_UNUSED;
- const char **errmsg;
+insert_ral (unsigned long insn,
+ long value,
+ int dialect ATTRIBUTE_UNUSED,
+ const char **errmsg)
{
if (value == 0
|| (unsigned long) value == ((insn >> 21) & 0x1f))
restrictions. */
static unsigned long
-insert_ram (insn, value, dialect, errmsg)
- unsigned long insn;
- long value;
- int dialect ATTRIBUTE_UNUSED;
- const char **errmsg;
+insert_ram (unsigned long insn,
+ long value,
+ int dialect ATTRIBUTE_UNUSED,
+ const char **errmsg)
{
if ((unsigned long) value >= ((insn >> 21) & 0x1f))
*errmsg = _("index register in load range");
/*ARGSUSED*/
static unsigned long
-insert_raq (insn, value, dialect, errmsg)
- unsigned long insn;
- long value;
- int dialect ATTRIBUTE_UNUSED;
- const char **errmsg;
+insert_raq (unsigned long insn,
+ long value,
+ int dialect ATTRIBUTE_UNUSED,
+ const char **errmsg)
{
long rtvalue = (insn & RT_MASK) >> 21;
field may not be zero. */
static unsigned long
-insert_ras (insn, value, dialect, errmsg)
- unsigned long insn;
- long value;
- int dialect ATTRIBUTE_UNUSED;
- const char **errmsg;
+insert_ras (unsigned long insn,
+ long value,
+ int dialect ATTRIBUTE_UNUSED,
+ const char **errmsg)
{
if (value == 0)
*errmsg = _("invalid register operand when updating");
/*ARGSUSED*/
static unsigned long
-insert_rbs (insn, value, dialect, errmsg)
- unsigned long insn;
- long value ATTRIBUTE_UNUSED;
- int dialect ATTRIBUTE_UNUSED;
- const char **errmsg ATTRIBUTE_UNUSED;
+insert_rbs (unsigned long insn,
+ long value ATTRIBUTE_UNUSED,
+ int dialect ATTRIBUTE_UNUSED,
+ const char **errmsg ATTRIBUTE_UNUSED)
{
return insn | (((insn >> 21) & 0x1f) << 11);
}
static long
-extract_rbs (insn, dialect, invalid)
- unsigned long insn;
- int dialect ATTRIBUTE_UNUSED;
- int *invalid;
+extract_rbs (unsigned long insn,
+ int dialect ATTRIBUTE_UNUSED,
+ int *invalid)
{
- if (invalid != (int *) NULL
+ if (invalid != NULL
&& ((insn >> 21) & 0x1f) != ((insn >> 11) & 0x1f))
*invalid = 1;
return 0;
/*ARGSUSED*/
static unsigned long
-insert_rtq (insn, value, dialect, errmsg)
- unsigned long insn;
- long value;
- int dialect ATTRIBUTE_UNUSED;
- const char **errmsg;
+insert_rtq (unsigned long insn,
+ long value,
+ int dialect ATTRIBUTE_UNUSED,
+ const char **errmsg)
{
if ((value & 1) != 0 && errmsg != NULL)
*errmsg = _("target register operand must be even");
/*ARGSUSED*/
static unsigned long
-insert_rsq (insn, value, dialect, errmsg)
- unsigned long insn;
- long value ATTRIBUTE_UNUSED;
- int dialect ATTRIBUTE_UNUSED;
- const char **errmsg;
+insert_rsq (unsigned long insn,
+ long value ATTRIBUTE_UNUSED,
+ int dialect ATTRIBUTE_UNUSED,
+ const char **errmsg)
{
if ((value & 1) != 0 && errmsg != NULL)
*errmsg = _("source register operand must be even");
/*ARGSUSED*/
static unsigned long
-insert_sh6 (insn, value, dialect, errmsg)
- unsigned long insn;
- long value;
- int dialect ATTRIBUTE_UNUSED;
- const char **errmsg ATTRIBUTE_UNUSED;
+insert_sh6 (unsigned long insn,
+ long value,
+ int dialect ATTRIBUTE_UNUSED,
+ const char **errmsg ATTRIBUTE_UNUSED)
{
return insn | ((value & 0x1f) << 11) | ((value & 0x20) >> 4);
}
/*ARGSUSED*/
static long
-extract_sh6 (insn, dialect, invalid)
- unsigned long insn;
- int dialect ATTRIBUTE_UNUSED;
- int *invalid ATTRIBUTE_UNUSED;
+extract_sh6 (unsigned long insn,
+ int dialect ATTRIBUTE_UNUSED,
+ int *invalid ATTRIBUTE_UNUSED)
{
return ((insn >> 11) & 0x1f) | ((insn << 4) & 0x20);
}
lower 5 bits are stored in the upper 5 and vice- versa. */
static unsigned long
-insert_spr (insn, value, dialect, errmsg)
- unsigned long insn;
- long value;
- int dialect ATTRIBUTE_UNUSED;
- const char **errmsg ATTRIBUTE_UNUSED;
+insert_spr (unsigned long insn,
+ long value,
+ int dialect ATTRIBUTE_UNUSED,
+ const char **errmsg ATTRIBUTE_UNUSED)
{
return insn | ((value & 0x1f) << 16) | ((value & 0x3e0) << 6);
}
static long
-extract_spr (insn, dialect, invalid)
- unsigned long insn;
- int dialect ATTRIBUTE_UNUSED;
- int *invalid ATTRIBUTE_UNUSED;
+extract_spr (unsigned long insn,
+ int dialect ATTRIBUTE_UNUSED,
+ int *invalid ATTRIBUTE_UNUSED)
{
return ((insn >> 16) & 0x1f) | ((insn >> 6) & 0x3e0);
}
#define TB (268)
static unsigned long
-insert_tbr (insn, value, dialect, errmsg)
- unsigned long insn;
- long value;
- int dialect ATTRIBUTE_UNUSED;
- const char **errmsg ATTRIBUTE_UNUSED;
+insert_tbr (unsigned long insn,
+ long value,
+ int dialect ATTRIBUTE_UNUSED,
+ const char **errmsg ATTRIBUTE_UNUSED)
{
if (value == 0)
value = TB;
}
static long
-extract_tbr (insn, dialect, invalid)
- unsigned long insn;
- int dialect ATTRIBUTE_UNUSED;
- int *invalid ATTRIBUTE_UNUSED;
+extract_tbr (unsigned long insn,
+ int dialect ATTRIBUTE_UNUSED,
+ int *invalid ATTRIBUTE_UNUSED)
{
long ret;