[Bug target/56564] movdqa on possibly-8-byte-aligned struct with -O3
gcc at thomasgereke dot de
gcc-bugzilla@gcc.gnu.org
Thu Jul 13 21:43:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56564
Thomas Gereke <gcc at thomasgereke dot de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |gcc at thomasgereke dot de
--- Comment #22 from Thomas Gereke <gcc at thomasgereke dot de> ---
Seems the bug does still exist in 6.3.0 20170516 (Debian 6.3.0-18). I get a GP
on
>x0x55555574d8c8 <...[abi:cxx11]() const+264> movdqa 0x68(%rsp),%xmm0
x0x55555574d8ce <...[abi:cxx11]() const+270> lea 0x80(%rsp),%r13
x0x55555574d8d6 <...[abi:cxx11]() const+278> movq $0x0,0x50(%rsp)
x0x55555574d8df <...[abi:cxx11]() const+287> movl $0x0,0x10(%rsp)
x0x55555574d8e7 <...[abi:cxx11]() const+295> movaps %xmm0,(%rsp)
x0x55555574d8eb <...[abi:cxx11]() const+299> movq $0x0,0x6(%rsp)
x0x55555574d8f4 <...[abi:cxx11]() const+308> movw $0x0,0xe(%rsp)
x0x55555574d8fb <...[abi:cxx11]() const+315> movdqa (%rsp),%xmm1
x0x55555574d900 <...[abi:cxx11]() const+320> movaps %xmm1,0x40(%rsp)
The asm code is obviously wrong, because movdqa 0x68(%rsp),%xmm0 followed by
movdqa (%rsp),%xmm1 without changes to %rsp has to fail. %rsp was
0x7fffecd477d0.
Code was C++ compiled with -O3 and x86_64. The underlying data structure is
boost::asio::ip::address, which consists of an enum (4 bytes), address_v4 (4
bytes) and address_v6 (16 bytes). The GP occurs when accessing the ipv6
address.
More information about the Gcc-bugs
mailing list