Analysis of high priority PR c/2454

Jeff Law law@porcupine.slc.redhat.com
Tue Jul 2 11:40:00 GMT 2002


In message <200207021650.JAA10568@atrus.synopsys.com>, Joe Buck writes:
 >>  >But back to the RTL "combination" above.  The true problem (take 3)
 >>  >is with the other operand of the instruction.  "(reg:SI 48)" which
 >>  >should have the value 255, has been replaced with the value -1.
 >>  >How did that happen?
 >
 >Jeff Law writes:
 >> This is why I (*%@#$ hate paradoxical subregs.  Their semantics aren't
 >> clear and they must one day die.
 >
 >A rather ignorant proposal from someone who never really understood
 >the subreg stuff very well:
 >
 >It seems that there are three possible semantics: the extra bits are
 >either don't care (or unknown),
Note, there's a difference between "don't care" and "unknown".  

"Don't care" means you can assume any convenient value because you have
no interest in what those bits actually contain.

"Unknown" means you don't know what the bits are and thus you can make
no assumptions about their value.

Also note that "Don't care" is only valid in certain contexts (arithmetic,
logicals, but not comparisons).

 > sign-extended, or zero-extended.  What if
 >these three cases were made explicit (by, say, adding an attribute)?
Or better yet by having the instructions actually include the sign/zero
extension.  Right now we omit them merely for the convenience of not
having to update the various ports.  I believe the 5169 thread talks
about this in some detail as well.

jeff



More information about the Gcc mailing list