How sltiu instruction compares negative value?

sltiu t1, t0, -6;

Will this instruction compare if t0 < 6 (absolute value) or
will it compare if t0 < 0xfffffffa (ignoring sign) ?

When I tested with freedom studio, it seems the second one which makes sense.

Immediates are always sign extended. The fact that the instruction is an unsigned compare operation doesn’t change that fact.

1 Like