diff mbox

Allow Solaris 2/x86 ABI to match recent Studio compiler (PR target/44452)

Message ID ydd8w2lvln4.fsf@manam.CeBiTec.Uni-Bielefeld.DE
State New
Headers show

Commit Message

Rainer Orth Sept. 28, 2010, 5:11 p.m. UTC
Uros Bizjak <ubizjak@gmail.com> writes:

> Generic x86 part is OK.

Thanks.  Unfortunately, I hadn't noticed that the approval didn't apply
to the vx-common.h part and checked in the patch.  I hope that won't
cause any trouble.

>> 2010-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
>>
>>        gcc/testsuite:
>>        PR target/44452
>>        * gcc.target/i386/abi-2.c: XFAIL on i?86-*-solaris2* && ilp32.
>>        * gcc.target/i386/pr22076.c: Likewise.
>
> Just skip pr22076.c on solaris targets, no need for so many complications.
>
> OK with this change.

Fine with me.  Here's what I've checked into the 4.4 and 4.5 branches
after testing with runtest and DEJAGNU pointing to a site.exp that
exercised both 32 and 64-bit multilibs to make sure only the 32-bit test
is skipped.

Thanks.
	Rainer


2010-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	PR target/44452
	* gcc.target/i386/abi-2.c: XFAIL on i?86-*-solaris2* && ilp32.
	* gcc.target/i386/pr22076.c: Skip on i?86-solaris2* && ilp32.

Comments

Uros Bizjak Sept. 28, 2010, 6:23 p.m. UTC | #1
On Tue, 2010-09-28 at 19:11 +0200, Rainer Orth wrote:
> diff -r ce8a598bd7f1 gcc/testsuite/gcc.target/i386/pr22076.c
> --- a/gcc/testsuite/gcc.target/i386/pr22076.c	Tue Sep 28 18:35:47 2010 +0200
> +++ b/gcc/testsuite/gcc.target/i386/pr22076.c	Tue Sep 28 18:49:28 2010 +0200
> @@ -1,4 +1,5 @@
> -/* { dg-do compile } */
> +/* Fails on 32-bit Solaris 2/x86: PR target/44452 */
> +/* { dg-do compile { target { ! { i?86-*-solaris2* && ilp32 } } } } */
>  /* { dg-options "-O2 -fomit-frame-pointer -flax-vector-conversions -mmmx" } */
>  
>  #include <mmintrin.h>

FYI, in the cases as above, you can use dg-skip-if directive, like:

/* { dg-skip-if "PR target/44452" { "i?86-*-solaris2*" && ilp32 }
{ "*" } { "" } } */

Uros.
Rainer Orth Sept. 29, 2010, 11:11 a.m. UTC | #2
Uros Bizjak <ubizjak@gmail.com> writes:

> FYI, in the cases as above, you can use dg-skip-if directive, like:
>
> /* { dg-skip-if "PR target/44452" { "i?86-*-solaris2*" && ilp32 }
> { "*" } { "" } } */

Right, I'd used that in the past, but forgotten about it.

Something else: do you know of an update to the i386 psABI?  The
original SCO document is from 1996 and thus way incomplete and out of
date.  The only thing I could find was

	http://www.agner.org/optimize/calling_conventions.pdf

but (apart from having lots of information on non-ELF platforms like
Windows or Mac OS X) this isn't a proper specification, but rather a
reengineering of what various compilers implement.

Thanks.
	Rainer
Uros Bizjak Sept. 29, 2010, 1:31 p.m. UTC | #3
On Wed, Sep 29, 2010 at 1:11 PM, Rainer Orth
<ro@cebitec.uni-bielefeld.de> wrote:
> Uros Bizjak <ubizjak@gmail.com> writes:
>
>> FYI, in the cases as above, you can use dg-skip-if directive, like:
>>
>> /* { dg-skip-if "PR target/44452" { "i?86-*-solaris2*" && ilp32 }
>> { "*" } { "" } } */
>
> Right, I'd used that in the past, but forgotten about it.
>
> Something else: do you know of an update to the i386 psABI?  The
> original SCO document is from 1996 and thus way incomplete and out of
> date.  The only thing I could find was
>
>        http://www.agner.org/optimize/calling_conventions.pdf
>
> but (apart from having lots of information on non-ELF platforms like
> Windows or Mac OS X) this isn't a proper specification, but rather a
> reengineering of what various compilers implement.

Please look at http://groups.google.com/group/ia32-abi .

Uros.
Joseph Myers Sept. 29, 2010, 3:55 p.m. UTC | #4
On Wed, 29 Sep 2010, Rainer Orth wrote:

> Uros Bizjak <ubizjak@gmail.com> writes:
> 
> > FYI, in the cases as above, you can use dg-skip-if directive, like:
> >
> > /* { dg-skip-if "PR target/44452" { "i?86-*-solaris2*" && ilp32 }
> > { "*" } { "" } } */
> 
> Right, I'd used that in the past, but forgotten about it.
> 
> Something else: do you know of an update to the i386 psABI?  The
> original SCO document is from 1996 and thus way incomplete and out of
> date.  The only thing I could find was
> 
> 	http://www.agner.org/optimize/calling_conventions.pdf
> 
> but (apart from having lots of information on non-ELF platforms like
> Windows or Mac OS X) this isn't a proper specification, but rather a
> reengineering of what various compilers implement.

I don't believe there's any proper document that would serve as a current 
i386 ELF psABI (which would inevitably in fact involve describing what is 
currently implemented to a large extent).  Perhaps people caring about 
that issue might wish to form a group to write up, but be aware it's a 
large amount of work; discussions on writing a current document for the 
32-bit Power Architecture ABI started at the GCC Summit in 2006 and only 
now do we have a nearly final document that's almost ready for release by 
power.org.  (As with the i386 psABI, there were copyright issues with the 
old unmaintained document meaning the new one needed writing from scratch 
(the 64-bit ABI was used to provide an initial framework); the old PowerPC 
ABI has Sun copyrights from long-ago PowerPC Solaris that no-one now at 
Sun could usefully do anything about, the i386 ABI has SCO copyrights.)
Rainer Orth Sept. 30, 2010, 5:56 p.m. UTC | #5
Uros Bizjak <ubizjak@gmail.com> writes:

>> Something else: do you know of an update to the i386 psABI?  The
>> original SCO document is from 1996 and thus way incomplete and out of
>> date.  The only thing I could find was
>>
>>        http://www.agner.org/optimize/calling_conventions.pdf
>>
>> but (apart from having lots of information on non-ELF platforms like
>> Windows or Mac OS X) this isn't a proper specification, but rather a
>> reengineering of what various compilers implement.
>
> Please look at http://groups.google.com/group/ia32-abi .

Excellent, thanks for the hint.  Unfortunately, while I can download
RFC-TLDESC-x86.txt without problems, I repeatedly got an error for
AVX-psABI.pdf.  Given that the Files feature will be removed from Google
Groups as of November 1st (though existing files will remain), maybe
H.J. could put a copy of the file somewhere else?

Thanks.
	Rainer
Rainer Orth Sept. 30, 2010, 6:05 p.m. UTC | #6
"Joseph S. Myers" <joseph@codesourcery.com> writes:

>> Something else: do you know of an update to the i386 psABI?  The
>> original SCO document is from 1996 and thus way incomplete and out of
>> date.  The only thing I could find was
>> 
>> 	http://www.agner.org/optimize/calling_conventions.pdf
>> 
>> but (apart from having lots of information on non-ELF platforms like
>> Windows or Mac OS X) this isn't a proper specification, but rather a
>> reengineering of what various compilers implement.
>
> I don't believe there's any proper document that would serve as a current 
> i386 ELF psABI (which would inevitably in fact involve describing what is 
> currently implemented to a large extent).  Perhaps people caring about 

Right, there's nothing wrong about that.  But any proper written
specification would be far better than having to reengineer what current
implementations do.

> that issue might wish to form a group to write up, but be aware it's a 
> large amount of work; discussions on writing a current document for the 
> 32-bit Power Architecture ABI started at the GCC Summit in 2006 and only 
> now do we have a nearly final document that's almost ready for release by 
> power.org.  (As with the i386 psABI, there were copyright issues with the 
> old unmaintained document meaning the new one needed writing from scratch 
> (the 64-bit ABI was used to provide an initial framework); the old PowerPC 
> ABI has Sun copyrights from long-ago PowerPC Solaris that no-one now at 
> Sun could usefully do anything about, the i386 ABI has SCO copyrights.)

By now, it seems that the old 32-bit PowerPC psABI (by SunSoft) has been
released to the (now defunct) OpenSolaris PowerPC project:

	http://hub.opensolaris.org/bin/view/Community+Group+power_pc/powerpc_doc_library

Unless SCO can be persuaded to release the copyright to the i386 psABI
to such a group to allow them to produce a new current version, it might
be viable to instead create an appendix describing what's missing from
the 1996 version?  Chris Quenelle suggested this in private mail, and it
might be a far smaller effort than recreating a complete psABI from
scratch.

	Rainer
diff mbox

Patch

diff -r ce8a598bd7f1 gcc/testsuite/gcc.target/i386/abi-2.c
--- a/gcc/testsuite/gcc.target/i386/abi-2.c	Tue Sep 28 18:35:47 2010 +0200
+++ b/gcc/testsuite/gcc.target/i386/abi-2.c	Tue Sep 28 18:49:28 2010 +0200
@@ -6,4 +6,5 @@ 
 typedef long long __m256i __attribute__ ((__vector_size__ (32)));
 __m256i foo (void) { return (__m256i){ 1, 2, 3, 4 }; }
 
-/* { dg-final { scan-assembler-times "ymm0" 1 } } */
+/* Fails on 32-bit Solaris 2/x86: PR target/44452 */
+/* { dg-final { scan-assembler-times "ymm0" 1 { xfail { i?86-*-solaris2* && ilp32 } } } } */
diff -r ce8a598bd7f1 gcc/testsuite/gcc.target/i386/pr22076.c
--- a/gcc/testsuite/gcc.target/i386/pr22076.c	Tue Sep 28 18:35:47 2010 +0200
+++ b/gcc/testsuite/gcc.target/i386/pr22076.c	Tue Sep 28 18:49:28 2010 +0200
@@ -1,4 +1,5 @@ 
-/* { dg-do compile } */
+/* Fails on 32-bit Solaris 2/x86: PR target/44452 */
+/* { dg-do compile { target { ! { i?86-*-solaris2* && ilp32 } } } } */
 /* { dg-options "-O2 -fomit-frame-pointer -flax-vector-conversions -mmmx" } */
 
 #include <mmintrin.h>