* [PATCH] MIPS/GAS: Fix negative conditionals
@ 2011-10-24 21:21 Maciej W. Rozycki
2011-11-15 17:31 ` Richard Sandiford
0 siblings, 1 reply; 2+ messages in thread
From: Maciej W. Rozycki @ 2011-10-24 21:21 UTC (permalink / raw)
To: binutils; +Cc: Richard Sandiford
Hi,
Two negative conditionals have escaped our recent microMIPS review
process, here's a change to fix them.
Regression-tested successfully, for the mips-linux-gnu and mips-sde-elf
targets. OK to apply?
2011-10-24 Maciej W. Rozycki <macro@codesourcery.com>
gas/
* config/tc-mips.c (macro_build_jalr): Reverse a negative
conditional.
(mips_ip): Likewise.
Maciej
binutils-gas-negative.diff
Index: binutils-fsf-trunk-quilt/gas/config/tc-mips.c
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/config/tc-mips.c 2011-10-24 22:15:37.455860174 +0100
+++ binutils-fsf-trunk-quilt/gas/config/tc-mips.c 2011-10-24 22:15:38.355861017 +0100
@@ -5260,9 +5260,7 @@ macro_build_jalr (expressionS *ep, int c
frag_grow (8);
f = frag_more (0);
}
- if (!mips_opts.micromips)
- macro_build (NULL, "jalr", "d,s", RA, PIC_CALL_REG);
- else
+ if (mips_opts.micromips)
{
jalr = mips_opts.noreorder && !cprestore ? "jalr" : "jalrs";
if (MIPS_JALR_HINT_P (ep))
@@ -5270,6 +5268,8 @@ macro_build_jalr (expressionS *ep, int c
else
macro_build (NULL, jalr, "mj", PIC_CALL_REG);
}
+ else
+ macro_build (NULL, "jalr", "d,s", RA, PIC_CALL_REG);
if (MIPS_JALR_HINT_P (ep))
fix_new_exp (frag_now, f - frag_now->fr_literal, 4, ep, FALSE, jalr_reloc);
}
@@ -10964,9 +10964,9 @@ mips_ip (char *str, struct mips_cl_insn
case '\\': /* 3-bit bit position. */
{
- unsigned long mask = (!mips_opts.micromips
- ? OP_MASK_3BITPOS
- : MICROMIPSOP_MASK_3BITPOS);
+ unsigned long mask = (mips_opts.micromips
+ ? MICROMIPSOP_MASK_3BITPOS
+ : OP_MASK_3BITPOS);
my_getExpression (&imm_expr, s);
check_absolute_expr (ip, &imm_expr);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] MIPS/GAS: Fix negative conditionals
2011-10-24 21:21 [PATCH] MIPS/GAS: Fix negative conditionals Maciej W. Rozycki
@ 2011-11-15 17:31 ` Richard Sandiford
0 siblings, 0 replies; 2+ messages in thread
From: Richard Sandiford @ 2011-11-15 17:31 UTC (permalink / raw)
To: Maciej W. Rozycki; +Cc: binutils
"Maciej W. Rozycki" <macro@codesourcery.com> writes:
> 2011-10-24 Maciej W. Rozycki <macro@codesourcery.com>
>
> gas/
> * config/tc-mips.c (macro_build_jalr): Reverse a negative
> conditional.
> (mips_ip): Likewise.
OK, thanks.
Richard
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-11-15 17:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-24 21:21 [PATCH] MIPS/GAS: Fix negative conditionals Maciej W. Rozycki
2011-11-15 17:31 ` Richard Sandiford
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).