This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Attached patch fixes ~50 dfp failures [1] when -msse is used. There were actually two errors:
is not simplified to (const_double:TI ...). On 32bit hosts with 32bit HWI (on 64 bit host, it is OK). The problem is, that CONSTANT_P does not trigger on subreg, immediate is not pushed to memory and invalid RTL is produced.
Since DFP operates through integer moves, it finds (valid) TImode for move of _Decimal128 value when -msse is in effect. Unforunatelly, when TImode value is pushed to stack due to _Decimal128 argument passing convention, this move can result in unaligned move to the stack.
Since middle-end wants TImode so desperatelly, we can still implement 128bit moves via XMM registers. However, when unaligned access is detected, x86_expand_vector_move_misalign() function is called which takes care of unaligned memory operands. This approach fixes ALL DFP failures from the testsuite for -msse.
There is one (unrelated?) problem in the testsuite. Compiling gcc.target/i386/sse-13.c results in something which looks like garbage collector problem:
_mm_cvtpd_pi32 _mm_cvtpd_epi32 _mm_cvtepi32_ps _mm_cvtepi32_pd _mm_movepi64_pi64 _mm_move_epi64 Program received signal SIGSEGV, Segmentation fault. memory_operand (op=0xabababab, mode=VOIDmode) at ../../gcc-svn/trunk/gcc/recog.c:1357 /home/uros/gcc-svn/trunk/gcc/recog.c:1357:37932:beg:0x8299238 (gdb)
PR target/32065 * target/i386/i386.c (ix86_expand_vector_move): Force SUBREGs of constants into memory. Expand unaligned memory references for SSE modes via x86_expand_vector_move_misalign() function.
PR target/32065 * gcc.target/i386/pr32065.c: New test.
Attachment:
pr32065.diff
Description: Binary data
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |