- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for EncodeJImmediate (0.14 sec)
-
src/cmd/internal/obj/riscv/obj.go
enc := encode(ins.as) if enc == nil { panic("encodeU: could not encode instruction") } return imm<<12 | rd<<7 | enc.opcode } // encodeJImmediate encodes an immediate for a J-type RISC-V instruction. func encodeJImmediate(imm uint32) uint32 { return (imm>>20)<<31 | ((imm>>1)&0x3ff)<<21 | ((imm>>11)&0x1)<<20 | ((imm>>12)&0xff)<<12 } // encodeJ encodes a J-type RISC-V instruction.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sun Apr 07 03:32:27 UTC 2024 - 77K bytes - Viewed (0) -
src/cmd/link/internal/riscv64/asm.go
return val, 0, false } off := ldr.SymValue(rs) + r.Add() - pc switch r.Type() { case objabi.R_RISCV_JAL, objabi.R_RISCV_JAL_TRAMP: // Generate instruction immediates. imm, err := riscv.EncodeJImmediate(off) if err != nil { ldr.Errorf(s, "cannot encode J-type instruction relocation offset for %s: %v", ldr.SymName(rs), err) } immMask := int64(riscv.JTypeImmMask) val = (val &^ immMask) | int64(imm)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 01 08:06:08 UTC 2024 - 22.8K bytes - Viewed (0)