fix(loong64): FP immediates through R30 and unsigned branch forms
Assisted-by: GLM 5.3
This commit is contained in:
@@ -199,7 +199,9 @@ func l64rrrr(op uint32, r1, r2, r3, r4 int) uint32 {
|
||||
}
|
||||
|
||||
// l64irir encodes a BSTRINS/BSTRPICK instruction: op | msb<<16 | rj<<5 | lsb<<10 | rd.
|
||||
// The msb/lsb fields are 6 bits wide (0-63) and are validated by the caller.
|
||||
// The msb/lsb fields are 6 bits wide and are inserted unmasked: the caller
|
||||
// must have validated them (0..31 for the .w forms, 0..63 for the .d forms,
|
||||
// lsb <= msb), the same rule the toolchain enforces as "illegal bit number".
|
||||
func l64irir(op uint32, msb, rj, lsb, rd int) uint32 {
|
||||
return op | uint32(msb)<<16 | uint32(rj&0x1f)<<5 | uint32(lsb)<<10 | uint32(rd&0x1f)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user