mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-20 01:50:24 +08:00
* config/tc-mips.c (mips16_macro_build): Pass "args" by
reference rather than value. (macro_build): Update accordingly.
This commit is contained in:
@ -1,4 +1,10 @@
|
|||||||
2010-07-26 Maciej W. Rozycki <macro@codesourcery.com>
|
2010-07-27 Maciej W. Rozycki <macro@codesourcery.com>
|
||||||
|
|
||||||
|
* config/tc-mips.c (mips16_macro_build): Pass "args" by
|
||||||
|
reference rather than value.
|
||||||
|
(macro_build): Update accordingly.
|
||||||
|
|
||||||
|
2010-07-27 Maciej W. Rozycki <macro@codesourcery.com>
|
||||||
|
|
||||||
* config/tc-mips.c (mips_ip): Use symbol_temp_new_now to create
|
* config/tc-mips.c (mips_ip): Use symbol_temp_new_now to create
|
||||||
a fake label.
|
a fake label.
|
||||||
|
@ -1063,7 +1063,7 @@ static void append_insn
|
|||||||
static void mips_no_prev_insn (void);
|
static void mips_no_prev_insn (void);
|
||||||
static void macro_build (expressionS *, const char *, const char *, ...);
|
static void macro_build (expressionS *, const char *, const char *, ...);
|
||||||
static void mips16_macro_build
|
static void mips16_macro_build
|
||||||
(expressionS *, const char *, const char *, va_list);
|
(expressionS *, const char *, const char *, va_list *);
|
||||||
static void load_register (int, expressionS *, int);
|
static void load_register (int, expressionS *, int);
|
||||||
static void macro_start (void);
|
static void macro_start (void);
|
||||||
static void macro_end (void);
|
static void macro_end (void);
|
||||||
@ -3616,7 +3616,7 @@ macro_build (expressionS *ep, const char *name, const char *fmt, ...)
|
|||||||
|
|
||||||
if (mips_opts.mips16)
|
if (mips_opts.mips16)
|
||||||
{
|
{
|
||||||
mips16_macro_build (ep, name, fmt, args);
|
mips16_macro_build (ep, name, fmt, &args);
|
||||||
va_end (args);
|
va_end (args);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -3842,7 +3842,7 @@ macro_build (expressionS *ep, const char *name, const char *fmt, ...)
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
mips16_macro_build (expressionS *ep, const char *name, const char *fmt,
|
mips16_macro_build (expressionS *ep, const char *name, const char *fmt,
|
||||||
va_list args)
|
va_list *args)
|
||||||
{
|
{
|
||||||
struct mips_opcode *mo;
|
struct mips_opcode *mo;
|
||||||
struct mips_cl_insn insn;
|
struct mips_cl_insn insn;
|
||||||
@ -3878,20 +3878,20 @@ mips16_macro_build (expressionS *ep, const char *name, const char *fmt,
|
|||||||
|
|
||||||
case 'y':
|
case 'y':
|
||||||
case 'w':
|
case 'w':
|
||||||
MIPS16_INSERT_OPERAND (RY, insn, va_arg (args, int));
|
MIPS16_INSERT_OPERAND (RY, insn, va_arg (*args, int));
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
case 'x':
|
case 'x':
|
||||||
case 'v':
|
case 'v':
|
||||||
MIPS16_INSERT_OPERAND (RX, insn, va_arg (args, int));
|
MIPS16_INSERT_OPERAND (RX, insn, va_arg (*args, int));
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
case 'z':
|
case 'z':
|
||||||
MIPS16_INSERT_OPERAND (RZ, insn, va_arg (args, int));
|
MIPS16_INSERT_OPERAND (RZ, insn, va_arg (*args, int));
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
case 'Z':
|
case 'Z':
|
||||||
MIPS16_INSERT_OPERAND (MOVE32Z, insn, va_arg (args, int));
|
MIPS16_INSERT_OPERAND (MOVE32Z, insn, va_arg (*args, int));
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
case '0':
|
case '0':
|
||||||
@ -3901,14 +3901,14 @@ mips16_macro_build (expressionS *ep, const char *name, const char *fmt,
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
case 'X':
|
case 'X':
|
||||||
MIPS16_INSERT_OPERAND (REGR32, insn, va_arg (args, int));
|
MIPS16_INSERT_OPERAND (REGR32, insn, va_arg (*args, int));
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
case 'Y':
|
case 'Y':
|
||||||
{
|
{
|
||||||
int regno;
|
int regno;
|
||||||
|
|
||||||
regno = va_arg (args, int);
|
regno = va_arg (*args, int);
|
||||||
regno = ((regno & 7) << 2) | ((regno & 0x18) >> 3);
|
regno = ((regno & 7) << 2) | ((regno & 0x18) >> 3);
|
||||||
MIPS16_INSERT_OPERAND (REG32R, insn, regno);
|
MIPS16_INSERT_OPERAND (REG32R, insn, regno);
|
||||||
}
|
}
|
||||||
@ -3947,7 +3947,7 @@ mips16_macro_build (expressionS *ep, const char *name, const char *fmt,
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
case '6':
|
case '6':
|
||||||
MIPS16_INSERT_OPERAND (IMM6, insn, va_arg (args, int));
|
MIPS16_INSERT_OPERAND (IMM6, insn, va_arg (*args, int));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user