Files
wasmtime/filetests/isa/riscv/abi.cton
Aleksey Kuznetsov 8b484b1c77 Binary function names (#91)
* Function names should start with %

* Create FunctionName from string

* Implement displaying of FunctionName as %nnnn with fallback to #xxxx

* Run rustfmt and fix FunctionName::with_string in parser

* Implement FunctionName::new as a generic function

* Binary function names should start with #

* Implement NameRepr for function name

* Fix examples in docs to reflect that function names start with %

* Rebase and fix filecheck tests
2017-06-10 10:30:37 -07:00

33 lines
1.1 KiB
Plaintext

; Test the legalization of function signatures.
test legalizer
isa riscv
; regex: V=v\d+
function %f() {
sig0 = signature(i32) -> i32
; check: sig0 = signature(i32 [%x10]) -> i32 [%x10]
sig1 = signature(i64) -> b1
; check: sig1 = signature(i32 [%x10], i32 [%x11]) -> b1 [%x10]
; The i64 argument must go in an even-odd register pair.
sig2 = signature(f32, i64) -> f64
; check: sig2 = signature(f32 [%f10], i32 [%x12], i32 [%x13]) -> f64 [%f10]
; Spilling into the stack args.
sig3 = signature(f64, f64, f64, f64, f64, f64, f64, i64) -> f64
; check: sig3 = signature(f64 [%f10], f64 [%f11], f64 [%f12], f64 [%f13], f64 [%f14], f64 [%f15], f64 [%f16], i32 [0], i32 [4]) -> f64 [%f10]
; Splitting vectors.
sig4 = signature(i32x4)
; check: sig4 = signature(i32 [%x10], i32 [%x11], i32 [%x12], i32 [%x13])
; Splitting vectors, then splitting ints.
sig5 = signature(i64x4)
; check: sig5 = signature(i32 [%x10], i32 [%x11], i32 [%x12], i32 [%x13], i32 [%x14], i32 [%x15], i32 [%x16], i32 [%x17])
ebb0:
return
}