Re: Signed vs. unsigned compares

2022-06-17 Thread Paul Koning via Gcc



> On Jun 17, 2022, at 11:51 AM, Andreas Schwab  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, sch...@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




Re: Signed vs. unsigned compares

2022-06-17 Thread Andreas Schwab
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, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Signed vs. unsigned compares

2022-06-17 Thread Paul Koning via Gcc
Question for target code:

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?

paul