Files
wasmtime/cranelift/filetests/wasm/i64-compares.cton
Dan Gohman 4e67e08efd Use the target-lexicon crate.
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.
2018-05-30 06:13:35 -07:00

82 lines
1.4 KiB
Plaintext

; Test code generation for WebAssembly i64 comparison operators.
test compile
target x86_64 haswell
function %i64_eqz(i64) -> i32 {
ebb0(v0: i64):
v1 = icmp_imm eq v0, 0
v2 = bint.i32 v1
return v2
}
function %i64_eq(i64, i64) -> i32 {
ebb0(v0: i64, v1: i64):
v2 = icmp eq v0, v1
v3 = bint.i32 v2
return v3
}
function %i64_ne(i64, i64) -> i32 {
ebb0(v0: i64, v1: i64):
v2 = icmp ne v0, v1
v3 = bint.i32 v2
return v3
}
function %i64_lt_s(i64, i64) -> i32 {
ebb0(v0: i64, v1: i64):
v2 = icmp slt v0, v1
v3 = bint.i32 v2
return v3
}
function %i64_lt_u(i64, i64) -> i32 {
ebb0(v0: i64, v1: i64):
v2 = icmp ult v0, v1
v3 = bint.i32 v2
return v3
}
function %i64_gt_s(i64, i64) -> i32 {
ebb0(v0: i64, v1: i64):
v2 = icmp sgt v0, v1
v3 = bint.i32 v2
return v3
}
function %i64_gt_u(i64, i64) -> i32 {
ebb0(v0: i64, v1: i64):
v2 = icmp ugt v0, v1
v3 = bint.i32 v2
return v3
}
function %i64_le_s(i64, i64) -> i32 {
ebb0(v0: i64, v1: i64):
v2 = icmp sle v0, v1
v3 = bint.i32 v2
return v3
}
function %i64_le_u(i64, i64) -> i32 {
ebb0(v0: i64, v1: i64):
v2 = icmp ule v0, v1
v3 = bint.i32 v2
return v3
}
function %i64_ge_s(i64, i64) -> i32 {
ebb0(v0: i64, v1: i64):
v2 = icmp sge v0, v1
v3 = bint.i32 v2
return v3
}
function %i64_ge_u(i64, i64) -> i32 {
ebb0(v0: i64, v1: i64):
v2 = icmp uge v0, v1
v3 = bint.i32 v2
return v3
}