This switches from a custom list of architectures to use the target-lexicon crate. - "set is_64bit=1; isa x86" is replaced with "target x86_64", and similar for other architectures, and the `is_64bit` flag is removed entirely. - The `is_compressed` flag is removed too; it's no longer being used to control REX prefixes on x86-64, ARM and Thumb are separate architectures in target-lexicon, and we can figure out how to select RISC-V compressed encodings when we're ready.
37 lines
1.2 KiB
Plaintext
37 lines
1.2 KiB
Plaintext
; Test the parser's support for encoding annotations.
|
|
test legalizer
|
|
target riscv32
|
|
|
|
function %parse_encoding(i32 [%x5]) -> i32 [%x10] {
|
|
; check: function %parse_encoding(i32 [%x5], i32 link [%x1]) -> i32 [%x10], i32 link [%x1] fast {
|
|
|
|
sig0 = (i32 [%x10]) -> i32 [%x10] system_v
|
|
; check: sig0 = (i32 [%x10]) -> i32 [%x10] system_v
|
|
|
|
sig1 = (i32 [%x10], i32 [%x11]) -> b1 [%x10] system_v
|
|
; check: sig1 = (i32 [%x10], i32 [%x11]) -> b1 [%x10] system_v
|
|
|
|
sig2 = (f32 [%f10], i32 [%x12], i32 [%x13]) -> f64 [%f10] system_v
|
|
; check: sig2 = (f32 [%f10], i32 [%x12], i32 [%x13]) -> f64 [%f10] system_v
|
|
|
|
; Arguments on stack where not necessary
|
|
sig3 = (f64 [%f10], i32 [0], i32 [4]) -> f64 [%f10] system_v
|
|
; check: sig3 = (f64 [%f10], i32 [0], i32 [4]) -> f64 [%f10] system_v
|
|
|
|
; Stack argument before register argument
|
|
sig4 = (f32 [72], i32 [%x10]) system_v
|
|
; check: sig4 = (f32 [72], i32 [%x10]) system_v
|
|
|
|
; Return value on stack
|
|
sig5 = () -> f32 [0] system_v
|
|
; check: sig5 = () -> f32 [0] system_v
|
|
|
|
; function + signature
|
|
fn0 = %bar(i32 [%x10]) -> b1 [%x10] system_v
|
|
; check: sig6 = (i32 [%x10]) -> b1 [%x10] system_v
|
|
; nextln: fn0 = %bar sig6
|
|
|
|
ebb0(v0: i32):
|
|
return v0
|
|
}
|