From: Stan Shebs Date: Fri, 7 Jan 1994 19:18:16 +0000 (+0000) Subject: Fri Jan 7 11:14:07 1994 Stan Shebs (shebs@andros.cygnus.com) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=917fae09f9c1b9905a5fb14658d53af6831b76af;p=binutils-gdb.git Fri Jan 7 11:14:07 1994 Stan Shebs (shebs@andros.cygnus.com) * config/tc-mips.c (macro): Add a LOSING_COMPILER ifdef that splits the function. (macro2): New function, if LOSING_COMPILER defined. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index 33fde722513..f9dffaf4111 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +Fri Jan 7 11:14:07 1994 Stan Shebs (shebs@andros.cygnus.com) + + * config/tc-mips.c (macro): Add a LOSING_COMPILER ifdef that + splits the function. + (macro2): New function, if LOSING_COMPILER defined. + Fri Jan 7 09:38:25 1994 Steve Chamberlain (sac@cygnus.com) * config/obj-coffbfd.c (fill_section): Don't ever fill past the diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index 24805dedd9d..606fd57efb6 100644 --- a/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c @@ -289,6 +289,9 @@ static void check_absolute_expr PARAMS ((struct mips_cl_insn * ip, static void load_register PARAMS ((int *counter, int reg, expressionS * ep)); static void load_address PARAMS ((int *counter, int reg, expressionS *ep)); static void macro PARAMS ((struct mips_cl_insn * ip)); +#ifdef LOSING_COMPILER +static void macro2 PARAMS ((struct mips_cl_insn * ip)); +#endif static void mips_ip PARAMS ((char *str, struct mips_cl_insn * ip)); static int my_getSmallExpression PARAMS ((expressionS * ep, char *str)); static void my_getExpression PARAMS ((expressionS * ep, char *str)); @@ -3111,6 +3114,48 @@ macro (ip) macro_build ((char *) NULL, &icnt, &offset_expr, s, "t,o(b)", treg + 1, (int) BFD_RELOC_LO16, breg); return; +#ifdef LOSING_COMPILER + default: + macro2 (ip); + return; + } + if (mips_noat) + as_warn ("Macro used $at after \".set noat\""); +} + +static void +macro2 (ip) + struct mips_cl_insn *ip; +{ + register int treg, sreg, dreg, breg; + int tempreg; + int mask; + int icnt = 0; + int used_at; + expressionS expr1; + const char *s; + const char *s2; + const char *fmt; + int likely = 0; + int dbl = 0; + int coproc = 0; + offsetT maxnum; + bfd_reloc_code_real_type r; + char *p; + + treg = (ip->insn_opcode >> 16) & 0x1f; + dreg = (ip->insn_opcode >> 11) & 0x1f; + sreg = breg = (ip->insn_opcode >> 21) & 0x1f; + mask = ip->insn_mo->mask; + + expr1.X_op = O_constant; + expr1.X_op_symbol = NULL; + expr1.X_add_symbol = NULL; + expr1.X_add_number = 1; + + switch (mask) + { +#endif /* LOSING_COMPILER */ case M_DMUL: dbl = 1;