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]

[PATCH, i386]: Fix PR55597, ICE in plus_constant, at explow.c:88


Hello!

On x32, SImode and DImode symbols are accepted as valid. When SImode
symbol is legitimized through legitimize_tls_address, we use Pmode
operations and temporaries (in case of -maddress-mode=long, Pmode
equals to DImode). In case of Pmode == DImode, we forgot to extend the
mode of a sybmol from SImode to DImode, and we set REG_EQUAL to a
symbol in wrong mode.

The patch extends SImode symbols to DImode using ZERO_EXTEND RTX.

2012-12-06  Uros Bizjak  <ubizjak@gmail.com>
	    H.J. Lu  <hongjiu.lu@intel.com>

	PR target/55597
	* config/i386/i386.c (legitimize_tls_address): Zero-extend x to Pmode,
	before using it as insn or call equivalent.

testsuite/ChangeLog:

2012-12-06  Uros Bizjak  <ubizjak@gmail.com>

	PR target/55597
	* gcc.target/i386/pr55597.c: New test.

Patch was bootstrapped and regression tested on x86_64-pc-linux-gnu
{,-m32} and by H.J. on x32. Patch was committed to mainline SVN, and
will be committed to 4.7.

Uros.

Attachment: p.diff.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]