Merge branch 'decode_print' of gitlab.istic.univ-rennes1.fr:simpleos/burritos into decode_print
This commit is contained in:
commit
29c1cbd388
@ -455,19 +455,19 @@ impl Machine {
|
|||||||
RISCV_FP => {
|
RISCV_FP => {
|
||||||
match inst.funct7 {
|
match inst.funct7 {
|
||||||
RISCV_FP_ADD => {
|
RISCV_FP_ADD => {
|
||||||
machine.fp_reg[inst.rd as usize] = machine.fp_reg[inst.rs1 as usize] + machine.fp_reg[inst.rs2 as usize];
|
machine.fp_reg.set_reg(inst.rd as usize, machine.fp_reg.get_reg(inst.rs1 as usize) + machine.fp_reg.get_reg(inst.rs2 as usize));
|
||||||
},
|
},
|
||||||
RISCV_FP_SUB => {
|
RISCV_FP_SUB => {
|
||||||
machine.fp_reg[inst.rd as usize] = machine.fp_reg[inst.rs1 as usize] - machine.fp_reg[inst.rs2 as usize];
|
machine.fp_reg.set_reg(inst.rd as usize, machine.fp_reg.get_reg(inst.rs1 as usize) - machine.fp_reg.get_reg(inst.rs2 as usize));
|
||||||
},
|
},
|
||||||
RISCV_FP_MUL => {
|
RISCV_FP_MUL => {
|
||||||
machine.fp_reg[inst.rd as usize] = machine.fp_reg[inst.rs1 as usize] * machine.fp_reg[inst.rs2 as usize];
|
machine.fp_reg.set_reg(inst.rd as usize, machine.fp_reg.get_reg(inst.rs1 as usize) * machine.fp_reg.get_reg(inst.rs2 as usize));
|
||||||
},
|
},
|
||||||
RISCV_FP_DIV => {
|
RISCV_FP_DIV => {
|
||||||
machine.fp_reg[inst.rd as usize] = machine.fp_reg[inst.rs1 as usize] / machine.fp_reg[inst.rs2 as usize];
|
machine.fp_reg.set_reg(inst.rd as usize, machine.fp_reg.get_reg(inst.rs1 as usize) / machine.fp_reg.get_reg(inst.rs2 as usize));
|
||||||
},
|
},
|
||||||
RISCV_FP_SQRT => {
|
RISCV_FP_SQRT => {
|
||||||
machine.fp_reg[inst.rd as usize] = machine.fp_reg[inst.rs1 as usize].sqrt();
|
machine.fp_reg.set_reg(inst.rd as usize, machine.fp_reg.get_reg(inst.rs1 as usize).sqrt());
|
||||||
},
|
},
|
||||||
RISCV_FP_FSGN => {
|
RISCV_FP_FSGN => {
|
||||||
let local_float = machine.fp_reg[inst.rs1 as usize];
|
let local_float = machine.fp_reg[inst.rs1 as usize];
|
||||||
|
Loading…
Reference in New Issue
Block a user