Message ID | 6D39441BF12EF246A7ABCE6654B0235380B73EAC@hhmail02.hh.imgtec.org |
---|---|
State | New |
Headers | show |
> -----Original Message----- > From: gcc-patches-owner@gcc.gnu.org [mailto:gcc-patches- > owner@gcc.gnu.org] On Behalf Of Matthew Fortune > Sent: Thursday, February 23, 2017 5:21 PM > To: Moore, Catherine <Catherine_Moore@mentor.com> > Cc: 'gcc-patches@gcc.gnu.org' (gcc-patches@gcc.gnu.org) <gcc- > patches@gcc.gnu.org> > Subject: [PATCH,MIPS] Handle paired single test changes > > Hi Catherine, > > I missed a couple of testsuite changes that are needed to deal with the > fallout of fixing the ABI issues for floating point vectors. I had them > in my tree but forgot to post. The ABI change for V2SF i.e. paired > single is a bug fix as the behaviour was unintended and violates the goal > of having FP64 a compatible ABI extension for o32. The probability of > having code dependent on this corner case of the calling convention in > the wild is exceptionally low so I see no significant risk still. > > The tests for paired single just need a little encouragement to still > produce the necessary instructions now that paired single is not returned > in registers. > > Does it look OK to you? > > Thanks, > Matthew > > gcc/testsuite/ > > * gcc.target/mips/mips-ps-type-2.c (move): Force generation > of mov.ps. > * gcc.target/mips/mips-ps-type.c (move): Likewise. > (cond_move1): Simplify condition to force generation of > mov[nz].ps. > (cond_move2): Likewise. Hi Matthew -- Looks good to me. Catherine
diff --git a/gcc/testsuite/gcc.target/mips/mips-ps-type-2.c b/gcc/testsuite/gcc.target/mips/mips-ps-type-2.c index fecc35b..ed5d6ee 100644 --- a/gcc/testsuite/gcc.target/mips/mips-ps-type-2.c +++ b/gcc/testsuite/gcc.target/mips/mips-ps-type-2.c @@ -32,6 +32,11 @@ NOMIPS16 v2sf init (float a, float b) /* Move between registers */ NOMIPS16 v2sf move (v2sf a) { + register v2sf b __asm__("$f0") = a; + register v2sf c __asm__("$f2"); + __asm__ __volatile__ ("" : "+f" (b)); + c = b; + __asm__ __volatile__ ("" : : "f" (c)); return a; } diff --git a/gcc/testsuite/gcc.target/mips/mips-ps-type.c b/gcc/testsuite/gcc.target/mips/mips-ps-type.c index d74d4b5..731649c 100644 --- a/gcc/testsuite/gcc.target/mips/mips-ps-type.c +++ b/gcc/testsuite/gcc.target/mips/mips-ps-type.c @@ -30,6 +30,11 @@ NOMIPS16 v2sf init (float a, float b) /* Move between registers */ NOMIPS16 v2sf move (v2sf a) { + register v2sf b __asm__("$f0") = a; + register v2sf c __asm__("$f2"); + __asm__ __volatile__ ("" : "+f" (b)); + c = b; + __asm__ __volatile__ ("" : : "f" (c)); return a; } @@ -96,7 +101,7 @@ NOMIPS16 v2sf nmsub (v2sf a, v2sf b, v2sf c) /* Conditional Move */ NOMIPS16 v2sf cond_move1 (v2sf a, v2sf b, long i) { - if (i > 0) + if (i != 0) return a; else return b; @@ -105,7 +110,7 @@ NOMIPS16 v2sf cond_move1 (v2sf a, v2sf b, long i) /* Conditional Move */ NOMIPS16 v2sf cond_move2 (v2sf a, v2sf b, int i) { - if (i > 0) + if (i != 0) return a; else return b;