neg
Pseudo-op
- Extension
- RV32I/RV64I base integer
- XLEN
- RV32 and RV64
- Operand fields
rs2,rd- Length
- 32-bit
Encoding
listed in riscv-opcodes as a pseudo-op of sub
| 3125 | 2420 | 1915 | 1412 | 117 | 62 | 10 | |||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0100000 | rs2 | 00000 | 000 | rd | 01100 | 11 | |||||||||||||||||||||||||
Match 0x40000033, mask 0xfe0ff07f. Source: $pseudo_op rv_i::sub neg rd rs2 31..25=32 19..15=0x0 14..12=0 6..2=0x0C 1..0=3 in riscv-opcodes/extensions/rv_i.
| Field | Bits | riscv-opcodes name |
|---|---|---|
| rs2 | 24:20 | rs2 |
| rd | 11:7 | rd |
Description
Encoding only. riscv-opcodes lists neg as a pseudo-op of sub: the same encoding as sub with the fixed fields shown above.
Specification and related pages
- The RISC-V Instruction Set Manual: src/unpriv/rv32.adoc (RV32I/RV64I base integer)
- RV32I/RV64I base integer instruction listing