蘭雅sRGB 个人笔记 https://262235.xyz
提供编程和电脑应用视频教程,工具和源代码
C, C++, Python Programming, Source Code, Video

旧Hexo博客 | Github | IP定位WebAPI | Docker Hub
编程中文文档 | 网盘分享 | 中文Linux命令

RARS 汇编模拟器支持的RISC-V指令

Supported Instructions (支持的指令)

Example Usage中文描述Description
add t1,t2,t3加法:设 t1 为(t2 加 t3)Addition: set t1 to (t2 plus t3)
addi t1,t2,-100加法立即数:将 t1 设置为(t2 加上带符号的 12 位立即数)Addition immediate: set t1 to (t2 plus signed 12-bit immediate)
and t1,t2,t3按位与:将 t1 设置为 t2 和 t3 的按位与Bitwise AND : Set t1 to bitwise AND of t2 and t3
andi t1,t2,-100按位与立即数:将 t1 设置为 t2 的按位与和符号扩展的 12 位立即数Bitwise AND immediate : Set t1 to bitwise AND of t2 and sign-extended 12-bit immediate
auipc t1,10000将高位立即数添加到 pc:将 t1 设置为(pc 加上高位 20 位立即数)Add upper immediate to pc: set t1 to (pc plus an upper 20-bit immediate)
beq t1,t2,labelBranch if equal : 如果 t1 和 t2 相等则分支到标签地址处的语句Branch if equal : Branch to statement at label's address if t1 and t2 are equal
bge t1,t2,labelBranch if greater than or equal:如果 t1 大于或等于 t2,则分支到标签地址处的语句Branch if greater than or equal: Branch to statement at label's address if t1 is greater than or equal to t2
bgeu t1,t2,labelBranch if greater than or equal to (unsigned):如果 t1 大于或等于 t2,则分支到标签地址处的语句(无符号解释)Branch if greater than or equal to (unsigned): Branch to statement at label's address if t1 is greater than or equal to t2 (with an unsigned interpretation)
blt t1,t2,labelBranch if less than:如果 t1 小于 t2,则分支到标签地址处的语句Branch if less than: Branch to statement at label's address if t1 is less than t2
bltu t1,t2,labelBranch if less than (unsigned):如果 t1 小于 t2,则分支到标签地址处的语句(无符号解释)Branch if less than (unsigned): Branch to statement at label's address if t1 is less than t2 (with an unsigned interpretation)
bne t1,t2,labelBranch if not equal : 如果 t1 和 t2 不相等则分支到标签地址处的语句Branch if not equal : Branch to statement at label's address if t1 and t2 are not equal
csrrc t0, fcsr, t1原子读取/清除 CSR:从 CSR 读取到 t0 并根据 t1 清除 CSR 的位Atomic Read/Clear CSR: read from the CSR into t0 and clear bits of the CSR according to t1
csrrci t0, fcsr, 10立即原子读取/清除 CSR:从 CSR 读取到 t0 并根据常量清除 CSR 的位Atomic Read/Clear CSR Immediate: read from the CSR into t0 and clear bits of the CSR according to a constant
csrrs t0, fcsr, t1原子读取/设置 CSR:从 CSR 读取到 t0 并将逻辑或 t1 读取到 CSRAtomic Read/Set CSR: read from the CSR into t0 and logical or t1 into the CSR
csrrsi t0, fcsr, 10立即原子读取/设置 CSR:从 CSR 读取到 t0 并将逻辑或常量读取到 CSRAtomic Read/Set CSR Immediate: read from the CSR into t0 and logical or a constant into the CSR
csrrw t0, fcsr, t1原子读/写 CSR:从 CSR 读入 t0 并将 t1 写入 CSRAtomic Read/Write CSR: read from the CSR into t0 and write t1 into the CSR
csrrwi t0, fcsr, 10原子读/写 CSR 立即:从 CSR 读取到 t0 并将常量写入 CSRAtomic Read/Write CSR Immediate: read from the CSR into t0 and write a constant into the CSR
div t1,t2,t3除法:将 t1 设置为 t2/t3 的结果Division: set t1 to the result of t2/t3
divu t1,t2,t3除法:使用无符号除法将 t1 设置为 t2/t3 的结果Division: set t1 to the result of t2/t3 using unsigned division
ebreak暂停执行Pause execution
ecall发出系统调用:执行a7中值指定的系统调用Issue a system call : Execute the system call specified by value in a7
fadd.d f1, f2, f3, dyn浮动 ADD(64 位):将 f1 分配给 f2 + f3Floating ADD (64 bit): assigns f1 to f2 + f3
fadd.s f1, f2, f3, dyn浮动 ADD:将 f1 分配给 f2 + f3Floating ADD: assigns f1 to f2 + f3
fclass.d t1, f1对一个浮点数(64位)进行分类Classify a floating point number (64 bit)
fclass.s t1, f1对一个浮点数进行分类Classify a floating point number
fcvt.d.s t1, f1, dyn将 float 转换为 double:将 f2 的值分配给 f1Convert a float to a double: Assigned the value of f2 to f1
fcvt.d.w f1, t1, dyn从整数转换为双精度:将 t1 的值赋给 f1Convert double from integer: Assigns the value of t1 to f1
fcvt.d.wu f1, t1, dyn从无符号整数转换双精度数:将 t1 的值赋给 f1Convert double from unsigned integer: Assigns the value of t1 to f1
fcvt.s.d t1, f1, dyn将双精度型转换为浮点型:将 f2 的值分配给 f1Convert a double to a float: Assigned the value of f2 to f1
fcvt.s.w f1, t1, dyn从整数转换为浮点数:将 t1 的值赋给 f1Convert float from integer: Assigns the value of t1 to f1
fcvt.s.wu f1, t1, dyn从无符号整数转换浮点数:将 t1 的值赋给 f1Convert float from unsigned integer: Assigns the value of t1 to f1
fcvt.w.d t1, f1, dyn从双精度转换整数:将 f1 的值(四舍五入)分配给 t1Convert integer from double: Assigns the value of f1 (rounded) to t1
fcvt.w.s t1, f1, dyn从浮点数转换整数:将 f1 的值(四舍五入)赋值给 t1Convert integer from float: Assigns the value of f1 (rounded) to t1
fcvt.wu.d t1, f1, dyn从 double 转换未签名的整数:将 f1 的值(四舍五入)分配给 t1Convert unsinged integer from double: Assigns the value of f1 (rounded) to t1
fcvt.wu.s t1, f1, dyn将浮点数转换为无符号整数:将 f1 的值(四舍五入)赋值给 t1Convert unsinged integer from float: Assigns the value of f1 (rounded) to t1
fdiv.d f1, f2, f3, dyn浮动 DIVide(64 位):将 f1 分配给 f2 / f3Floating DIVide (64 bit): assigns f1 to f2 / f3
fdiv.s f1, f2, f3, dyn浮动 DIVide:将 f1 分配给 f2 / f3Floating DIVide: assigns f1 to f2 / f3
fence 1, 1确保围栏之前的 IO 和内存访问发生在不同线程查看的以下 IO 和内存访问之前Ensure that IO and memory accesses before the fence happen before the following IO and memory accesses as viewed by a different thread
fence.i确保指令存储器的存储对指令提取可见Ensure that stores to instruction memory are visible to instruction fetches
feq.d t1, f1, f2Floating EQuals(64 位):如果 f1 = f2,则将 t1 设置为 1,否则将 t1 设置为 0Floating EQuals (64 bit): if f1 = f2, set t1 to 1, else set t1 to 0
feq.s t1, f1, f2浮动相等:如果 f1 = f2,则将 t1 设置为 1,否则将 t1 设置为 0Floating EQuals: if f1 = f2, set t1 to 1, else set t1 to 0
fld f1, -100(t1)从内存中加载一个 doubleLoad a double from memory
fle.d t1, f1, f2小于或等于浮动(64 位):如果 f1 <= f2,则将 t1 设置为 1,否则将 t1 设置为 0Floating Less than or Equals (64 bit): if f1 <= f2, set t1 to 1, else set t1 to 0
fle.s t1, f1, f2浮动小于或等于:如果 f1 <= f2,则将 t1 设置为 1,否则将 t1 设置为 0Floating Less than or Equals: if f1 <= f2, set t1 to 1, else set t1 to 0
flt.d t1, f1, f2小于浮动(64 位):如果 f1 < f2,则将 t1 设置为 1,否则将 t1 设置为 0Floating Less Than (64 bit): if f1 < f2, set t1 to 1, else set t1 to 0
flt.s t1, f1, f2浮动小于:如果 f1 < f2,则将 t1 设置为 1,否则将 t1 设置为 0Floating Less Than: if f1 < f2, set t1 to 1, else set t1 to 0
flw f1, -100(t1)从内存中加载一个浮点数Load a float from memory
fmadd.d f1, f2, f3, f4, dyn融合乘加(64 位):将 f2*f3+f4 分配给 f1Fused Multiply Add (64 bit): Assigns f2*f3+f4 to f1
fmadd.s f1, f2, f3, f4, dyn融合乘加:将 f2*f3+f4 分配给 f1Fused Multiply Add: Assigns f2*f3+f4 to f1
fmax.d f1, f2, f3Floating MAXimum(64 位):将 f1 分配给 f1 和 f3 中的较大者Floating MAXimum (64 bit): assigns f1 to the larger of f1 and f3
fmax.s f1, f2, f3Floating MAXimum:将 f1 分配给 f1 和 f3 中的较大者Floating MAXimum: assigns f1 to the larger of f1 and f3
fmin.d f1, f2, f3Floating MINimum(64 位):将 f1 分配给 f1 和 f3 中的较小者Floating MINimum (64 bit): assigns f1 to the smaller of f1 and f3
fmin.s f1, f2, f3Floating MINimum:将 f1 分配给 f1 和 f3 中较小的一个Floating MINimum: assigns f1 to the smaller of f1 and f3
fmsub.d f1, f2, f3, f4, dyn融合乘子:将 f2*f3-f4 分配给 f1Fused Multiply Subatract: Assigns f2*f3-f4 to f1
fmsub.s f1, f2, f3, f4, dyn融合乘子:将 f2*f3-f4 分配给 f1Fused Multiply Subatract: Assigns f2*f3-f4 to f1
fmul.d f1, f2, f3, dynFloating MULtiply(64 位):将 f1 分配给 f2 * f3Floating MULtiply (64 bit): assigns f1 to f2 * f3
fmul.s f1, f2, f3, dynFloating MULtiply:将 f1 分配给 f2 * f3Floating MULtiply: assigns f1 to f2 * f3
fmv.s.x f1, t1移动浮点数:从整数寄存器中移动表示浮点数的位Move float: move bits representing a float from an integer register
fmv.x.s t1, f1移动浮点数:将表示浮点数的位移动到整数寄存器Move float: move bits representing a float to an integer register
fnmadd.d f1, f2, f3, f4, dynFused Negate Multiply Add(64 位):将 -(f2*f3+f4) 分配给 f1Fused Negate Multiply Add (64 bit): Assigns -(f2*f3+f4) to f1
fnmadd.s f1, f2, f3, f4, dynFused Negate Multiply Add:将 -(f2*f3+f4) 分配给 f1Fused Negate Multiply Add: Assigns -(f2*f3+f4) to f1
fnmsub.d f1, f2, f3, f4, dyn融合取反乘法减法:将 -(f2*f3-f4) 赋值给 f1Fused Negated Multiply Subatract: Assigns -(f2*f3-f4) to f1
fnmsub.s f1, f2, f3, f4, dyn融合取反乘法减法:将 -(f2*f3-f4) 赋值给 f1Fused Negated Multiply Subatract: Assigns -(f2*f3-f4) to f1
fsd f1, -100(t1)将双精度存储到内存Store a double to memory
fsgnj.d f1, f2, f3浮点符号注入(64位):将f2的符号位替换为f3的符号位赋值给f1Floating point sign injection (64 bit): replace the sign bit of f2 with the sign bit of f3 and assign it to f1
fsgnj.s f1, f2, f3浮点符号注入:将f2的符号位替换为f3的符号位赋值给f1Floating point sign injection: replace the sign bit of f2 with the sign bit of f3 and assign it to f1
fsgnjn.d f1, f2, f3浮点符号注入(反转64位):将f2的符号位替换为f3的相反符号位赋值给f1Floating point sign injection (inverted 64 bit): replace the sign bit of f2 with the opposite of sign bit of f3 and assign it to f1
fsgnjn.s f1, f2, f3浮点符号注入(倒置):将f2的符号位替换为f3的相反符号位赋值给f1Floating point sign injection (inverted): replace the sign bit of f2 with the opposite of sign bit of f3 and assign it to f1
fsgnjx.d f1, f2, f3浮点符号注入(xor 64 bit):将f2的符号位与f3的符号位异或赋值给f1Floating point sign injection (xor 64 bit): xor the sign bit of f2 with the sign bit of f3 and assign it to f1
fsgnjx.s f1, f2, f3浮点符号注入(xor):将f2的符号位与f3的符号位异或赋值给f1Floating point sign injection (xor): xor the sign bit of f2 with the sign bit of f3 and assign it to f1
fsqrt.d f1, f2, dyn浮动平方根(64 位):将 f1 分配给 f2 的平方根Floating SQuare RooT (64 bit): Assigns f1 to the square root of f2
fsqrt.s f1, f2, dyn浮动平方根:将 f1 分配给 f2 的平方根Floating SQuare RooT: Assigns f1 to the square root of f2
fsub.d f1, f2, f3, dyn浮动减法(64 位):将 f1 分配给 f2 - f3Floating SUBtract (64 bit): assigns f1 to f2 - f3
fsub.s f1, f2, f3, dyn浮动减法:将 f1 分配给 f2 - f3Floating SUBtract: assigns f1 to f2 - f3
fsw f1, -100(t1)将浮点数存储到内存中Store a float to memory
jal t1, target跳转和链接:将 t1 设置为程序计数器(返回地址),然后跳转到目标地址处的语句Jump and link : Set t1 to Program Counter (return address) then jump to statement at target address
jalr t1, t2, -100跳转和链接寄存器:将 t1 设置为程序计数器(返回地址),然后跳转到 t2 + 立即数处的语句Jump and link register: Set t1 to Program Counter (return address) then jump to statement at t2 + immediate
lb t1, -100(t2)将 t1 设置为有效内存字节地址的符号扩展 8 位值Set t1 to sign-extended 8-bit value from effective memory byte address
lbu t1, -100(t2)将 t1 设置为从有效内存字节地址开始的零扩展 8 位值Set t1 to zero-extended 8-bit value from effective memory byte address
lh t1, -100(t2)将 t1 设置为有效内存半字地址的符号扩展 16 位值Set t1 to sign-extended 16-bit value from effective memory halfword address
lhu t1, -100(t2)将 t1 设置为有效内存半字地址的零扩展 16 位值Set t1 to zero-extended 16-bit value from effective memory halfword address
lui t1,10000加载高立即数:将 t1 设置为 20 位后跟 12 个 0Load upper immediate: set t1 to 20-bit followed by 12 0s
lw t1, -100(t2)将 t1 设置为有效内存字地址的内容Set t1 to contents of effective memory word address
mul t1,t2,t3乘法:将t1设为t2*t3的低32位Multiplication: set t1 to the lower 32 bits of t2*t3
mulh t1,t2,t3乘法:使用有符号乘法将 t1 设置为 t2*t3 的高 32 位Multiplication: set t1 to the upper 32 bits of t2*t3 using signed multiplication
mulhsu t1,t2,t3乘法:将 t1 设置为 t2*t3 的高 32 位,其中 t2 是有符号的,t3 是无符号的Multiplication: set t1 to the upper 32 bits of t2*t3 where t2 is signed and t3 is unsigned
mulhu t1,t2,t3乘法:使用无符号乘法将 t1 设置为 t2*t3 的高 32 位Multiplication: set t1 to the upper 32 bits of t2*t3 using unsigned multiplication
or t1,t2,t3按位或:将 t1 设置为 t2 和 t3 的按位或Bitwise OR : Set t1 to bitwise OR of t2 and t3
ori t1,t2,-100按位或立即数:将 t1 设置为 t2 和符号扩展的 12 位立即数的按位或Bitwise OR immediate : Set t1 to bitwise OR of t2 and sign-extended 12-bit immediate
rem t1,t2,t3余数:将 t1 设置为 t2/t3 的余数Remainder: set t1 to the remainder of t2/t3
remu t1,t2,t3余数:使用无符号除法将 t1 设置为 t2/t3 的余数Remainder: set t1 to the remainder of t2/t3 using unsigned division
sb t1, -100(t2)Store byte : 将t1的低8位存入有效内存字节地址Store byte : Store the low-order 8 bits of t1 into the effective memory byte address
sh t1, -100(t2)Store halfword : 将t1的低16位存入有效内存半字地址Store halfword : Store the low-order 16 bits of t1 into the effective memory halfword address
sll t1,t2,t3左移逻辑:将 t1 设置为将 t2 左移 t3 的低 5 位中的值指定的位数的结果Shift left logical: Set t1 to result of shifting t2 left by number of bits specified by value in low-order 5 bits of t3
slli t1,t2,10左移逻辑:将 t1 设置为将 t2 左移 immediate 指定的位数的结果Shift left logical : Set t1 to result of shifting t2 left by number of bits specified by immediate
slt t1,t2,t3设置小于:如果 t2 小于 t3,则将 t1 设置为 1,否则将 t1 设置为 0Set less than : If t2 is less than t3, then set t1 to 1 else set t1 to 0
slti t1,t2,-100设置小于立即数:如果 t2 小于符号扩展的 12 位立即数,则将 t1 设置为 1,否则将 t1 设置为 0Set less than immediate : If t2 is less than sign-extended 12-bit immediate, then set t1 to 1 else set t1 to 0
sltiu t1,t2,-100设置小于无符号立即数:如果 t2 小于使用无符号比较进行符号扩展的 16 位立即数,则将 t1 设置为 1,否则将 t1 设置为 0Set less than immediate unsigned : If t2 is less than sign-extended 16-bit immediate using unsigned comparison, then set t1 to 1 else set t1 to 0
sltu t1,t2,t3设置小于:如果使用无符号比较 t2 小于 t3,则将 t1 设置为 1,否则将 t1 设置为 0Set less than : If t2 is less than t3 using unsigned comparision, then set t1 to 1 else set t1 to 0
sra t1,t2,t3右移算法:将 t1 设置为将 t2 符号扩展右移的结果,其位数由 t3 的低 5 位中的值指定Shift right arithmetic: Set t1 to result of sign-extended shifting t2 right by number of bits specified by value in low-order 5 bits of t3
srai t1,t2,10右移算术:将 t1 设置为将 t2 符号扩展右移立即数指定的位数的结果Shift right arithmetic : Set t1 to result of sign-extended shifting t2 right by number of bits specified by immediate
srl t1,t2,t3右移逻辑:将 t1 设置为将 t2 右移 t3 的低 5 位中的值指定的位数的结果Shift right logical: Set t1 to result of shifting t2 right by number of bits specified by value in low-order 5 bits of t3
srli t1,t2,10右移逻辑:将 t1 设置为将 t2 右移 immediate 指定的位数的结果Shift right logical : Set t1 to result of shifting t2 right by number of bits specified by immediate
sub t1,t2,t3减法:将 t1 设置为(t2 减去 t3)Subtraction: set t1 to (t2 minus t3)
sw t1, -100(t2)Store word:将t1的内容存入有效内存字地址Store word : Store contents of t1 into effective memory word address
uret从处理中断或异常返回(到 uepc)Return from handling an interrupt or exception (to uepc)
wfi等待中断Wait for Interrupt
xor t1,t2,t3按位异或:将 t1 设置为 t2 和 t3 的按位异或Bitwise XOR : Set t1 to bitwise XOR of t2 and t3
xori t1,t2,-100按位异或立即数:将 t1 设置为 t2 和符号扩展的 12 位立即数的按位异或Bitwise XOR immediate : Set t1 to bitwise XOR of t2 and sign-extended 12-bit immediate

Supported psuedo-instructions (支持的伪指令)

Example Usage中文描述Description
addi t1,t2,%lo(label)Load Lower Address : 设置 t1 到 t2 + 低 12 位标签地址Load Lower Address : Set t1 to t2 + lower 12-bit label's address
b labelBranch : 无条件分支到标签处的语句Branch : Branch to statement at label unconditionally
beqz t1,labelBranch if EQual Zero :如果 t1 == 0 则分支到标签处的语句Branch if EQual Zero : Branch to statement at label if t1 == 0
bgez t1,labelBranch if Greater than or Equal to Zero :如果 t1 >= 0,则分支到标签处的语句Branch if Greater than or Equal to Zero : Branch to statement at label if t1 >= 0
bgt t1,t2,labelBranch if Greater Than :如果 t1 > t2 则分支到标签处的语句Branch if Greater Than : Branch to statement at label if t1 > t2
bgtu t1,t2,labelBranch if Greater Than Unsigned:如果 t1 > t2(无符号比较)则分支到标签处的语句Branch if Greater Than Unsigned: Branch to statement at label if t1 > t2 (unsigned compare)
bgtz t1,labelBranch if Greater Than:如果 t1 > 0,则分支到标签处的语句Branch if Greater Than: Branch to statement at label if t1 > 0
ble t1,t2,labelBranch if Less or Equal :如果 t1 <= t2 则分支到标签处的语句Branch if Less or Equal : Branch to statement at label if t1 <= t2
bleu t1,t2,labelBranch if Less or Equal Unsigned:如果 t1 <= t2(无符号比较),则分支到标签处的语句Branch if Less or Equal Unsigned : Branch to statement at label if t1 <= t2 (unsigned compare)
blez t1,labelBranch if Less than or Equal to Zero:如果 t1 <= 0,则分支到标签处的语句Branch if Less than or Equal to Zero : Branch to statement at label if t1 <= 0
bltz t1,label如果小于零则分支:如果 t1 < 0,则分支到标签处的语句Branch if Less Than Zero : Branch to statement at label if t1 < 0
bnez t1,labelBranch if Not Equal Zero:如果 t1 != 0,则分支到标签处的语句Branch if Not Equal Zero : Branch to statement at label if t1 != 0
call labelCALL:调用远处的子程序CALL: call a far-away subroutine
csrc t1, fcsr清除控制和状态寄存器中的位Clear bits in control and status register
csrci fcsr, 100清除控制和状态寄存器中的位Clear bits in control and status register
csrr t1, fcsr读取控制和状态寄存器Read control and status register
csrs t1, fcsr设置控制和状态寄存器中的位Set bits in control and status register
csrsi fcsr, 100设置控制和状态寄存器中的位Set bits in control and status register
csrw t1, fcsr写控制和状态寄存器Write control and status register
csrwi fcsr, 100写控制和状态寄存器Write control and status register
fabs.d f1, f2将 f1 设置为 f2 的绝对值(64 位)Set f1 to the absolute value of f2 (64 bit)
fabs.s f1, f2将 f1 设置为 f2 的绝对值Set f1 to the absolute value of f2
fadd.d f1, f2, f3浮动 ADD(64 位):将 f1 分配给 f2 + f3Floating ADD (64 bit): assigns f1 to f2 + f3
fadd.s f1, f2, f3浮动 ADD:将 f1 分配给 f2 + f3Floating ADD: assigns f1 to f2 + f3
fcvt.d.s f1, f2将float转为double:将f2的值赋值给f1Convert float to double: Assigned the value of f2 to f1
fcvt.d.w f1, t1从有符号整数转换双精度数:将 t1 的值赋给 f1Convert double from signed integer: Assigns the value of t1 to f1
fcvt.d.wu f1, t1从无符号整数转换双精度数:将 t1 的值赋给 f1Convert double from unsigned integer: Assigns the value of t1 to f1
fcvt.s.d f1, f2double转float:将f2的值赋值给f1Convert double to float: Assigned the value of f2 to f1
fcvt.s.w f1, t1从有符号整数转换浮点数:将 t1 的值赋给 f1Convert float from signed integer: Assigns the value of t1 to f1
fcvt.s.wu f1, t1从无符号整数转换浮点数:将 t1 的值赋给 f1Convert float from unsigned integer: Assigns the value of t1 to f1
fcvt.w.d t1, f1从双精度转换有符号整数:将 f1 的值(四舍五入)分配给 t1Convert signed integer from double: Assigns the value of f1 (rounded) to t1
fcvt.w.s t1, f1从浮点数转换有符号整数:将 f1 的值(四舍五入)赋值给 t1Convert signed integer from float: Assigns the value of f1 (rounded) to t1
fcvt.wu.d t1, f1从双精度转换无符号整数:将 f1 的值(四舍五入)分配给 t1Convert unsigned integer from double: Assigns the value of f1 (rounded) to t1
fcvt.wu.s t1, f1从浮点数转换无符号整数:将 f1 的值(四舍五入)赋值给 t1Convert unsigned integer from float: Assigns the value of f1 (rounded) to t1
fdiv.d f1, f2, f3浮动 DIVide(64 位):将 f1 分配给 f2 / f3Floating DIVide (64 bit): assigns f1 to f2 / f3
fdiv.s f1, f2, f3浮动 DIVide:将 f1 分配给 f2 / f3Floating DIVide: assigns f1 to f2 / f3
fge.d t1, f2, f3浮动大于或等于(64 位):如果 f1 >= f2,则将 t1 设置为 1,否则将 t1 设置为 0Floating Greater Than or Equal (64 bit): if f1 >= f2, set t1 to 1, else set t1 to 0
fge.s t1, f2, f3浮动大于或等于:如果 f1 >= f2,则将 t1 设置为 1,否则将 t1 设置为 0Floating Greater Than or Equal: if f1 >= f2, set t1 to 1, else set t1 to 0
fgt.d t1, f2, f3浮动大于(64 位):如果 f1 > f2,则将 t1 设置为 1,否则将 t1 设置为 0Floating Greater Than (64 bit): if f1 > f2, set t1 to 1, else set t1 to 0
fgt.s t1, f2, f3浮动大于:如果 f1 > f2,则将 t1 设置为 1,否则将 t1 设置为 0Floating Greater Than: if f1 > f2, set t1 to 1, else set t1 to 0
fld f1,(t2)Load Word:将f1设置为从有效内存字地址开始的64位值Load Word: Set f1 to 64-bit value from effective memory word address
fld f1,-100Load Word:将f1设置为从有效内存字地址开始的64位值Load Word: Set f1 to 64-bit value from effective memory word address
fld f1,10000000,t3Load Word:使用 t3 作为临时地址,将 f1 设置为有效内存字地址的 64 位值Load Word: Set f1 to 64-bit value from effective memory word address using t3 as a temporary
fld f1,label, t3Load Word:使用 t3 作为临时地址,将 f1 设置为有效内存字地址的 64 位值Load Word: Set f1 to 64-bit value from effective memory word address using t3 as a temporary
flw f1,%lo(label)(t2)从地址加载Load from Address
flw f1,(t2)加载字协处理器 1:将 f1 设置为有效内存字地址的 32 位值Load Word Coprocessor 1 : Set f1 to 32-bit value from effective memory word address
flw f1,-100加载字协处理器 1:将 f1 设置为有效内存字地址的 32 位值Load Word Coprocessor 1 : Set f1 to 32-bit value from effective memory word address
flw f1,10000000,t3加载字协处理器 1:使用 t3 作为临时地址,将 f1 设置为有效内存字地址的 32 位值Load Word Coprocessor 1 : Set f1 to 32-bit value from effective memory word address using t3 as a temporary
flw f1,label, t3加载字协处理器 1:使用 t3 作为临时地址,将 f1 设置为有效内存字地址的 32 位值Load Word Coprocessor 1 : Set f1 to 32-bit value from effective memory word address using t3 as a temporary
flwd f1,%lo(label)(t2)从地址加载Load from Address
fmadd.d f1, f2, f3, f4融合乘加(64 位):将 f2*f3+f4 分配给 f1Fused Multiply Add (64 bit): Assigns f2*f3+f4 to f1
fmadd.s f1, f2, f3, f4融合乘加:将 f2*f3+f4 分配给 f1Fused Multiply Add: Assigns f2*f3+f4 to f1
fmsub.d f1, f2, f3, f4融合乘法减法(64 位):将 f2*f3-f4 分配给 f1Fused Multiply Subatract (64 bit): Assigns f2*f3-f4 to f1
fmsub.s f1, f2, f3, f4融合乘子:将 f2*f3-f4 分配给 f1Fused Multiply Subatract: Assigns f2*f3-f4 to f1
fmul.d f1, f2, f3Floating MULtiply(64 位):将 f1 分配给 f2 * f3Floating MULtiply (64 bit): assigns f1 to f2 * f3
fmul.s f1, f2, f3Floating MULtiply:将 f1 分配给 f2 * f3Floating MULtiply: assigns f1 to f2 * f3
fmv.d f1, f2将 f2 的值移动到 f1(64 位)Move the value of f2 to f1 (64 bit)
fmv.s f1, f2将 f2 的值移动到 f1Move the value of f2 to f1
fmv.w.x t1, f1移动浮点数(新助记符):从整数寄存器中移动表示浮点数的位Move float (New mnemonic): move bits representing a float from an integer register
fmv.x.w t1, f1移动浮点数(新助记符):将表示浮点数的位移动到整数寄存器Move float (New mnemonic): move bits representing a float to an integer register
fneg.d f1, f2将 f1 设置为 f2 的否定(64 位)Set f1 to the negation of f2 (64 bit)
fneg.s f1, f2将 f1 设置为 f2 的否定Set f1 to the negation of f2
fnmadd.d f1, f2, f3, f4Fused Negate Multiply Add(64 位):将 -(f2*f3+f4) 分配给 f1Fused Negate Multiply Add (64 bit): Assigns -(f2*f3+f4) to f1
fnmadd.s f1, f2, f3, f4Fused Negate Multiply Add:将 -(f2*f3+f4) 分配给 f1Fused Negate Multiply Add: Assigns -(f2*f3+f4) to f1
fnmsub.d f1, f2, f3, f4融合取反乘法减法(64 位):将 -(f2*f3-f4) 分配给 f1Fused Negated Multiply Subatract (64 bit): Assigns -(f2*f3-f4) to f1
fnmsub.s f1, f2, f3, f4融合取反乘法减法:将 -(f2*f3-f4) 赋值给 f1Fused Negated Multiply Subatract: Assigns -(f2*f3-f4) to f1
frcsr t1读取 FP 控制/状态寄存器Read FP control/status register
frflags t1读取 FP 异常标志Read FP exception flags
frrm t1读取 FP 舍入模式Read FP rounding mode
frsr t1frcsr t1 的别名Alias for frcsr t1
fscsr t1写 FP 控制/状态寄存器Write FP control/status register
fscsr t1, t2交换 FP 控制/状态寄存器Swap FP control/status register
fsd f1,(t2)Store Word:将f1中的64位值存储到有效内存字地址Store Word: Store 64-bit value from f1 to effective memory word address
fsd f1,-100Store Word:将f1中的64位值存储到有效内存字地址Store Word: Store 64-bit value from f1 to effective memory word address
fsd f1,10000000,t3Store Word:将64位值从f1存储到有效内存字地址,使用t3作为临时地址Store Word: Store 64-bit value from f1 to effective memory word address using t3 as a temporary
fsd f1,label, t3Store Word:将64位值从f1存储到有效内存字地址,使用t3作为临时地址Store Word: Store 64-bit value from f1 to effective memory word address using t3 as a temporary
fsflags t1写入 FP 异常标志Write FP exception flags
fsflags t1, t2交换 FP 异常标志Swap FP exception flags
fsflagsi 100立即写入 FP 异常标志Write FP exception flags, immediate
fsflagsi t1, 100立即交换 FP 异常标志Swap FP exception flags, immediate
fsqrt.d f1, f2浮动平方根(64 位):将 f1 分配给 f2 的平方根Floating SQuare RooT (64 bit): Assigns f1 to the square root of f2
fsqrt.s f1, f2浮动平方根:将 f1 分配给 f2 的平方根Floating SQuare RooT: Assigns f1 to the square root of f2
fsrm t1写入 FP 舍入模式Write FP rounding mode
fsrm t1, t2交换 FP 舍入模式Swap FP rounding mode
fsrmi 100写入 FP 舍入模式,立即数Write FP rounding mode, immediate
fsrmi t1, 100交换 FP 舍入模式,立即数Swap FP rounding mode, immediate
fssr t1fscsr t1 的别名Alias for fscsr t1
fssr t1, t2fscsr t1、t2 的别名Alias for fscsr t1, t2
fsub.d f1, f2, f3浮动减法(64 位):将 f1 分配给 f2 - f3Floating SUBtract (64 bit): assigns f1 to f2 - f3
fsub.s f1, f2, f3浮动减法:将 f1 分配给 f2 - f3Floating SUBtract: assigns f1 to f2 - f3
fsw f1,(t2)Store Word Coprocessor 1 : 将 f1 的 32 位值存储到有效内存字地址Store Word Coprocessor 1 : Store 32-bit value from f1 to effective memory word address
fsw f1,-100Store Word Coprocessor 1 : 将 f1 的 32 位值存储到有效内存字地址Store Word Coprocessor 1 : Store 32-bit value from f1 to effective memory word address
fsw f1,10000000,t3存储字协处理器 1:将 f1 的 32 位值存储到有效内存字地址,使用 t3 作为临时地址Store Word Coprocessor 1 : Store 32-bit value from f1 to effective memory word address using t3 as a temporary
fsw f1,label, t3存储字协处理器 1:将 f1 的 32 位值存储到有效内存字地址,使用 t3 作为临时地址Store Word Coprocessor 1 : Store 32-bit value from f1 to effective memory word address using t3 as a temporary
j label跳转:跳转到标签处的语句Jump : Jump to statement at label
jal labelJump And Link:跳转到标号处的语句并将返回地址设置为raJump And Link: Jump to statement at label and set the return address to ra
jalr t0Jump And Link Register:跳转到t0中的地址并将返回地址设置为raJump And Link Register: Jump to address in t0 and set the return address to ra
jalr t0, -100Jump And Link Register:跳转到t0中的地址并将返回地址设置为raJump And Link Register: Jump to address in t0 and set the return address to ra
jr t0跳转寄存器:跳转到 t0 中的地址Jump Register: Jump to address in t0
jr t0, -100跳转寄存器:跳转到 t0 中的地址Jump Register: Jump to address in t0
la t1,label加载地址:将 t1 设置为标签的地址Load Address : Set t1 to label's address
lb t1,(t2)加载字节:将 t1 设置为有效内存字节地址的符号扩展 8 位值Load Byte : Set t1 to sign-extended 8-bit value from effective memory byte address
lb t1,-100加载字节:将 $1 设置为有效内存字节地址的符号扩展 8 位值Load Byte : Set $1 to sign-extended 8-bit value from effective memory byte address
lb t1,10000000加载字节:将 $t1 设置为有效内存字节地址的符号扩展 8 位值Load Byte : Set $t1 to sign-extended 8-bit value from effective memory byte address
lb t1,label加载字节:将 $t1 设置为有效内存字节地址的符号扩展 8 位值Load Byte : Set $t1 to sign-extended 8-bit value from effective memory byte address
lbu t1,(t2)加载无符号字节:将 $t1 设置为有效内存字节地址的零扩展 8 位值Load Byte Unsigned : Set $t1 to zero-extended 8-bit value from effective memory byte address
lbu t1,-100加载无符号字节:将 $t1 设置为有效内存字节地址的零扩展 8 位值Load Byte Unsigned : Set $t1 to zero-extended 8-bit value from effective memory byte address
lbu t1,10000000Load Byte Unsigned:将 t1 设置为有效内存字节地址的零扩展 8 位值Load Byte Unsigned : Set t1 to zero-extended 8-bit value from effective memory byte address
lbu t1,labelLoad Byte Unsigned:将 t1 设置为有效内存字节地址的零扩展 8 位值Load Byte Unsigned : Set t1 to zero-extended 8-bit value from effective memory byte address
lh t1,(t2)加载半字:将 t1 设置为有效内存半字地址的符号扩展 16 位值Load Halfword : Set t1 to sign-extended 16-bit value from effective memory halfword address
lh t1,-100加载半字:将 t1 设置为有效内存半字地址的符号扩展 16 位值Load Halfword : Set t1 to sign-extended 16-bit value from effective memory halfword address
lh t1,10000000加载半字:将 t1 设置为有效内存半字地址的符号扩展 16 位值Load Halfword : Set t1 to sign-extended 16-bit value from effective memory halfword address
lh t1,label加载半字:将 t1 设置为有效内存半字地址的符号扩展 16 位值Load Halfword : Set t1 to sign-extended 16-bit value from effective memory halfword address
lhu t1,(t2)加载无符号半字:将 t1 设置为有效内存半字地址的零扩展 16 位值Load Halfword Unsigned : Set t1 to zero-extended 16-bit value from effective memory halfword address
lhu t1,-100加载无符号半字:将 t1 设置为有效内存半字地址的零扩展 16 位值Load Halfword Unsigned : Set t1 to zero-extended 16-bit value from effective memory halfword address
lhu t1,10000000加载无符号半字:将 t1 设置为有效内存半字地址的零扩展 16 位值Load Halfword Unsigned : Set t1 to zero-extended 16-bit value from effective memory halfword address
lhu t1,label加载无符号半字:将 t1 设置为有效内存半字地址的零扩展 16 位值Load Halfword Unsigned : Set t1 to zero-extended 16-bit value from effective memory halfword address
li t1,-100立即加载:将 t1 设置为 12 位立即数(符号扩展)Load Immediate : Set t1 to 12-bit immediate (sign-extended)
li t1,10000000立即加载:将 t1 设置为 32 位立即数Load Immediate : Set t1 to 32-bit immediate
lui t1,%hi(label)Load Upper Address : 将 t1 设置为标签的高 20 位地址Load Upper Address : Set t1 to upper 20-bit label's address
lw t1,%lo(label)(t2)从地址加载Load from Address
lw t1,(t2)加载字:将 t1 设置为有效内存字地址的内容Load Word : Set t1 to contents of effective memory word address
lw t1,-100加载字:将 t1 设置为有效内存字地址的内容Load Word : Set t1 to contents of effective memory word address
lw t1,10000000加载字:将 t1 设置为有效内存字地址的内容Load Word : Set t1 to contents of effective memory word address
lw t1,label加载字:将 t1 设置为标签地址处内存字的内容Load Word : Set t1 to contents of memory word at label's address
mv t1,t2MoVe:将 t1 设置为 t2 的内容MoVe : Set t1 to contents of t2
neg t1,t2NEGate :将 t1 设置为 t2 的否定NEGate : Set t1 to negation of t2
nop无操作NO OPeration
not t1,t2按位非(位反转)Bitwise NOT (bit inversion)
rdcycle t1从循环中读取Read from cycle
rdcycleh t1从 cycleh 读取Read from cycleh
rdinstret t1从instret读取Read from instret
rdinstreth t1从 instreth 读取Read from instreth
rdtime t1从时间读Read from time
rdtimeh t1从时间读取Read from timeh
ret返回:从子程序返回Return: return from a subroutine
sb t1,(t2)Store Byte : 将t1的低8位存入有效内存字节地址Store Byte : Store the low-order 8 bits of t1 into the effective memory byte address
sb t1,-100Store Byte : 将$t1的低8位存入有效内存字节地址Store Byte : Store the low-order 8 bits of $t1 into the effective memory byte address
sb t1,10000000,t2Store Byte : 将$t1的低8位存入有效内存字节地址Store Byte : Store the low-order 8 bits of $t1 into the effective memory byte address
sb t1,label,t2Store Byte : 将$t1的低8位存入有效内存字节地址Store Byte : Store the low-order 8 bits of $t1 into the effective memory byte address
seqz t1,t2将 EQual 设置为零:如果 t2 == 0,则将 t1 设置为 1,否则为 0Set EQual to Zero : if t2 == 0 then set t1 to 1 else 0
sgt t1,t2,t3设置大于:如果 t2 大于 t3,则将 t1 设置为 1,否则为 0Set Greater Than : if t2 greater than t3 then set t1 to 1 else 0
sgtu t1,t2,t3设置大于无符号:如果 t2 大于 t3(无符号比较)则将 t1 设置为 1,否则为 0Set Greater Than Unsigned : if t2 greater than t3 (unsigned compare) then set t1 to 1 else 0
sgtz t1,t2设置大于零:如果 t2 > 0,则将 t1 设置为 1,否则为 0Set Greater Than Zero : if t2 > 0 then set t1 to 1 else 0
sh t1,(t2)Store Halfword : 将$1的低16位存入有效内存半字地址Store Halfword : Store the low-order 16 bits of $1 into the effective memory halfword address
sh t1,-100Store Halfword : 将$t1的低16位存入有效内存半字地址Store Halfword : Store the low-order 16 bits of $t1 into the effective memory halfword address
sh t1,10000000,t2Store Halfword : 将t1的低16位以t2为临时存储到有效内存半字地址Store Halfword : Store the low-order 16 bits of t1 into the effective memory halfword address using t2 as a temporary
sh t1,label,t2Store Halfword : 将t1的低16位以t2为临时存储到有效内存半字地址Store Halfword : Store the low-order 16 bits of t1 into the effective memory halfword address using t2 as a temporary
sltz t1,t2设置小于零:如果 t2 < 0,则将 t1 设置为 1,否则为 0Set Less Than Zero : if t2 < 0 then set t1 to 1 else 0
snez t1,t2设置不等于零:if t2 != 0 then set t1 to 1 else 0Set Not Equal to Zero : if t2 != 0 then set t1 to 1 else 0
sw t1,(t2)Store Word : 将 t1 的内容存入有效内存字地址Store Word : Store t1 contents into effective memory word address
sw t1,-100Store Word : 将$t1内容存入有效内存字地址Store Word : Store $t1 contents into effective memory word address
sw t1,10000000,t2Store Word:将$t1的内容存储到有效的内存字地址中,使用t2作为临时地址Store Word : Store $t1 contents into effective memory word address using t2 as a temporary
sw t1,label,t2Store Word:将$t1 的内容存储到标签地址处的内存字中,使用t2 作为临时地址Store Word : Store $t1 contents into memory word at label's address using t2 as a temporary
tail labelTAIL call:尾调用(call without saved return address)a far-away subroutineTAIL call: tail call (call without saving return address)a far-away subroutine
本原创文章自由转载,转载请注明本博来源及网址 | 当前页面:兰雅sRGB个人笔记 » RARS 汇编模拟器支持的RISC-V指令