Skip to content

Commit

Permalink
Fix filecheck test
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonLydike committed May 14, 2024
1 parent beaf22e commit c185f0f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion riscemu/instructions/RV32F.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def instruction_fcvt_s_w(self, ins: Instruction):
| f[rd] = f32_{s32}(x[rs1])
"""
rd, rs = self.parse_rd_rs(ins)
self.regs.set_f(rd, Float32(self.regs.get(rs).signed().value))
self.regs.set_f(rd, Float32(self.regs.get(rs).value))

def instruction_fcvt_s_wu(self, ins: Instruction):
"""
Expand Down
4 changes: 2 additions & 2 deletions test/filecheck/rv32f-conv.asm
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ main:
fcvt.s.w fa0, a1
fmv.x.w a1, fa0
print a1
// CHECK-NEXT: register a1 contains value 3221225472
// CHECK-NEXT: register a1 contains value -1073741824

// test fmv.w.x
li a1, 1073741824
fmv.w.x fa0, a1
print.float.s fa0
// CHECK-NEXT: register fa0 contains value 2.0
li a1, 3221225472
li a1, -1073741824
fmv.w.x fa0, a1
print.float.s fa0
// CHECK-NEXT: register fa0 contains value -2.0
Expand Down

0 comments on commit c185f0f

Please sign in to comment.