You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is this note correct? I believe the immediate field is sign extended (not zero extended) and then is treated (along with rs1) as an unsigned value for the comparison.
See RISC-V Instruction Set Manual, Volume I: Unprivileged ISA, December 13, 2019. Page 18:
"SLTI (set less than immediate) places the value 1 in register rd if register rs1 is less than the sign extended immediate when both are treated as signed numbers, else 0 is written to rd. SLTIU is
similar but compares the values as unsigned numbers (i.e., the immediate is first sign-extended to
XLEN bits then treated as an unsigned number)."
The text was updated successfully, but these errors were encountered:
Is this note correct? I believe the immediate field is sign extended (not zero extended) and then is treated (along with rs1) as an unsigned value for the comparison.
See RISC-V Instruction Set Manual, Volume I: Unprivileged ISA, December 13, 2019. Page 18:
"SLTI (set less than immediate) places the value 1 in register rd if register rs1 is less than the sign extended immediate when both are treated as signed numbers, else 0 is written to rd. SLTIU is
similar but compares the values as unsigned numbers (i.e., the immediate is first sign-extended to
XLEN bits then treated as an unsigned number)."
The text was updated successfully, but these errors were encountered: