* patch breaks libgloss builds
@ 2005-04-15 16:26 Eric Christopher
2005-04-15 20:29 ` Maciej W. Rozycki
0 siblings, 1 reply; 3+ messages in thread
From: Eric Christopher @ 2005-04-15 16:26 UTC (permalink / raw)
To: macro; +Cc: binutils
Building crt0.S we fail on this instruction:
li t2,0xAAAA5555
with a mipsisa64-elf toolchain.
Interestingly enough the code that I think you added in reporting bad
numbers is failing too:
/dzur/sourceware/combined/libgloss/mips/crt0.S: Assembler messages:
/dzur/sourceware/combined/libgloss/mips/crt0.S:91: Error: Number
(0x0aaaa5555) larger than 32 bits
I'll take a look at it later, just noticed it yesterday.
-eric
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: patch breaks libgloss builds
2005-04-15 16:26 patch breaks libgloss builds Eric Christopher
@ 2005-04-15 20:29 ` Maciej W. Rozycki
2005-04-15 23:57 ` Eric Christopher
0 siblings, 1 reply; 3+ messages in thread
From: Maciej W. Rozycki @ 2005-04-15 20:29 UTC (permalink / raw)
To: Eric Christopher; +Cc: binutils
On Fri, 15 Apr 2005, Eric Christopher wrote:
> Building crt0.S we fail on this instruction:
>
> li t2,0xAAAA5555
>
> with a mipsisa64-elf toolchain.
>
> Interestingly enough the code that I think you added in reporting bad
> numbers is failing too:
>
> /dzur/sourceware/combined/libgloss/mips/crt0.S: Assembler messages:
> /dzur/sourceware/combined/libgloss/mips/crt0.S:91: Error: Number
> (0x0aaaa5555) larger than 32 bits
>
> I'll take a look at it later, just noticed it yesterday.
This fixes the problem and I've run the test suite for mips64el-linux-gnu
successfully, but I don't feel that fulfils testing terribly well. A
proper test case for "li"/"dli" should be desirable -- I'll have a look at
it later.
Also it seems we call normalize_constant_expr() a little bit too
extensively -- perhaps a few of these calls could be removed. I think we
have a few explicit sign-extensions elsewhere, too, and some of them could
actually fit into one of these normalize_*() calls.
2005-04-15 Maciej W. Rozycki <macro@linux-mips.org>
* config/tc-mips.c (normalize_constant_expr): Don't check for
HAVE_32BIT_GPRS.
(check_absolute_expr): Only call normalize_constant_expr() if
HAVE_32BIT_GPRS.
(mips_ip): Likewise.
* config/tc-mips.c (check_absolute_expr): Fix formatting.
Maciej
binutils-2.15.96-20050414-mips-gas-li.patch
diff -up --recursive --new-file binutils-2.15.96-20050414.macro/gas/config/tc-mips.c binutils-2.15.96-20050414/gas/config/tc-mips.c
--- binutils-2.15.96-20050414.macro/gas/config/tc-mips.c 2005-04-14 03:25:26.000000000 +0000
+++ binutils-2.15.96-20050414/gas/config/tc-mips.c 2005-04-15 19:25:08.000000000 +0000
@@ -3265,7 +3265,7 @@ static void
*/
normalize_constant_expr (expressionS *ex)
{
- if ((ex->X_op == O_constant && HAVE_32BIT_GPRS)
+ if (ex->X_op == O_constant
&& IS_ZEXT_32BIT_NUM (ex->X_add_number))
ex->X_add_number = (((ex->X_add_number & 0xffffffff) ^ 0x80000000)
- 0x80000000);
@@ -3425,9 +3425,11 @@ check_absolute_expr (struct mips_cl_insn
if (ex->X_op == O_big)
as_bad (_("unsupported large constant"));
else if (ex->X_op != O_constant)
- as_bad (_("Instruction %s requires absolute expression"), ip->insn_mo->name);
+ as_bad (_("Instruction %s requires absolute expression"),
+ ip->insn_mo->name);
- normalize_constant_expr (ex);
+ if (HAVE_32BIT_GPRS)
+ normalize_constant_expr (ex);
}
/* Count the leading zeroes by performing a binary chop. This is a
@@ -8102,7 +8104,8 @@ do_msbd:
if (imm2_expr.X_op != O_big
&& imm2_expr.X_op != O_constant)
insn_error = _("absolute expression required");
- normalize_constant_expr (&imm2_expr);
+ if (HAVE_32BIT_GPRS)
+ normalize_constant_expr (&imm2_expr);
s = expr_end;
continue;
@@ -8570,7 +8573,8 @@ do_msbd:
if (imm_expr.X_op != O_big
&& imm_expr.X_op != O_constant)
insn_error = _("absolute expression required");
- normalize_constant_expr (&imm_expr);
+ if (HAVE_32BIT_GPRS)
+ normalize_constant_expr (&imm_expr);
s = expr_end;
continue;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: patch breaks libgloss builds
2005-04-15 20:29 ` Maciej W. Rozycki
@ 2005-04-15 23:57 ` Eric Christopher
0 siblings, 0 replies; 3+ messages in thread
From: Eric Christopher @ 2005-04-15 23:57 UTC (permalink / raw)
To: Maciej W. Rozycki; +Cc: binutils
> This fixes the problem and I've run the test suite for mips64el-linux-gnu
> successfully, but I don't feel that fulfils testing terribly well. A
> proper test case for "li"/"dli" should be desirable -- I'll have a look at
> it later.
>
Running a test of gcc with a combined tree for mipsisa64-elf ferrets out
a lot of problems since the unpredictable bits are set in the simulator
and libgloss uses the assembler macros for startup code.
> Also it seems we call normalize_constant_expr() a little bit too
> extensively -- perhaps a few of these calls could be removed. I think we
> have a few explicit sign-extensions elsewhere, too, and some of them could
> actually fit into one of these normalize_*() calls.
>
> 2005-04-15 Maciej W. Rozycki <macro@linux-mips.org>
>
> * config/tc-mips.c (normalize_constant_expr): Don't check for
> HAVE_32BIT_GPRS.
> (check_absolute_expr): Only call normalize_constant_expr() if
> HAVE_32BIT_GPRS.
> (mips_ip): Likewise.
>
> * config/tc-mips.c (check_absolute_expr): Fix formatting.
If you haven't checked it in yet OK to do so for mainline and 2.16.
-eric
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-04-15 23:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-15 16:26 patch breaks libgloss builds Eric Christopher
2005-04-15 20:29 ` Maciej W. Rozycki
2005-04-15 23:57 ` Eric Christopher
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).