This is just a rough sketch to get us started. There are bound to be some issues. This also legalizes signatures for x86-32, but probably not correctly. It's basically implementing the x86-64 ABI for 32-bit.
21 lines
426 B
Plaintext
21 lines
426 B
Plaintext
; Test the legalization of function signatures.
|
|
test legalizer
|
|
set is_64bit
|
|
isa intel
|
|
|
|
; regex: V=v\d+
|
|
|
|
function %f() {
|
|
sig0 = signature(i32) -> i32
|
|
; check: sig0 = signature(i32 [%rdi]) -> i32 [%rax]
|
|
|
|
sig1 = signature(i64) -> b1
|
|
; check: sig1 = signature(i64 [%rdi]) -> b1 [%rax]
|
|
|
|
sig2 = signature(f32, i64) -> f64
|
|
; check: sig2 = signature(f32 [%xmm0], i64 [%rdi]) -> f64 [%xmm0]
|
|
|
|
ebb0:
|
|
return
|
|
}
|