* Update lots of `isa/*/*.clif` tests to `precise-output` This commit goes through the `aarch64` and `x64` subdirectories and subjectively changes tests from `test compile` to add `precise-output`. This then auto-updates all the test expectations so they can be automatically instead of manually updated in the future. Not all tests were migrated, largely subject to the whims of myself, mainly looking to see if the test was looking for specific instructions or just checking the whole assembly output. * Filter out `;;` comments from test expctations Looks like the cranelift parser picks up all comments, not just those trailing the function, so use a convention where `;;` is used for human-readable-comments in test cases and `;`-prefixed comments are the test expectation.
50 lines
1.1 KiB
Plaintext
50 lines
1.1 KiB
Plaintext
test compile precise-output
|
|
target x86_64
|
|
|
|
function %f(f64) -> f64 {
|
|
block0(v0: f64):
|
|
v1 = fabs.f64 v0
|
|
return v1
|
|
}
|
|
|
|
; VCode_ShowWithRRU {{
|
|
; Entry block: 0
|
|
; Block 0:
|
|
; (original IR block: block0)
|
|
; (instruction range: 0 .. 9)
|
|
; Inst 0: pushq %rbp
|
|
; Inst 1: movq %rsp, %rbp
|
|
; Inst 2: movabsq $9223372036854775807, %rsi
|
|
; Inst 3: movq %rsi, %xmm1
|
|
; Inst 4: andpd %xmm0, %xmm1
|
|
; Inst 5: movaps %xmm1, %xmm0
|
|
; Inst 6: movq %rbp, %rsp
|
|
; Inst 7: popq %rbp
|
|
; Inst 8: ret
|
|
; }}
|
|
|
|
function %f(i64) -> f64 {
|
|
block0(v0: i64):
|
|
v1 = load.f64 v0
|
|
v2 = fabs.f64 v1
|
|
return v2
|
|
}
|
|
|
|
; VCode_ShowWithRRU {{
|
|
; Entry block: 0
|
|
; Block 0:
|
|
; (original IR block: block0)
|
|
; (instruction range: 0 .. 10)
|
|
; Inst 0: pushq %rbp
|
|
; Inst 1: movq %rsp, %rbp
|
|
; Inst 2: movsd 0(%rdi), %xmm0
|
|
; Inst 3: movabsq $9223372036854775807, %rsi
|
|
; Inst 4: movq %rsi, %xmm1
|
|
; Inst 5: andpd %xmm0, %xmm1
|
|
; Inst 6: movaps %xmm1, %xmm0
|
|
; Inst 7: movq %rbp, %rsp
|
|
; Inst 8: popq %rbp
|
|
; Inst 9: ret
|
|
; }}
|
|
|