Is this (gasp) a chip bug?

Larry Jones scjones at thor.UUCP
Wed Aug 1 00:28:27 AEST 1990


In article <463 at hitachi.uucp>, jon at hitachi.uucp (Jon Ryshpan) writes:
> This code is wrong since there is no cast from unsigned to int.  It's
> not possible to fix this by using an unsigned rather than a signed
> branch, since this would just substitute one range of values which
> produce an incorrect branch for another.

The 386 does, however, have branch instrctions which just test the
sign bit (js and jns in Intel mnemonics) which do exactly the right
thing in this case.  Now, if the compiler could just be persuaded
to generate the darn things...
----
Larry Jones                         UUCP: uunet!sdrc!thor!scjones
SDRC                                      scjones at thor.UUCP
2000 Eastman Dr.                    BIX:  ltl
Milford, OH  45150-2789             AT&T: (513) 576-2070
"This probably just goes to show something, but I sure don't know what."
-Calvin



More information about the Comp.unix.i386 mailing list