public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/15191] New: -maltivec -mabi=no-altivec results in mis-aligned lvx and stvx
@ 2004-04-28 14:48 amodra at bigpond dot net dot au
  2004-04-28 15:49 ` [Bug target/15191] " amodra at bigpond dot net dot au
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: amodra at bigpond dot net dot au @ 2004-04-28 14:48 UTC (permalink / raw)
  To: gcc-bugs

Compiling the following with -m64 -O1 -maltivec -mabi=no-altivec
results in misaligned lvx data accesses in bar.
-m32 -O1 -maltivec -mabi=no-altivec results in misaligned stvx data accesses in f.

#define vector __attribute__ ((vector_size (16)))
vector int v1;
extern void bar (int, vector int, vector int, vector int,
		 vector int, vector int);
void f (void)
{
  bar (2, v1, v1, v1, v1, v1);
}

void bar (int a, vector int b, vector int c, vector int d,
	  vector int e, vector int f)
{
  v1 = b + c + d + e + f;
}

-- 
           Summary: -maltivec -mabi=no-altivec results in mis-aligned lvx
                    and stvx
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P2
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: amodra at bigpond dot net dot au
                CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: powerpc64-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15191


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/15191] -maltivec -mabi=no-altivec results in mis-aligned lvx and stvx
  2004-04-28 14:48 [Bug target/15191] New: -maltivec -mabi=no-altivec results in mis-aligned lvx and stvx amodra at bigpond dot net dot au
@ 2004-04-28 15:49 ` amodra at bigpond dot net dot au
  2004-04-28 16:06 ` amodra at bigpond dot net dot au
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: amodra at bigpond dot net dot au @ 2004-04-28 15:49 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From amodra at bigpond dot net dot au  2004-04-28 14:45 -------
prototype patch at http://gcc.gnu.org/ml/gcc/2004-04/msg01316.html

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15191


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/15191] -maltivec -mabi=no-altivec results in mis-aligned lvx and stvx
  2004-04-28 14:48 [Bug target/15191] New: -maltivec -mabi=no-altivec results in mis-aligned lvx and stvx amodra at bigpond dot net dot au
  2004-04-28 15:49 ` [Bug target/15191] " amodra at bigpond dot net dot au
@ 2004-04-28 16:06 ` amodra at bigpond dot net dot au
  2004-05-12  6:05 ` amodra at bigpond dot net dot au
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: amodra at bigpond dot net dot au @ 2004-04-28 16:06 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |amodra at bigpond dot net
                   |dot org                     |dot au
             Status|UNCONFIRMED                 |ASSIGNED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15191


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/15191] -maltivec -mabi=no-altivec results in mis-aligned lvx and stvx
  2004-04-28 14:48 [Bug target/15191] New: -maltivec -mabi=no-altivec results in mis-aligned lvx and stvx amodra at bigpond dot net dot au
  2004-04-28 15:49 ` [Bug target/15191] " amodra at bigpond dot net dot au
  2004-04-28 16:06 ` amodra at bigpond dot net dot au
@ 2004-05-12  6:05 ` amodra at bigpond dot net dot au
  2004-05-12 12:21 ` amodra at bigpond dot net dot au
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: amodra at bigpond dot net dot au @ 2004-05-12  6:05 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From amodra at bigpond dot net dot au  2004-05-11 04:03 -------
Changes by:	amodra@gcc.gnu.org	2004-05-07 02:01:13

Modified files:
	gcc            : ChangeLog 
	gcc/config/rs6000: rs6000.h sysv4.h 

Log message:
	* config/rs6000/rs6000.h (STACK_BOUNDARY): Use 128 bit for either
	TARGET_ALTIVEC or TARGET_ALTIVEC_ABI.
	* config/rs6000/sysv4.h (ABI_STACK_BOUNDARY): Likewise.
	(STACK_BOUNDARY): Delete.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.3591&r2=2.3592
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/rs6000/rs6000.h.diff?cvsroot=gcc&r1=1.321&r2=1.322
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/rs6000/sysv4.h.diff?cvsroot=gcc&r1=1.148&r2=1.149

Changes by:	amodra@gcc.gnu.org	2004-05-09 23:48:38

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

Log message:
	* config/rs6000/rs6000.c (function_arg_boundary): Align for ABI_V4
	when size is 8 bytes.
	(function_arg_advance): Account for stack space used by AltiVec
	args when -mabi=altivec.  Simplify alignment calculations.  For
	ABI_V4, pass AltiVec vectors by reference when -mabi=no-altivec.
	(function_arg): Similarly.
	(function_arg_pass_by_reference): True for ABI_V4 AltiVec when
	not AltiVec ABI.
	(rs6000_va_arg): Correct fp arg test.  Adjust for AltiVec change.
	Correct alignment, and align before testing reg count.  Remove
	TREE_THIS_VOLATILE from reg.  Don't emit unused labels.
	(rs6000_complex_function_value): Check TARGET_HARD_FLOAT and
	TARGET_FPRS here..
	(rs6000_function_value): .. not here before call.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.3613&r2=2.3614
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/rs6000/rs6000.c.diff?cvsroot=gcc&r1=1.637&r2=1.638

Changes by:	amodra@gcc.gnu.org	2004-05-10 14:26:51

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

Log message:
	* config/rs6000/rs6000.c (function_arg_boundary): Always align
	AltiVec vectors.
	(function_arg_advance): Pass TARGET_32BIT -mabi=no-altivec AltiVec
	vectors by refererence.  Align the same for TARGET_64BIT to a 16
	byte boundary.  Remove useless code.  Add function comment.
	(function_arg): Similarly.  Move gpr rs6000_mixed_function_arg
	call to where it belongs.
	(function_arg_partial_nregs): Return true for all TARGET_32BIT
	-mabi=no-altivec AltiVec vectors.  Fix debug output.
	(rs6000_va_arg): Adjust for AltiVec change.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.3615&r2=2.3616
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/rs6000/rs6000.c.diff?cvsroot=gcc&r1=1.638&r2=1.639

Branch: 	hammer-3_3-branch
Changes by:	amodra@gcc.gnu.org	2004-05-11 02:21:19

Modified files:
	gcc            : ChangeLog.hammer 
	gcc/config/rs6000: rs6000.c rs6000.h sysv4.h 

Log message:
	Backport from mainline.
	2004-05-10  Alan Modra  <amodra@bigpond.net.au>
	* config/rs6000/rs6000.c (function_arg_boundary): Always align
	AltiVec vectors.
	(function_arg_advance): Pass TARGET_32BIT -mabi=no-altivec AltiVec
	vectors by refererence.  Align the same for TARGET_64BIT to a 16
	byte boundary.  Remove useless code.  Add function comment.
	(function_arg): Similarly.  Move gpr rs6000_mixed_function_arg
	call to where it belongs.
	(function_arg_partial_nregs): Return true for all TARGET_32BIT
	-mabi=no-altivec AltiVec vectors.  Fix debug output.
	(rs6000_va_arg): Adjust for AltiVec change.
	
	2004-05-10  Alan Modra  <amodra@bigpond.net.au>
	* config/rs6000/rs6000.c (function_arg_boundary): Align for ABI_V4
	when size is 8 bytes.
	(function_arg_advance): Account for stack space used by AltiVec
	args when -mabi=altivec.  Simplify alignment calculations.  For
	ABI_V4, pass AltiVec vectors by reference when -mabi=no-altivec.
	(function_arg): Similarly.
	(function_arg_pass_by_reference): True for ABI_V4 AltiVec when
	not AltiVec ABI.
	(rs6000_va_arg): Correct fp arg test.  Adjust for AltiVec change.
	Correct alignment, and align before testing reg count.  Remove
	TREE_THIS_VOLATILE from reg.  Don't emit unused labels.
	(rs6000_complex_function_value): Check TARGET_HARD_FLOAT and
	TARGET_FPRS here..
	(rs6000_function_value): .. not here before call.
	
	2004-05-07  Alan Modra  <amodra@bigpond.net.au>
	* config/rs6000/rs6000.h (STACK_BOUNDARY): Use 128 bit for either
	TARGET_ALTIVEC or TARGET_ALTIVEC_ABI.
	* config/rs6000/sysv4.h (ABI_STACK_BOUNDARY): Likewise.
	(STACK_BOUNDARY): Delete.
	
	2004-05-07  Fariborz Jahanian  <fjahanian@apple.com>
	* config/rs6000/rs6000.c (rs6000_mixed_function_arg): Generate
	appropriate parallels for vector arguments passed to vararg functions.
	(function_arg): Make the call to rs6000_mixed_function_arg for
	vector args as needed.
	
	2004-02-23  Fariborz Jahanian <fjahanian@apple.com>
	* config/rs6000/rs6000.c (function_arg): Call to
	rs6000_mixed_function_arg for DFmode moved to allow
	normal DFmode incoming register assignment.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.hammer.diff?cvsroot=gcc&only_with_tag=hammer-3_3-branch&r1=1.1.2.398&r2=1.1.2.399
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/rs6000/rs6000.c.diff?cvsroot=gcc&only_with_tag=hammer-3_3-branch&r1=1.397.2.38&r2=1.397.2.39
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/rs6000/rs6000.h.diff?cvsroot=gcc&only_with_tag=hammer-3_3-branch&r1=1.234.2.25&r2=1.234.2.26
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/rs6000/sysv4.h.diff?cvsroot=gcc&only_with_tag=hammer-3_3-branch&r1=1.113.2.11&r2=1.113.2.12


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |3.4.0
      Known to work|                            |3.5.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15191


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/15191] -maltivec -mabi=no-altivec results in mis-aligned lvx and stvx
  2004-04-28 14:48 [Bug target/15191] New: -maltivec -mabi=no-altivec results in mis-aligned lvx and stvx amodra at bigpond dot net dot au
                   ` (2 preceding siblings ...)
  2004-05-12  6:05 ` amodra at bigpond dot net dot au
@ 2004-05-12 12:21 ` amodra at bigpond dot net dot au
  2004-05-12 13:07 ` [Bug target/15191] [3.4 only] " pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: amodra at bigpond dot net dot au @ 2004-05-12 12:21 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From amodra at bigpond dot net dot au  2004-05-11 16:29 -------
Branch: 	hammer-3_3-branch
Changes by:	amodra@gcc.gnu.org	2004-05-11 15:59:19

Modified files:
	gcc            : ChangeLog.hammer calls.c defaults.h function.c 
	gcc/config/sparc: sparc.h 

Log message:
	Backport from mainline.
	2003-10-08  Geoffrey Keating  <geoffk@apple.com>
	* function.c (pad_to_arg_alignment): Move 'boundary_in_bytes'
	definition to above SPARC_STACK_BOUNDARY_HACK.
	
	2003-10-07  Geoffrey Keating  <geoffk@apple.com>
	* function.c (pad_to_arg_alignment): Take STACK_POINTER_OFFSET into
	account	when aligning arguments.
	* calls.c (STACK_POINTER_OFFSET): Move default from here ...
	* defaults.h (STACK_POINTER_OFFSET): ... to here.
	* config/sparc/sparc.h (STACK_BOUNDARY): Add comment about how
	it's wrong when TARGET_ARCH64 && TARGET_STACK_BIAS.
	(SPARC_STACK_BOUNDARY_HACK): Define.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.hammer.diff?cvsroot=gcc&only_with_tag=hammer-3_3-branch&r1=1.1.2.400&r2=1.1.2.401
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/calls.c.diff?cvsroot=gcc&only_with_tag=hammer-3_3-branch&r1=1.242.2.24&r2=1.242.2.25
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/defaults.h.diff?cvsroot=gcc&only_with_tag=hammer-3_3-branch&r1=1.96.2.3&r2=1.96.2.4
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/function.c.diff?cvsroot=gcc&only_with_tag=hammer-3_3-branch&r1=1.387.2.25&r2=1.387.2.26
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/sparc/sparc.h.diff?cvsroot=gcc&only_with_tag=hammer-3_3-branch&r1=1.215.2.5&r2=1.215.2.6


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15191


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/15191] [3.4 only] -maltivec -mabi=no-altivec results in mis-aligned lvx and stvx
  2004-04-28 14:48 [Bug target/15191] New: -maltivec -mabi=no-altivec results in mis-aligned lvx and stvx amodra at bigpond dot net dot au
                   ` (3 preceding siblings ...)
  2004-05-12 12:21 ` amodra at bigpond dot net dot au
@ 2004-05-12 13:07 ` pinskia at gcc dot gnu dot org
  2004-06-10  6:39 ` cvs-commit at gcc dot gnu dot org
  2004-06-10  6:46 ` amodra at bigpond dot net dot au
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-12 13:07 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|-maltivec -mabi=no-altivec  |[3.4 only] -maltivec -
                   |results in mis-aligned lvx  |mabi=no-altivec results in
                   |and stvx                    |mis-aligned lvx and stvx
   Target Milestone|---                         |3.4.1


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15191


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/15191] [3.4 only] -maltivec -mabi=no-altivec results in mis-aligned lvx and stvx
  2004-04-28 14:48 [Bug target/15191] New: -maltivec -mabi=no-altivec results in mis-aligned lvx and stvx amodra at bigpond dot net dot au
                   ` (4 preceding siblings ...)
  2004-05-12 13:07 ` [Bug target/15191] [3.4 only] " pinskia at gcc dot gnu dot org
@ 2004-06-10  6:39 ` cvs-commit at gcc dot gnu dot org
  2004-06-10  6:46 ` amodra at bigpond dot net dot au
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-06-10  6:39 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-06-10 06:39 -------
Subject: Bug 15191

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	amodra@gcc.gnu.org	2004-06-10 06:39:50

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

Log message:
	PR target/15191
	2004-05-15  Alan Modra  <amodra@bigpond.net.au>
	* config/rs6000/rs6000.c (rs6000_va_arg <ABI_V4>): Don't use
	UNITS_PER_WORD to calculate gpr size.  Re-instate code to set reg
	count to 8 to handle n_reg > 2.
	2004-05-10  Alan Modra  <amodra@bigpond.net.au>
	* config/rs6000/rs6000.c (function_arg_boundary): Always align
	AltiVec vectors.
	(function_arg_advance): Pass TARGET_32BIT -mabi=no-altivec AltiVec
	vectors by refererence.  Align the same for TARGET_64BIT to a 16
	byte boundary.  Remove useless code.  Add function comment.
	(function_arg): Similarly.  Move gpr rs6000_mixed_function_arg
	call to where it belongs.
	(function_arg_partial_nregs): Return true for all TARGET_32BIT
	-mabi=no-altivec AltiVec vectors.  Fix debug output.
	(rs6000_va_arg): Adjust for AltiVec change.
	2004-05-10  Alan Modra  <amodra@bigpond.net.au>
	* config/rs6000/rs6000.c (function_arg_boundary): Align for ABI_V4
	when size is 8 bytes.
	(function_arg_advance): Account for stack space used by AltiVec
	args when -mabi=altivec.  Simplify alignment calculations.  For
	ABI_V4, pass AltiVec vectors by reference when -mabi=no-altivec.
	(function_arg): Similarly.
	(function_arg_pass_by_reference): True for ABI_V4 AltiVec when
	not AltiVec ABI.
	(rs6000_va_arg): Correct fp arg test.  Adjust for AltiVec change.
	Correct alignment, and align before testing reg count.  Remove
	TREE_THIS_VOLATILE from reg.  Don't emit unused labels.
	(rs6000_complex_function_value): Check TARGET_HARD_FLOAT and
	TARGET_FPRS here..
	(rs6000_function_value): .. not here before call.
	2004-05-07  Alan Modra  <amodra@bigpond.net.au>
	* config/rs6000/rs6000.h (STACK_BOUNDARY): Use 128 bit for either
	TARGET_ALTIVEC or TARGET_ALTIVEC_ABI.
	* config/rs6000/sysv4.h (ABI_STACK_BOUNDARY): Likewise.
	(STACK_BOUNDARY): Delete.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.487&r2=2.2326.2.488
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/rs6000/rs6000.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.576.2.22&r2=1.576.2.23
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/rs6000/rs6000.h.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.306.4.6&r2=1.306.4.7
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/rs6000/sysv4.h.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.144.4.2&r2=1.144.4.3



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15191


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/15191] [3.4 only] -maltivec -mabi=no-altivec results in mis-aligned lvx and stvx
  2004-04-28 14:48 [Bug target/15191] New: -maltivec -mabi=no-altivec results in mis-aligned lvx and stvx amodra at bigpond dot net dot au
                   ` (5 preceding siblings ...)
  2004-06-10  6:39 ` cvs-commit at gcc dot gnu dot org
@ 2004-06-10  6:46 ` amodra at bigpond dot net dot au
  6 siblings, 0 replies; 8+ messages in thread
From: amodra at bigpond dot net dot au @ 2004-06-10  6:46 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From amodra at bigpond dot net dot au  2004-06-10 06:45 -------
Fixed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15191


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-06-10  6:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-28 14:48 [Bug target/15191] New: -maltivec -mabi=no-altivec results in mis-aligned lvx and stvx amodra at bigpond dot net dot au
2004-04-28 15:49 ` [Bug target/15191] " amodra at bigpond dot net dot au
2004-04-28 16:06 ` amodra at bigpond dot net dot au
2004-05-12  6:05 ` amodra at bigpond dot net dot au
2004-05-12 12:21 ` amodra at bigpond dot net dot au
2004-05-12 13:07 ` [Bug target/15191] [3.4 only] " pinskia at gcc dot gnu dot org
2004-06-10  6:39 ` cvs-commit at gcc dot gnu dot org
2004-06-10  6:46 ` amodra at bigpond dot net dot au

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).