Trying to work around a 16-bit x86 weirdness

Bernd Jendrissek berndfoobar@users.sourceforge.net
Tue Oct 21 08:35:00 GMT 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mon, Oct 20, 2003 at 05:50:37PM -0700, Richard Henderson wrote:
> On Mon, Oct 20, 2003 at 10:44:55AM +0200, Bernd Jendrissek wrote:
> > (insn 23 8 24 0 (set (reg:HI bx [25])
> >         (const_int 42000 [0xa410])) -1 (nil)
> 
> This is not a valid HImode constant.  Integer constants are
> sign extended to HOST_WIDE_INT, regardless of the signedness
> of the target type.

Ooh, thanks, now it gets interesting.  You're saying that any CONST_INT
greater than 32767 is not a valid HImode?

So why *is* GCC generating what appears to me to be a movhi with an
invalid operand for the mode?  How do I tell GCC to emit

(set (reg:HI bx) (const_int -23536)) instead?

bernd
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE/lNPh/FmLrNfLpjMRAh9UAKCKB2rm8tUsghFFaMwgezk1FUp2nQCgoQW1
4wQif0Ren/JkIoZdho2WvvQ=
=VOYb
-----END PGP SIGNATURE-----



More information about the Gcc mailing list