Bug 17836 - [4.0 Regression] ABI breakage for 16-byte vectors (non-Altivec ABI & ISA)
Summary: [4.0 Regression] ABI breakage for 16-byte vectors (non-Altivec ABI & ISA)
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.0.0
: P1 critical
Target Milestone: 4.0.0
Assignee: Paolo Bonzini
URL:
Keywords: ABI, patch
Depends on:
Blocks:
 
Reported: 2004-10-05 07:49 UTC by Paolo Bonzini
Modified: 2015-01-14 21:51 UTC (History)
2 users (show)

See Also:
Host:
Target: powerpc-apple-darwin
Build:
Known to work:
Known to fail:
Last reconfirmed: 2004-10-05 07:49:49


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paolo Bonzini 2004-10-05 07:49:22 UTC
This bug was introduced when non-hardware-supported vectors were moved to BLKmode.

It was present in the i386 backend as well, and was fixed by
http://gcc.gnu.org/ml/gcc-patches/2004-07/msg02197.html; rth reviewed this patch
saying that "an rs6000 maintainer should review this to be sure that all vector
types of a given width should be treated identically".

The patch was subsequently updated and the update is at
http://gcc.gnu.org/ml/gcc-patches/2004-08/msg00379.html, together with an
analysis of all the backends that points out why the vector lowering patch does
not break other backends.

David Edelsohn rejected the patch, asking to provide a design for vector
argument passing; some of the discussions are at
- http://gcc.gnu.org/ml/gcc-patches/2004-08/msg00379.html
- http://gcc.gnu.org/ml/gcc-patches/2004-08/msg01531.html

I am including Mark in the CC list because I believe that (alas) this patch will
only be applied once 4.0 branches as an interim measure.

Paolo
Comment 1 Paolo Bonzini 2004-10-08 07:18:19 UTC
Updated patch at http://gcc.gnu.org/ml/gcc-patches/2004-10/msg00631.html

David agreed to accept the patch, provided that it warned about possible ABI
changes for vectors bigger than 16 bytes.
Comment 2 Andrew Pinski 2004-10-10 20:27:27 UTC
Causes these two tests to fail on ppc:
FAIL: gcc.dg/compat/vector-2 c_compat_x_tst.o compile
FAIL: gcc.dg/compat/vector-2 c_compat_y_tst.o compile
And:
FAIL: gcc.dg/pr17055-1.c (test for excess errors)
Comment 3 paolo.bonzini@polimi.it 2004-10-11 07:18:41 UTC
Subject: Re:  [4.0 Regression] ABI breakage for 16-byte
 vectors (non-Altivec ABI & ISA)

> ------- Additional Comments From pinskia at gcc dot gnu dot org  2004-10-10 20:27 -------
> Causes these two tests to fail on ppc:
> FAIL: gcc.dg/compat/vector-2 c_compat_x_tst.o compile
> FAIL: gcc.dg/compat/vector-2 c_compat_y_tst.o compile

No, it failed even before.  Actually, the bug is masking the failure in 
vector-1.c

 From http://gcc.gnu.org/ml/gcc-testresults/2004-07/msg00015.html:

FAIL: gcc.dg/compat/vector-1 c_compat_x_tst.o compile
FAIL: gcc.dg/compat/vector-1 c_compat_y_tst.o compile
UNRESOLVED: gcc.dg/compat/vector-1 c_compat_x_tst.o-c_compat_y_tst.o link
UNRESOLVED: gcc.dg/compat/vector-1 c_compat_x_tst.o-c_compat_y_tst.o 
execute
FAIL: gcc.dg/compat/vector-2 c_compat_x_tst.o compile
FAIL: gcc.dg/compat/vector-2 c_compat_y_tst.o compile
UNRESOLVED: gcc.dg/compat/vector-2 c_compat_x_tst.o-c_compat_y_tst.o link
UNRESOLVED: gcc.dg/compat/vector-2 c_compat_x_tst.o-c_compat_y_tst.o 
execute

There are problems with SPE argument passing.

Paolo

Comment 4 GCC Commits 2004-11-22 01:21:21 UTC
Subject: Bug 17836

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	dje@gcc.gnu.org	2004-11-22 01:21:11

Modified files:
	gcc            : ChangeLog 
	gcc/config/rs6000: rs6000.c 

Log message:
	PR target/17836
	* config/rs6000/rs6000.c (rs6000_return_in_memory): Return
	synthetic vectors in memory.
	(function_arg_boundary): Align large synthetic vectors.
	(rs6000_pass_by_reference): Pass synthetic vectors in memory.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.6436&r2=2.6437
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/rs6000/rs6000.c.diff?cvsroot=gcc&r1=1.746&r2=1.747

Comment 5 David Edelsohn 2004-11-23 01:32:59 UTC
patches committed
Comment 6 paolo.bonzini@lu.unisi.ch 2004-11-23 08:19:34 UTC
Subject: Re:  [4.0 Regression] ABI breakage for 16-byte
 vectors (non-Altivec ABI & ISA)

> patches committed

Thank you very much.  Sorry for the misunderstandings.

Paolo
Comment 7 hjl@gcc.gnu.org 2015-01-14 21:51:44 UTC
Author: hjl
Date: Wed Jan 14 21:51:09 2015
New Revision: 219616

URL: https://gcc.gnu.org/viewcvs?rev=219616&root=gcc&view=rev
Log:
Correct target selector in -mfentry tests

-fprofile -mfentry works with PIE if gcrt1.o is compiled with -fPIC.  A
glibc has been filed, PR 17836, and a glibc patch has been submitted.

	* gcc.target/i386/fentry-override.c: Properly place {} in target
	selector.  Remove nonpic.
	* gcc.target/i386/fentry.c: Likewise.

Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.target/i386/fentry-override.c
    trunk/gcc/testsuite/gcc.target/i386/fentry.c