forked from bytecodealliance/wasmtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
riscv64: Implement various SIMD float ops (bytecodealliance#6657)
* riscv64: Implement SIMD `fabs` * riscv64: Implement SIMD `fcopysign` * riscv64: Implement SIMD `f{min,max}_pseudo` * riscv64: Implement SIMD `f{min,max}`
- Loading branch information
Showing
20 changed files
with
845 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
test compile precise-output | ||
set unwind_info=false | ||
target riscv64 has_v | ||
|
||
|
||
function %fabs_f32x4(f32x4) -> f32x4 { | ||
block0(v0: f32x4): | ||
v1 = fabs v0 | ||
return v1 | ||
} | ||
|
||
; VCode: | ||
; add sp,-16 | ||
; sd ra,8(sp) | ||
; sd fp,0(sp) | ||
; mv fp,sp | ||
; block0: | ||
; vle8.v v1,16(fp) #avl=16, #vtype=(e8, m1, ta, ma) | ||
; vfabs.v v4,v1 #avl=4, #vtype=(e32, m1, ta, ma) | ||
; vse8.v v4,0(a0) #avl=16, #vtype=(e8, m1, ta, ma) | ||
; ld ra,8(sp) | ||
; ld fp,0(sp) | ||
; add sp,+16 | ||
; ret | ||
; | ||
; Disassembled: | ||
; block0: ; offset 0x0 | ||
; addi sp, sp, -0x10 | ||
; sd ra, 8(sp) | ||
; sd s0, 0(sp) | ||
; ori s0, sp, 0 | ||
; block1: ; offset 0x10 | ||
; .byte 0x57, 0x70, 0x08, 0xcc | ||
; addi t6, s0, 0x10 | ||
; .byte 0x87, 0x80, 0x0f, 0x02 | ||
; .byte 0x57, 0x70, 0x02, 0xcd | ||
; .byte 0x57, 0x92, 0x10, 0x2a | ||
; .byte 0x57, 0x70, 0x08, 0xcc | ||
; .byte 0x27, 0x02, 0x05, 0x02 | ||
; ld ra, 8(sp) | ||
; ld s0, 0(sp) | ||
; addi sp, sp, 0x10 | ||
; ret | ||
|
||
function %fabs_f64x2(f64x2) -> f64x2 { | ||
block0(v0: f64x2): | ||
v1 = fabs v0 | ||
return v1 | ||
} | ||
|
||
; VCode: | ||
; add sp,-16 | ||
; sd ra,8(sp) | ||
; sd fp,0(sp) | ||
; mv fp,sp | ||
; block0: | ||
; vle8.v v1,16(fp) #avl=16, #vtype=(e8, m1, ta, ma) | ||
; vfabs.v v4,v1 #avl=2, #vtype=(e64, m1, ta, ma) | ||
; vse8.v v4,0(a0) #avl=16, #vtype=(e8, m1, ta, ma) | ||
; ld ra,8(sp) | ||
; ld fp,0(sp) | ||
; add sp,+16 | ||
; ret | ||
; | ||
; Disassembled: | ||
; block0: ; offset 0x0 | ||
; addi sp, sp, -0x10 | ||
; sd ra, 8(sp) | ||
; sd s0, 0(sp) | ||
; ori s0, sp, 0 | ||
; block1: ; offset 0x10 | ||
; .byte 0x57, 0x70, 0x08, 0xcc | ||
; addi t6, s0, 0x10 | ||
; .byte 0x87, 0x80, 0x0f, 0x02 | ||
; .byte 0x57, 0x70, 0x81, 0xcd | ||
; .byte 0x57, 0x92, 0x10, 0x2a | ||
; .byte 0x57, 0x70, 0x08, 0xcc | ||
; .byte 0x27, 0x02, 0x05, 0x02 | ||
; ld ra, 8(sp) | ||
; ld s0, 0(sp) | ||
; addi sp, sp, 0x10 | ||
; ret | ||
|
Oops, something went wrong.