public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/35657] New: TDmode isn't aligned at 128bit when passing to a function
@ 2008-03-21 17:43 hjl dot tools at gmail dot com
2008-03-21 20:54 ` [Bug target/35657] " ubizjak at gmail dot com
` (14 more replies)
0 siblings, 15 replies; 16+ messages in thread
From: hjl dot tools at gmail dot com @ 2008-03-21 17:43 UTC (permalink / raw)
To: gcc-bugs
ix86_function_arg_boundary returns PARM_BOUNDARY for TDmode
for ia32. Should it return 128bit? The psABI isn't clear on
it. I think it should be aligned at 128bit.
--
Summary: TDmode isn't aligned at 128bit when passing to a
function
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: hjl dot tools at gmail dot com
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35657
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/35657] TDmode isn't aligned at 128bit when passing to a function
2008-03-21 17:43 [Bug target/35657] New: TDmode isn't aligned at 128bit when passing to a function hjl dot tools at gmail dot com
@ 2008-03-21 20:54 ` ubizjak at gmail dot com
2008-03-22 0:27 ` hjl dot tools at gmail dot com
` (13 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: ubizjak at gmail dot com @ 2008-03-21 20:54 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from ubizjak at gmail dot com 2008-03-21 20:53 -------
(In reply to comment #0)
> ix86_function_arg_boundary returns PARM_BOUNDARY for TDmode
> for ia32. Should it return 128bit? The psABI isn't clear on
> it. I think it should be aligned at 128bit.
Yes, because it is moved to/from XMM registers. Currently, this exact problem
is handled by a specialization code in ix86_expand_vector_move that forces
unaligned instructions for TDmode memory moves via
ix86_expand_vector_move_misalign.
Please note that we have to be compatible with SSE x86 and non-SSE x86 code, so
TDmode can't be passed in XMM registers on x86_32 targets.
I'd wait for psABI to clear situation w.r.t to alignment first.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35657
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/35657] TDmode isn't aligned at 128bit when passing to a function
2008-03-21 17:43 [Bug target/35657] New: TDmode isn't aligned at 128bit when passing to a function hjl dot tools at gmail dot com
2008-03-21 20:54 ` [Bug target/35657] " ubizjak at gmail dot com
@ 2008-03-22 0:27 ` hjl dot tools at gmail dot com
2008-03-25 0:42 ` hjl dot tools at gmail dot com
` (12 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: hjl dot tools at gmail dot com @ 2008-03-22 0:27 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from hjl dot tools at gmail dot com 2008-03-22 00:27 -------
It is a question how TDmode should be aligned on stack when
passing to a function. I will ask it on the ia32 psABI group.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35657
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/35657] TDmode isn't aligned at 128bit when passing to a function
2008-03-21 17:43 [Bug target/35657] New: TDmode isn't aligned at 128bit when passing to a function hjl dot tools at gmail dot com
2008-03-21 20:54 ` [Bug target/35657] " ubizjak at gmail dot com
2008-03-22 0:27 ` hjl dot tools at gmail dot com
@ 2008-03-25 0:42 ` hjl dot tools at gmail dot com
2008-03-27 18:53 ` hjl at gcc dot gnu dot org
` (11 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: hjl dot tools at gmail dot com @ 2008-03-25 0:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from hjl dot tools at gmail dot com 2008-03-25 00:42 -------
This patch will align DFP to its natural boundary.
Index: gcc/config/i386/i386.c
===================================================================
--- gcc/config/i386/i386.c (revision 1917)
+++ gcc/config/i386/i386.c (working copy)
@@ -4609,7 +4609,8 @@ ix86_function_arg_boundary (enum machine
align = GET_MODE_ALIGNMENT (mode);
if (align < PARM_BOUNDARY)
align = PARM_BOUNDARY;
- if (!TARGET_64BIT)
+ /* Decimal floating point is aligned to its natural boundary. */
+ if (!TARGET_64BIT && !VALID_DFP_MODE_P (mode))
{
/* i386 ABI defines all arguments to be 4 byte aligned. We have to
make an exception for SSE modes since these require 128bit
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35657
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/35657] TDmode isn't aligned at 128bit when passing to a function
2008-03-21 17:43 [Bug target/35657] New: TDmode isn't aligned at 128bit when passing to a function hjl dot tools at gmail dot com
` (2 preceding siblings ...)
2008-03-25 0:42 ` hjl dot tools at gmail dot com
@ 2008-03-27 18:53 ` hjl at gcc dot gnu dot org
2008-03-27 18:57 ` hjl at gcc dot gnu dot org
` (10 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: hjl at gcc dot gnu dot org @ 2008-03-27 18:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from hjl at gcc dot gnu dot org 2008-03-27 18:53 -------
Subject: Bug 35657
Author: hjl
Date: Thu Mar 27 18:52:18 2008
New Revision: 133649
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=133649
Log:
2008-03-27 H.J. Lu <hongjiu.lu@intel.com>
PR target/35657
* config/i386/i386.c (ix86_function_arg_boundary): Align
decimal floating point to its natural boundary.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/i386.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35657
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/35657] TDmode isn't aligned at 128bit when passing to a function
2008-03-21 17:43 [Bug target/35657] New: TDmode isn't aligned at 128bit when passing to a function hjl dot tools at gmail dot com
` (3 preceding siblings ...)
2008-03-27 18:53 ` hjl at gcc dot gnu dot org
@ 2008-03-27 18:57 ` hjl at gcc dot gnu dot org
2008-03-27 19:06 ` hjl dot tools at gmail dot com
` (9 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: hjl at gcc dot gnu dot org @ 2008-03-27 18:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from hjl at gcc dot gnu dot org 2008-03-27 18:56 -------
Subject: Bug 35657
Author: hjl
Date: Thu Mar 27 18:55:36 2008
New Revision: 133651
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=133651
Log:
2008-03-27 H.J. Lu <hongjiu.lu@intel.com>
Backport from mainline:
2008-03-27 H.J. Lu <hongjiu.lu@intel.com>
PR target/35657
* config/i386/i386.c (ix86_function_arg_boundary): Align
decimal floating point to its natural boundary.
Modified:
branches/gcc-4_3-branch/gcc/ChangeLog
branches/gcc-4_3-branch/gcc/config/i386/i386.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35657
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/35657] TDmode isn't aligned at 128bit when passing to a function
2008-03-21 17:43 [Bug target/35657] New: TDmode isn't aligned at 128bit when passing to a function hjl dot tools at gmail dot com
` (4 preceding siblings ...)
2008-03-27 18:57 ` hjl at gcc dot gnu dot org
@ 2008-03-27 19:06 ` hjl dot tools at gmail dot com
2008-04-29 18:07 ` [Bug target/35657] [4.3] " ubizjak at gmail dot com
` (8 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: hjl dot tools at gmail dot com @ 2008-03-27 19:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from hjl dot tools at gmail dot com 2008-03-27 19:05 -------
Fixed.
--
hjl dot tools at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35657
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/35657] [4.3] TDmode isn't aligned at 128bit when passing to a function
2008-03-21 17:43 [Bug target/35657] New: TDmode isn't aligned at 128bit when passing to a function hjl dot tools at gmail dot com
` (6 preceding siblings ...)
2008-04-29 18:07 ` [Bug target/35657] [4.3] " ubizjak at gmail dot com
@ 2008-04-29 18:07 ` ubizjak at gmail dot com
2008-04-29 18:44 ` [Bug target/35657] [4.3] Alignments of DFP types aren't consistent hjl dot tools at gmail dot com
` (6 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: ubizjak at gmail dot com @ 2008-04-29 18:07 UTC (permalink / raw)
To: gcc-bugs
--
ubizjak at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2008-04-29 18:06:55
date| |
Target Milestone|--- |4.3.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35657
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/35657] [4.3] TDmode isn't aligned at 128bit when passing to a function
2008-03-21 17:43 [Bug target/35657] New: TDmode isn't aligned at 128bit when passing to a function hjl dot tools at gmail dot com
` (5 preceding siblings ...)
2008-03-27 19:06 ` hjl dot tools at gmail dot com
@ 2008-04-29 18:07 ` ubizjak at gmail dot com
2008-04-29 18:07 ` ubizjak at gmail dot com
` (7 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: ubizjak at gmail dot com @ 2008-04-29 18:07 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from ubizjak at gmail dot com 2008-04-29 18:06 -------
The alignment of TDmode is not yet decided, see
http://groups.google.com/group/ia32-abi/browse_thread/thread/fc6db344b62dea76
Reopened as P1 bug, blocking 4.3.1 release, as per suggestion in
http://gcc.gnu.org/ml/gcc-patches/2008-04/msg02135.html
--
ubizjak at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |blocker
Status|RESOLVED |UNCONFIRMED
Keywords| |ABI
Priority|P3 |P1
Resolution|FIXED |
Summary|TDmode isn't aligned at |[4.3] TDmode isn't aligned
|128bit when passing to a |at 128bit when passing to a
|function |function
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35657
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/35657] [4.3] Alignments of DFP types aren't consistent
2008-03-21 17:43 [Bug target/35657] New: TDmode isn't aligned at 128bit when passing to a function hjl dot tools at gmail dot com
` (7 preceding siblings ...)
2008-04-29 18:07 ` ubizjak at gmail dot com
@ 2008-04-29 18:44 ` hjl dot tools at gmail dot com
2008-04-30 20:56 ` hjl dot tools at gmail dot com
` (5 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: hjl dot tools at gmail dot com @ 2008-04-29 18:44 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from hjl dot tools at gmail dot com 2008-04-29 18:44 -------
On IA32, all 8 byte types should be aligned at 4 byte and 16byte types
should be aligned at 16 byte. The only discrepancy is alignment of
8byte DFP type, _Decimal64. Gcc aligns it at 8 byte. But we should
treat its alignment like double.
--
hjl dot tools at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[4.3] TDmode isn't aligned |[4.3] Alignments of DFP
|at 128bit when passing to a |types aren't consistent
|function |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35657
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/35657] [4.3] Alignments of DFP types aren't consistent
2008-03-21 17:43 [Bug target/35657] New: TDmode isn't aligned at 128bit when passing to a function hjl dot tools at gmail dot com
` (8 preceding siblings ...)
2008-04-29 18:44 ` [Bug target/35657] [4.3] Alignments of DFP types aren't consistent hjl dot tools at gmail dot com
@ 2008-04-30 20:56 ` hjl dot tools at gmail dot com
2008-05-01 14:15 ` [Bug target/35657] " hjl dot tools at gmail dot com
` (4 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: hjl dot tools at gmail dot com @ 2008-04-30 20:56 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from hjl dot tools at gmail dot com 2008-04-30 20:55 -------
It turns out that __m64 is aligned to 4 byte in the outgoing
parameter block and 8 byte elsewhere. We want _Decimal64 to be
consistent with __m64, not double/long long.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35657
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/35657] Alignments of DFP types aren't consistent
2008-03-21 17:43 [Bug target/35657] New: TDmode isn't aligned at 128bit when passing to a function hjl dot tools at gmail dot com
` (9 preceding siblings ...)
2008-04-30 20:56 ` hjl dot tools at gmail dot com
@ 2008-05-01 14:15 ` hjl dot tools at gmail dot com
2008-05-05 22:50 ` hjl dot tools at gmail dot com
` (3 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: hjl dot tools at gmail dot com @ 2008-05-01 14:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from hjl dot tools at gmail dot com 2008-05-01 14:14 -------
A patch is posted at
http://gcc.gnu.org/ml/gcc-patches/2008-05/msg00035.html
--
hjl dot tools at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |hjl dot tools at gmail dot
|dot org |com
URL| |http://gcc.gnu.org/ml/gcc-
| |patches/2008-
| |05/msg00035.html
Status|NEW |ASSIGNED
Last reconfirmed|2008-04-29 18:06:55 |2008-05-01 14:14:56
date| |
Summary|[4.3] Alignments of DFP |Alignments of DFP types
|types aren't consistent |aren't consistent
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35657
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/35657] Alignments of DFP types aren't consistent
2008-03-21 17:43 [Bug target/35657] New: TDmode isn't aligned at 128bit when passing to a function hjl dot tools at gmail dot com
` (10 preceding siblings ...)
2008-05-01 14:15 ` [Bug target/35657] " hjl dot tools at gmail dot com
@ 2008-05-05 22:50 ` hjl dot tools at gmail dot com
2008-05-06 15:42 ` hjl at gcc dot gnu dot org
` (2 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: hjl dot tools at gmail dot com @ 2008-05-05 22:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from hjl dot tools at gmail dot com 2008-05-05 22:49 -------
An updated patch is posted at
http://gcc.gnu.org/ml/gcc-patches/2008-05/msg00271.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35657
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/35657] Alignments of DFP types aren't consistent
2008-03-21 17:43 [Bug target/35657] New: TDmode isn't aligned at 128bit when passing to a function hjl dot tools at gmail dot com
` (11 preceding siblings ...)
2008-05-05 22:50 ` hjl dot tools at gmail dot com
@ 2008-05-06 15:42 ` hjl at gcc dot gnu dot org
2008-05-08 19:12 ` hjl at gcc dot gnu dot org
2008-05-08 19:13 ` hjl dot tools at gmail dot com
14 siblings, 0 replies; 16+ messages in thread
From: hjl at gcc dot gnu dot org @ 2008-05-06 15:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from hjl at gcc dot gnu dot org 2008-05-06 15:41 -------
Subject: Bug 35657
Author: hjl
Date: Tue May 6 15:41:08 2008
New Revision: 134987
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=134987
Log:
2008-05-06 H.J. Lu <hongjiu.lu@intel.com>
PR target/35657
* config/i386/i386.c (contains_128bit_aligned_vector_p): Renamed
to ...
(contains_aligned_value_p): This. Handle _Decimal128.
(ix86_function_arg_boundary): Only align _Decimal128 to its
natural boundary and handle it properly.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/i386.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35657
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/35657] Alignments of DFP types aren't consistent
2008-03-21 17:43 [Bug target/35657] New: TDmode isn't aligned at 128bit when passing to a function hjl dot tools at gmail dot com
` (12 preceding siblings ...)
2008-05-06 15:42 ` hjl at gcc dot gnu dot org
@ 2008-05-08 19:12 ` hjl at gcc dot gnu dot org
2008-05-08 19:13 ` hjl dot tools at gmail dot com
14 siblings, 0 replies; 16+ messages in thread
From: hjl at gcc dot gnu dot org @ 2008-05-08 19:12 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from hjl at gcc dot gnu dot org 2008-05-08 19:12 -------
Subject: Bug 35657
Author: hjl
Date: Thu May 8 19:11:23 2008
New Revision: 135089
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=135089
Log:
2008-05-08 H.J. Lu <hongjiu.lu@intel.com>
Backport from mainline:
2008-05-06 H.J. Lu <hongjiu.lu@intel.com>
PR target/35657
* config/i386/i386.c (contains_128bit_aligned_vector_p): Renamed
to ...
(contains_aligned_value_p): This. Handle _Decimal128.
(ix86_function_arg_boundary): Only align _Decimal128 to its
natural boundary and handle it properly.
Modified:
branches/gcc-4_3-branch/gcc/ChangeLog
branches/gcc-4_3-branch/gcc/config/i386/i386.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35657
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/35657] Alignments of DFP types aren't consistent
2008-03-21 17:43 [Bug target/35657] New: TDmode isn't aligned at 128bit when passing to a function hjl dot tools at gmail dot com
` (13 preceding siblings ...)
2008-05-08 19:12 ` hjl at gcc dot gnu dot org
@ 2008-05-08 19:13 ` hjl dot tools at gmail dot com
14 siblings, 0 replies; 16+ messages in thread
From: hjl dot tools at gmail dot com @ 2008-05-08 19:13 UTC (permalink / raw)
To: gcc-bugs
------- Comment #14 from hjl dot tools at gmail dot com 2008-05-08 19:12 -------
Fixed.
--
hjl dot tools at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35657
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2008-05-08 19:13 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-21 17:43 [Bug target/35657] New: TDmode isn't aligned at 128bit when passing to a function hjl dot tools at gmail dot com
2008-03-21 20:54 ` [Bug target/35657] " ubizjak at gmail dot com
2008-03-22 0:27 ` hjl dot tools at gmail dot com
2008-03-25 0:42 ` hjl dot tools at gmail dot com
2008-03-27 18:53 ` hjl at gcc dot gnu dot org
2008-03-27 18:57 ` hjl at gcc dot gnu dot org
2008-03-27 19:06 ` hjl dot tools at gmail dot com
2008-04-29 18:07 ` [Bug target/35657] [4.3] " ubizjak at gmail dot com
2008-04-29 18:07 ` ubizjak at gmail dot com
2008-04-29 18:44 ` [Bug target/35657] [4.3] Alignments of DFP types aren't consistent hjl dot tools at gmail dot com
2008-04-30 20:56 ` hjl dot tools at gmail dot com
2008-05-01 14:15 ` [Bug target/35657] " hjl dot tools at gmail dot com
2008-05-05 22:50 ` hjl dot tools at gmail dot com
2008-05-06 15:42 ` hjl at gcc dot gnu dot org
2008-05-08 19:12 ` hjl at gcc dot gnu dot org
2008-05-08 19:13 ` hjl dot tools at gmail dot com
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).