Modes on CONST_INTs

Joern Rennecke amylaar@redhat.com
Mon Nov 27 18:11:00 GMT 2000


> Right.  Also, having the signedness/unsignedness property
> available would find more bugs, as Michael Meissner pointed out.

No, the signedness / unsignedness is solely a property of the operation
that operates on the constant.

Consider:

(set (reg:HI 1) (const_int -1))

(set (cc0) (compare (reg:HI 1) (const_int 0)))

(set (reg:SI 2) (ugt:HI (cc0) (const_int 0)))

(set (cc0) (compare (reg:HI 1) (const_int 0)))

(set (reg:SI 3) (gt:HI (cc0) (const_int 0)))

The constant (const_int -1) has no intrinsic signedness.  It is the
ugt operation that is unsigned and gt that is signed.


More information about the Gcc mailing list