Patchwork [i386] : Fix PR testsuite/51524

login
register
mail settings
Submitter Uros Bizjak
Date Dec. 13, 2011, 3:05 p.m.
Message ID <CAFULd4a-pegj_bm+WuFBMerH3BDdjS_02JrcXCh+RBi6MSVB+w@mail.gmail.com>
Download mbox | patch
Permalink /patch/131117/
State New
Headers show

Comments

Uros Bizjak - Dec. 13, 2011, 3:05 p.m.
Hello!

Recent RA change disturbs delicate balance of register allocation, so
a couple of scan tests begins to fail.

Attached patch fixes these scan failures by forcing arguments of test
function in registers.

2011-12-13  Uros Bizjak  <ubizjak@gmail.com>

	PR testsuite/51524
	* gcc.target/i386/bmi2-mulx32-1.c (gen_mulx): Add attribute regparm(2).
	* gcc.target/i386/bmi2-mulx32-2.c (calc_mulx_u32): Ditto.

Tested on x86_64-pc-linux-gnu {,-m32}, committed to mainline SVN.

Uros.

Patch

Index: gcc.target/i386/bmi2-mulx32-1.c
===================================================================
--- gcc.target/i386/bmi2-mulx32-1.c     (revision 182192)
+++ gcc.target/i386/bmi2-mulx32-1.c     (working copy)
@@ -15,7 +15,7 @@ 
   return res;
 }

-__attribute__((noinline))
+__attribute__((noinline, regparm (2)))
 unsigned long long
 gen_mulx (unsigned a, unsigned b)
 {
Index: gcc.target/i386/bmi2-mulx32-2.c
===================================================================
--- gcc.target/i386/bmi2-mulx32-2.c     (revision 182192)
+++ gcc.target/i386/bmi2-mulx32-2.c     (working copy)
@@ -17,7 +17,7 @@ 
   return res;
 }

-__attribute__((noinline))
+__attribute__((noinline, regparm (2)))
 unsigned calc_mulx_u32 (unsigned x, unsigned y, unsigned *res_h)
 {
   return (unsigned) _mulx_u32 (x, y, res_h);