Signed vs. unsigned compares

Paul Koning paulkoning@comcast.net
Fri Jun 17 16:52:10 GMT 2022



> On Jun 17, 2022, at 11:51 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
> 
> On Jun 17 2022, Paul Koning via Gcc wrote:
> 
>> In expanding a longer-than-word compare, I need to do things differently depending on whether a signed vs. unsigned compare is needed.  But it seems the compare operation applies to either.  How can I do this in the target code?
> 
> There are both signed and unsigned comparison operations, eg. GE
> vs. GEU.
> 
> -- 
> Andreas Schwab, schwab@linux-m68k.org

It looks like what I need is to define additional CCmodes, to describe "cc mode valid for unsigned comparison" vs. "cc mode valid for signed comparison".  Right now I don't make that distinction and that reportedly can produce bad code errors.

	paul




More information about the Gcc mailing list