# Lib.RiscV module

MIF08, CAP, CodeGeneration, RiscV API Functions to define instructions.

Lib.RiscV.add(dr: Operand, sr1: Operand, sr2orimm7: Operand) → Instru3A

Lib.RiscV.call(function: Function) → Instru3A

  Function call.

Lib.RiscV.conditional_jump(label: Label, op1: Operand, cond: Condition, op2: Operand)

  Add a conditional jump to the code. This is a wrapper around bge, bgt, beq, … c is a Condition, like Condition(‘bgt’), Condition(MiniCParser.EQ), …

Lib.RiscV.div(dr: Operand, sr1: Operand, sr2orimm7: Operand) → Instru3A

Lib.RiscV.jump(label: Label) → AbsoluteJump

  Unconditional jump to label.

Lib.RiscV.land(dr: Operand, sr1: Operand, sr2orimm7: Operand) → Instru3A

Lib.RiscV.ld(dr: Operand, mem: Operand) → Instru3A

Lib.RiscV.li(dr: Operand, imm7: Immediate) → Instru3A

Lib.RiscV.lor(dr: Operand, sr1: Operand, sr2orimm7: Operand) → Instru3A

Lib.RiscV.mul(dr: Operand, sr1: Operand, sr2orimm7: Operand) → Instru3A

Lib.RiscV.mv(dr: Operand, sr: Operand) → Instru3A

Lib.RiscV.rem(dr: Operand, sr1: Operand, sr2orimm7: Operand) → Instru3A

Lib.RiscV.sd(sr: Operand, mem: Operand) → Instru3A

Lib.RiscV.sub(dr: Operand, sr1: Operand, sr2orimm7: Operand) → Instru3A

Lib.RiscV.xor(dr: Operand, sr1: Operand, sr2orimm7: Operand) → Instru3A