max

Returns the larger of two signed integers. .Software Hint [NOTE] Calculating the absolute value of a signed integer can be performed using the following sequence: `neg rD,rS` followed by `max rD,rS,rD. When using this common sequence, it is suggested that they are scheduled with no intervening instructions so that implementations that are so optimized can fuse them together.

Synopsis

max xd, xs1, xs2

Encoding

Type: R

0671112141519202425310110011xd110xs1xs20000101
funct7: 0000101
funct3: 110
opcode: 0110011

RISC-V Instruction Encoder/Decoder

open max in rvcodecjs

Availability