Patchwork [committed] PR 51931: force non-MIPS16ness for long-branch tests

login
register
mail settings
Submitter Richard Sandiford
Date Jan. 22, 2012, 10:33 a.m.
Message ID <87sjj8gh6y.fsf@firetop.home>
Download mbox | patch
Permalink /patch/137222/
State New
Headers show

Comments

Richard Sandiford - Jan. 22, 2012, 10:33 a.m.
The MIPS16 port has never handled long branches properly; see PR 51931
for the details.  It isn't easy to xfail MIPS16-specific problems at
the dejagnu level because of -mflip-mips16, so the patch below forces
a nomips16 attribute instead.

Tested on mips64-linux-gnu and applied.

Richard


gcc/testsuite/
	PR target/51931
	* gcc.c-torture/compile/20001226-1.c: Add nomips16 attribute.
	* g++.dg/opt/longbranch1.C: Likewise.
Chung-Lin Tang - Jan. 30, 2012, 9:35 a.m.
On 2012/1/22 06:33 PM, Richard Sandiford wrote:
> The MIPS16 port has never handled long branches properly; see PR 51931
> for the details.  It isn't easy to xfail MIPS16-specific problems at
> the dejagnu level because of -mflip-mips16, so the patch below forces
> a nomips16 attribute instead.
> 
> Tested on mips64-linux-gnu and applied.
> 
> Richard

CCing Catherine, I think we have a fix for this?

Thanks,
Chung-Lin

Patch

Index: gcc/testsuite/gcc.c-torture/compile/20001226-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/20001226-1.c	2012-01-21 11:06:35.000000000 +0000
+++ gcc/testsuite/gcc.c-torture/compile/20001226-1.c	2012-01-21 11:24:26.000000000 +0000
@@ -21,6 +21,10 @@  #define C256(x,y) C64(x,y) C64(x,y+4) C6
 #define C1024(x,y) C256(x,y) C256(x+16,y) C256(x+32,y) C256(x+48,y)
 #define C4096(x,y) C1024(x,y) C1024(x,y+16) C1024(x,y+32) C1024(x,y+48)
 
+#ifdef __mips
+/* See PR 51931.  */
+__attribute__((nomips16))
+#endif
 unsigned foo(int x[64], int y[64])
 {
   C4096(x,y);
Index: gcc/testsuite/g++.dg/opt/longbranch1.C
===================================================================
--- gcc/testsuite/g++.dg/opt/longbranch1.C	2012-01-21 11:24:44.000000000 +0000
+++ gcc/testsuite/g++.dg/opt/longbranch1.C	2012-01-21 11:24:48.000000000 +0000
@@ -26,6 +26,10 @@  #define verymuchcode \
         muchcode; muchcode; muchcode; muchcode; muchcode; muchcode; \
         muchcode; muchcode; muchcode; muchcode; muchcode; muchcode
 
+#ifdef __mips
+/* See PR 51931.  */
+__attribute__((nomips16))
+#endif
 int
 main (int argc, char **argv)
 {