forked from bytecodealliance/wasmtime
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support big- and little-endian lane order with bitcast (bytecodeallia…
…nce#5196) Add a MemFlags operand to the bitcast instruction, where only the `big` and `little` flags are accepted. These define the lane order to be used when casting between types of different lane counts. Update all users to pass an appropriate MemFlags argument. Implement lane swaps where necessary in the s390x back-end. This is the final part necessary to fix bytecodealliance#4566.
- Loading branch information
Showing
16 changed files
with
296 additions
and
52 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
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,79 @@ | ||
test compile precise-output | ||
target s390x | ||
|
||
;; Bitcast between integral types is a no-op. | ||
|
||
function %bitcast_i8_i8(i8) -> i8 { | ||
block0(v0: i8): | ||
v1 = bitcast.i8 v0 | ||
return v1 | ||
} | ||
|
||
; block0: | ||
; br %r14 | ||
|
||
function %bitcast_i16_i16(i16) -> i16 { | ||
block0(v0: i16): | ||
v1 = bitcast.i16 v0 | ||
return v1 | ||
} | ||
|
||
; block0: | ||
; br %r14 | ||
|
||
function %bitcast_i32_i32(i32) -> i32 { | ||
block0(v0: i32): | ||
v1 = bitcast.i32 v0 | ||
return v1 | ||
} | ||
|
||
; block0: | ||
; br %r14 | ||
|
||
function %bitcast_i64_i64(i64) -> i64 { | ||
block0(v0: i64): | ||
v1 = bitcast.i64 v0 | ||
return v1 | ||
} | ||
|
||
; block0: | ||
; br %r14 | ||
|
||
function %bitcast_i128_i128(i128) -> i128 { | ||
block0(v0: i128): | ||
v1 = bitcast.i128 v0 | ||
return v1 | ||
} | ||
|
||
; block0: | ||
; vl %v0, 0(%r3) | ||
; vst %v0, 0(%r2) | ||
; br %r14 | ||
|
||
function %bitcast_r64_i64(r64) -> i64 { | ||
block0(v0: r64): | ||
v1 = bitcast.i64 v0 | ||
return v1 | ||
} | ||
|
||
; block0: | ||
; br %r14 | ||
|
||
function %bitcast_i64_r64(i64) -> r64 { | ||
block0(v0: i64): | ||
v1 = bitcast.r64 v0 | ||
return v1 | ||
} | ||
|
||
; block0: | ||
; br %r14 | ||
|
||
function %bitcast_r64_r64(r64) -> r64 { | ||
block0(v0: r64): | ||
v1 = bitcast.r64 v0 | ||
return v1 | ||
} | ||
|
||
; block0: | ||
; br %r14 | ||
|
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
Oops, something went wrong.