Rename CallConv::Native to CallConv::SystemV. (#291)
To keep cross-compiling straightforward, Cretonne shouldn't have any behavior that depends on the host. This renames the "Native" calling convention to "SystemV", which has a defined meaning for each target, so that it's clear that the calling convention doesn't change depending on what host Cretonne is running on.
This commit is contained in:
@@ -7,8 +7,8 @@ isa riscv enable_e
|
||||
function %f() {
|
||||
; Spilling into the stack args after %x15 since %16 and up are not
|
||||
; available in RV32E.
|
||||
sig0 = (i64, i64, i64, i64) -> i64 native
|
||||
; check: sig0 = (i32 [%x10], i32 [%x11], i32 [%x12], i32 [%x13], i32 [%x14], i32 [%x15], i32 [0], i32 [4]) -> i32 [%x10], i32 [%x11] native
|
||||
sig0 = (i64, i64, i64, i64) -> i64 system_v
|
||||
; check: sig0 = (i32 [%x10], i32 [%x11], i32 [%x12], i32 [%x13], i32 [%x14], i32 [%x15], i32 [0], i32 [4]) -> i32 [%x10], i32 [%x11] system_v
|
||||
ebb0:
|
||||
return
|
||||
}
|
||||
|
||||
@@ -5,27 +5,27 @@ isa riscv
|
||||
; regex: V=v\d+
|
||||
|
||||
function %f() {
|
||||
sig0 = (i32) -> i32 native
|
||||
; check: sig0 = (i32 [%x10]) -> i32 [%x10] native
|
||||
sig0 = (i32) -> i32 system_v
|
||||
; check: sig0 = (i32 [%x10]) -> i32 [%x10] system_v
|
||||
|
||||
sig1 = (i64) -> b1 native
|
||||
; check: sig1 = (i32 [%x10], i32 [%x11]) -> b1 [%x10] native
|
||||
sig1 = (i64) -> b1 system_v
|
||||
; check: sig1 = (i32 [%x10], i32 [%x11]) -> b1 [%x10] system_v
|
||||
|
||||
; The i64 argument must go in an even-odd register pair.
|
||||
sig2 = (f32, i64) -> f64 native
|
||||
; check: sig2 = (f32 [%f10], i32 [%x12], i32 [%x13]) -> f64 [%f10] native
|
||||
sig2 = (f32, i64) -> f64 system_v
|
||||
; check: sig2 = (f32 [%f10], i32 [%x12], i32 [%x13]) -> f64 [%f10] system_v
|
||||
|
||||
; Spilling into the stack args.
|
||||
sig3 = (f64, f64, f64, f64, f64, f64, f64, i64) -> f64 native
|
||||
; check: sig3 = (f64 [%f10], f64 [%f11], f64 [%f12], f64 [%f13], f64 [%f14], f64 [%f15], f64 [%f16], i32 [0], i32 [4]) -> f64 [%f10] native
|
||||
sig3 = (f64, f64, f64, f64, f64, f64, f64, i64) -> f64 system_v
|
||||
; check: sig3 = (f64 [%f10], f64 [%f11], f64 [%f12], f64 [%f13], f64 [%f14], f64 [%f15], f64 [%f16], i32 [0], i32 [4]) -> f64 [%f10] system_v
|
||||
|
||||
; Splitting vectors.
|
||||
sig4 = (i32x4) native
|
||||
; check: sig4 = (i32 [%x10], i32 [%x11], i32 [%x12], i32 [%x13]) native
|
||||
sig4 = (i32x4) system_v
|
||||
; check: sig4 = (i32 [%x10], i32 [%x11], i32 [%x12], i32 [%x13]) system_v
|
||||
|
||||
; Splitting vectors, then splitting ints.
|
||||
sig5 = (i64x4) native
|
||||
; check: sig5 = (i32 [%x10], i32 [%x11], i32 [%x12], i32 [%x13], i32 [%x14], i32 [%x15], i32 [%x16], i32 [%x17]) native
|
||||
sig5 = (i64x4) system_v
|
||||
; check: sig5 = (i32 [%x10], i32 [%x11], i32 [%x12], i32 [%x13], i32 [%x14], i32 [%x15], i32 [%x16], i32 [%x17]) system_v
|
||||
|
||||
ebb0:
|
||||
return
|
||||
|
||||
@@ -106,7 +106,7 @@ ebb0(v0: i64x4):
|
||||
}
|
||||
|
||||
function %indirect(i32) {
|
||||
sig1 = () native
|
||||
sig1 = () system_v
|
||||
ebb0(v0: i32):
|
||||
call_indirect sig1, v0()
|
||||
return
|
||||
@@ -114,7 +114,7 @@ ebb0(v0: i32):
|
||||
|
||||
; The first argument to call_indirect doesn't get altered.
|
||||
function %indirect_arg(i32, f32x2) {
|
||||
sig1 = (f32x2) native
|
||||
sig1 = (f32x2) system_v
|
||||
ebb0(v0: i32, v1: f32x2):
|
||||
call_indirect sig1, v0(v1)
|
||||
; check: call_indirect sig1, v0($V, $V)
|
||||
|
||||
@@ -3,32 +3,32 @@ test legalizer
|
||||
isa riscv
|
||||
|
||||
function %parse_encoding(i32 [%x5]) -> i32 [%x10] {
|
||||
; check: function %parse_encoding(i32 [%x5], i32 link [%x1]) -> i32 [%x10], i32 link [%x1] native {
|
||||
; check: function %parse_encoding(i32 [%x5], i32 link [%x1]) -> i32 [%x10], i32 link [%x1] system_v {
|
||||
|
||||
sig0 = (i32 [%x10]) -> i32 [%x10] native
|
||||
; check: sig0 = (i32 [%x10]) -> i32 [%x10] native
|
||||
sig0 = (i32 [%x10]) -> i32 [%x10] system_v
|
||||
; check: sig0 = (i32 [%x10]) -> i32 [%x10] system_v
|
||||
|
||||
sig1 = (i32 [%x10], i32 [%x11]) -> b1 [%x10] native
|
||||
; check: sig1 = (i32 [%x10], i32 [%x11]) -> b1 [%x10] native
|
||||
sig1 = (i32 [%x10], i32 [%x11]) -> b1 [%x10] system_v
|
||||
; check: sig1 = (i32 [%x10], i32 [%x11]) -> b1 [%x10] system_v
|
||||
|
||||
sig2 = (f32 [%f10], i32 [%x12], i32 [%x13]) -> f64 [%f10] native
|
||||
; check: sig2 = (f32 [%f10], i32 [%x12], i32 [%x13]) -> f64 [%f10] native
|
||||
sig2 = (f32 [%f10], i32 [%x12], i32 [%x13]) -> f64 [%f10] system_v
|
||||
; check: sig2 = (f32 [%f10], i32 [%x12], i32 [%x13]) -> f64 [%f10] system_v
|
||||
|
||||
; Arguments on stack where not necessary
|
||||
sig3 = (f64 [%f10], i32 [0], i32 [4]) -> f64 [%f10] native
|
||||
; check: sig3 = (f64 [%f10], i32 [0], i32 [4]) -> f64 [%f10] native
|
||||
sig3 = (f64 [%f10], i32 [0], i32 [4]) -> f64 [%f10] system_v
|
||||
; check: sig3 = (f64 [%f10], i32 [0], i32 [4]) -> f64 [%f10] system_v
|
||||
|
||||
; Stack argument before register argument
|
||||
sig4 = (f32 [72], i32 [%x10]) native
|
||||
; check: sig4 = (f32 [72], i32 [%x10]) native
|
||||
sig4 = (f32 [72], i32 [%x10]) system_v
|
||||
; check: sig4 = (f32 [72], i32 [%x10]) system_v
|
||||
|
||||
; Return value on stack
|
||||
sig5 = () -> f32 [0] native
|
||||
; check: sig5 = () -> f32 [0] native
|
||||
sig5 = () -> f32 [0] system_v
|
||||
; check: sig5 = () -> f32 [0] system_v
|
||||
|
||||
; function + signature
|
||||
fn0 = function %bar(i32 [%x10]) -> b1 [%x10] native
|
||||
; check: sig6 = (i32 [%x10]) -> b1 [%x10] native
|
||||
fn0 = function %bar(i32 [%x10]) -> b1 [%x10] system_v
|
||||
; check: sig6 = (i32 [%x10]) -> b1 [%x10] system_v
|
||||
; nextln: fn0 = sig6 %bar
|
||||
|
||||
ebb0(v0: i32):
|
||||
|
||||
Reference in New Issue
Block a user