Implement the basics of the x86-64 ABI.

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.
This commit is contained in:
Jakob Stoklund Olesen
2017-06-30 10:37:42 -07:00
parent 68ca285507
commit 9766fc3fcd
3 changed files with 128 additions and 8 deletions

View File

@@ -0,0 +1,20 @@
; 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
}