[Bug target/60204] struct with __m512i is mishandled in function parameter passing and return

2014-02-20 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60204

Uroš Bizjak ubizjak at gmail dot com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
URL||http://gcc.gnu.org/ml/gcc-p
   ||atches/2014-02/msg01147.htm
   ||l
 Resolution|--- |FIXED

--- Comment #7 from Uroš Bizjak ubizjak at gmail dot com ---
Fixed.

[Bug target/60204] struct with __m512i is mishandled in function parameter passing and return

2014-02-19 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60204

Uroš Bizjak ubizjak at gmail dot com changed:

   What|Removed |Added

 CC||ubizjak at gmail dot com
   Target Milestone|--- |4.9.0
   Severity|normal  |major

--- Comment #3 from Uroš Bizjak ubizjak at gmail dot com ---
(In reply to H.J. Lu from comment #2)

 It is a bug in psABI.  It should read as eight \eightbytes.

So, let's fix the psABI first and then fix gcc.

This PR should be resolved before 4.9 is released.

[Bug target/60204] struct with __m512i is mishandled in function parameter passing and return

2014-02-19 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60204

--- Comment #4 from Uroš Bizjak ubizjak at gmail dot com ---
(In reply to Uroš Bizjak from comment #3)

 So, let's fix the psABI first and then fix gcc.

psABI is fixed in [1].

[1]
https://github.com/hjl-tools/x86-64-psABI/commit/6d7ccd614fe67111d2aecec853c3df0310b372d2

[Bug target/60204] struct with __m512i is mishandled in function parameter passing and return

2014-02-19 Thread tocarip.intel at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60204

--- Comment #5 from tocarip.intel at gmail dot com ---
Created attachment 32169
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=32169action=edit
Proposed patch.

Currently testing attached patch.


[Bug target/60204] struct with __m512i is mishandled in function parameter passing and return

2014-02-19 Thread kyukhin at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60204

--- Comment #6 from Kirill Yukhin kyukhin at gcc dot gnu.org ---
Author: kyukhin
Date: Thu Feb 20 06:32:21 2014
New Revision: 207933

URL: http://gcc.gnu.org/viewcvs?rev=207933root=gccview=rev
Log:
gcc/
PR target/60204
* config/i386/i386.c (classify_argument): Pass structures of size
64 bytes or less in register.

tessuite/gcc/
PR target/60204
* gcc.target/x86_64/abi/avx512f/test_passing_structs.c: Update to
reflect abi fix.
* gcc.target/x86_64/abi/avx512f/test_passing_unions.c: Ditto.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/i386.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.target/x86_64/abi/avx512f/test_passing_structs.c
trunk/gcc/testsuite/gcc.target/x86_64/abi/avx512f/test_passing_unions.c


[Bug target/60204] struct with __m512i is mishandled in function parameter passing and return

2014-02-18 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60204

H.J. Lu hjl.tools at gmail dot com changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-02-18
 Ever confirmed|0   |1

--- Comment #2 from H.J. Lu hjl.tools at gmail dot com ---
(In reply to tocarip.intel from comment #1)
 From 
 https://github.com/hjl-tools/x86-64-psABI/blob/hjl/avx512/low-level-sys-info.
 tex  
 \item If the size of an object is larger than four \eightbytes, or
   it contains unaligned fields, it has class MEMORY
 
 struct m512i has size of 64 bytes, which is larger than 8*4=32, so it has
 class MEMORY and passed on the stack.
 
 It looks like everything is according to ABI.

It is a bug in psABI.  It should read as eight \eightbytes.