Browse Source
This adds a new feature experimental_x64 for CLIF tests. A test is run in the new x64 backend iff: - either the test doesn't have an x86_64 target requirement, signaling it must be target agnostic or not run on this target. - or the test does require the x86_64 target, and the test is marked with the `experimental_x64` feature. This required one workaround in the parser. The reason is that the parser will try to use information not provided by the TargetIsa adapter for the Mach backends, like register names. In particular, parsing test may fail before the test runner realizes that the test must not be run. In this case, we early return an almost-empty TestFile from the parser, under the same conditions as above, so that the caller may filter out the test properly. This also copies two tests from the test suite using the new backend, for demonstration purposes.pull/2231/head
Benjamin Bouvier
4 years ago
8 changed files with 109 additions and 10 deletions
@ -0,0 +1,16 @@ |
|||
test compile |
|||
target x86_64 |
|||
feature "experimental_x64" |
|||
|
|||
function %f(i32, i32) -> i32 { |
|||
block0(v0: i32, v1: i32): |
|||
; check: pushq %rbp |
|||
; check: movq %rsp, %rbp |
|||
v2 = iadd v0, v1 |
|||
; check: addl %esi, %edi |
|||
return v2 |
|||
; check: movq %rdi, %rax |
|||
; check: movq %rbp, %rsp |
|||
; check: popq %rbp |
|||
; check: ret |
|||
} |
@ -0,0 +1,13 @@ |
|||
test run |
|||
target x86_64 |
|||
feature "experimental_x64" |
|||
|
|||
function %test_compare_i32() -> b1 { |
|||
block0: |
|||
v0 = iconst.i32 42 |
|||
v1 = iconst.i32 42 |
|||
v2 = icmp eq v0, v1 |
|||
return v2 |
|||
} |
|||
|
|||
; run |
Loading…
Reference in new issue