* [PATCH] MIPS gas: Use PIC_CALL_REG instead of uninitialized tempreg
@ 2003-05-14 23:52 Thiemo Seufer
2003-05-15 0:55 ` Thiemo Seufer
2003-05-21 21:16 ` Eric Christopher
0 siblings, 2 replies; 5+ messages in thread
From: Thiemo Seufer @ 2003-05-14 23:52 UTC (permalink / raw)
To: binutils
Hello All,
tempreg isn't properly initialized in this case and should AFAICS
always be PIC_CALL_REG anyway.
Thiemo
2003-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
/gas/ChangeLog
* config/tc-mips.c (macro): Don't use uninitialized tempreg.
--- source-orig/gas/config/tc-mips.c Wed May 7 11:17:46 2003
+++ source/gas/config/tc-mips.c Wed May 14 05:27:09 2003
@@ -5831,11 +5841,11 @@ macro (ip)
offset_expr.X_add_symbol, 0, NULL);
macro_build (p, &icnt, &offset_expr,
HAVE_32BIT_ADDRESSES ? "lw" : "ld", "t,o(b)",
- tempreg, (int) BFD_RELOC_MIPS_GOT_PAGE,
+ PIC_CALL_REG, (int) BFD_RELOC_MIPS_GOT_PAGE,
mips_gp_register);
macro_build (p + 4, &icnt, &offset_expr,
HAVE_32BIT_ADDRESSES ? "addi" : "daddiu",
- "t,r,j", tempreg, tempreg,
+ "t,r,j", PIC_CALL_REG, PIC_CALL_REG,
(int) BFD_RELOC_MIPS_GOT_OFST);
}
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] MIPS gas: Use PIC_CALL_REG instead of uninitialized tempreg
2003-05-14 23:52 [PATCH] MIPS gas: Use PIC_CALL_REG instead of uninitialized tempreg Thiemo Seufer
@ 2003-05-15 0:55 ` Thiemo Seufer
2003-05-15 2:02 ` Thiemo Seufer
2003-05-21 21:16 ` Eric Christopher
1 sibling, 1 reply; 5+ messages in thread
From: Thiemo Seufer @ 2003-05-15 0:55 UTC (permalink / raw)
To: binutils
Thiemo Seufer wrote:
> Hello All,
>
> tempreg isn't properly initialized in this case and should AFAICS
> always be PIC_CALL_REG anyway.
>
>
> Thiemo
>
>
> 2003-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
>
> /gas/ChangeLog
> * config/tc-mips.c (macro): Don't use uninitialized tempreg.
This was tested on mips64-linux and mips-sgi-irix6, both without
new regressions.
I guess it built/passed the testsuite before because the M_JAL_A
case where the code lives in isn't triggered by ususal compiler
generated code.
Thiemo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] MIPS gas: Use PIC_CALL_REG instead of uninitialized tempreg
2003-05-15 0:55 ` Thiemo Seufer
@ 2003-05-15 2:02 ` Thiemo Seufer
0 siblings, 0 replies; 5+ messages in thread
From: Thiemo Seufer @ 2003-05-15 2:02 UTC (permalink / raw)
To: binutils
Thiemo Seufer wrote:
[snip]
> > 2003-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
> >
> > /gas/ChangeLog
> > * config/tc-mips.c (macro): Don't use uninitialized tempreg.
>
> This was tested on mips64-linux and mips-sgi-irix6, both without
> new regressions.
>
> I guess it built/passed the testsuite before because the M_JAL_A
> case where the code lives in isn't triggered by ususal compiler
> generated code.
This adds a testcase which fails for the old code.
Thiemo
2003-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
/gas/testsuite/ChangeLog
* gas/mips/jal-newabi.s: New file, testcase for NewABI xgot jal macro.
* gas/mips/jal-newabi.d: Likewise.
* gas/mips/mips.exp: Add new testcase.
diff -BurpNX /bigdisk/src/gcc-exclude source-orig/gas/testsuite/gas/mips/jal-newabi.d source/gas/testsuite/gas/mips/jal-newabi.d
--- source-orig/gas/testsuite/gas/mips/jal-newabi.d Thu Jan 1 01:00:00 1970
+++ source/gas/testsuite/gas/mips/jal-newabi.d Thu May 15 03:49:43 2003
@@ -0,0 +1,17 @@
+#objdump: -dr --prefix-addresses --show-raw-insn
+#name: MIPS ELF NewABI jal
+#as: -n32 -KPIC -xgot
+
+.*: +file format elf32-n.*mips.*
+
+Disassembly of section \.text:
+00000000 <label> 3c041234 lui a0,0x1234
+00000004 <label\+0x4> 34845678 ori a0,a0,0x5678
+00000008 <label\+0x8> 8f990000 lw t9,0\(gp\)
+ 8: R_MIPS_GOT_PAGE .text
+0000000c <label\+0xc> 23390000 addi t9,t9,0
+ c: R_MIPS_GOT_OFST .text
+00000010 <label\+0x10> 0320f809 jalr t9
+ 10: R_MIPS_JALR .text
+00000014 <label\+0x14> 00000000 nop
+ ...
diff -BurpNX /bigdisk/src/gcc-exclude source-orig/gas/testsuite/gas/mips/jal-newabi.s source/gas/testsuite/gas/mips/jal-newabi.s
--- source-orig/gas/testsuite/gas/mips/jal-newabi.s Thu Jan 1 01:00:00 1970
+++ source/gas/testsuite/gas/mips/jal-newabi.s Thu May 15 03:18:03 2003
@@ -0,0 +1,7 @@
+# Source file used to test the jal macro for NewABI.
+label:
+ dli $4, 0x12345678
+ jal label
+
+# Make objdump print ...
+ .space 8
diff -BurpNX /bigdisk/src/gcc-exclude source-orig/gas/testsuite/gas/mips/mips.exp source/gas/testsuite/gas/mips/mips.exp
--- source-orig/gas/testsuite/gas/mips/mips.exp Wed May 7 11:17:51 2003
+++ source/gas/testsuite/gas/mips/mips.exp Thu May 15 03:07:06 2003
@@ -448,6 +448,7 @@ if { [istarget mips*-*-*] } then {
run_dump_test_arches "jal-empic-elf-3" [mips_arch_list_matching mips1]
}
run_list_test_arches "jal-range" "-32" [mips_arch_list_matching mips1]
+ if $has_newabi { run_dump_test "jal-newabi" }
if !$aout { run_dump_test "la" }
if $elf { run_dump_test "la-svr4pic" }
if $elf { run_dump_test "la-xgot" }
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] MIPS gas: Use PIC_CALL_REG instead of uninitialized tempreg
2003-05-14 23:52 [PATCH] MIPS gas: Use PIC_CALL_REG instead of uninitialized tempreg Thiemo Seufer
2003-05-15 0:55 ` Thiemo Seufer
@ 2003-05-21 21:16 ` Eric Christopher
2003-05-23 15:06 ` Daniel Jacobowitz
1 sibling, 1 reply; 5+ messages in thread
From: Eric Christopher @ 2003-05-21 21:16 UTC (permalink / raw)
To: Thiemo Seufer; +Cc: binutils
> tempreg isn't properly initialized in this case and should AFAICS
> always be PIC_CALL_REG anyway.
>
agreed.
>
> Thiemo
>
>
> 2003-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
>
> /gas/ChangeLog
> * config/tc-mips.c (macro): Don't use uninitialized tempreg.
>
Please apply to mainline.
Daniel: this is needed on the branch. Thanks. Please ack for Thiemo to
apply to branch.
-eric
--
Eric Christopher <echristo@redhat.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] MIPS gas: Use PIC_CALL_REG instead of uninitialized tempreg
2003-05-21 21:16 ` Eric Christopher
@ 2003-05-23 15:06 ` Daniel Jacobowitz
0 siblings, 0 replies; 5+ messages in thread
From: Daniel Jacobowitz @ 2003-05-23 15:06 UTC (permalink / raw)
To: Eric Christopher; +Cc: Thiemo Seufer, binutils
On Wed, May 21, 2003 at 02:11:36PM -0700, Eric Christopher wrote:
>
> > tempreg isn't properly initialized in this case and should AFAICS
> > always be PIC_CALL_REG anyway.
> >
>
> agreed.
>
> >
> > Thiemo
> >
> >
> > 2003-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
> >
> > /gas/ChangeLog
> > * config/tc-mips.c (macro): Don't use uninitialized tempreg.
> >
>
> Please apply to mainline.
>
> Daniel: this is needed on the branch. Thanks. Please ack for Thiemo to
> apply to branch.
Sure, thank you both.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-05-23 15:06 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-14 23:52 [PATCH] MIPS gas: Use PIC_CALL_REG instead of uninitialized tempreg Thiemo Seufer
2003-05-15 0:55 ` Thiemo Seufer
2003-05-15 2:02 ` Thiemo Seufer
2003-05-21 21:16 ` Eric Christopher
2003-05-23 15:06 ` Daniel Jacobowitz
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).