* 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
37 lines
1.2 KiB
Plaintext
37 lines
1.2 KiB
Plaintext
; Test the parser's support for encoding annotations.
|
|
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] {
|
|
|
|
sig0 = signature(i32 [%x10]) -> i32 [%x10]
|
|
; check: sig0 = signature(i32 [%x10]) -> i32 [%x10]
|
|
|
|
sig1 = signature(i32 [%x10], i32 [%x11]) -> b1 [%x10]
|
|
; check: sig1 = signature(i32 [%x10], i32 [%x11]) -> b1 [%x10]
|
|
|
|
sig2 = signature(f32 [%f10], i32 [%x12], i32 [%x13]) -> f64 [%f10]
|
|
; check: sig2 = signature(f32 [%f10], i32 [%x12], i32 [%x13]) -> f64 [%f10]
|
|
|
|
; Arguments on stack where not necessary
|
|
sig3 = signature(f64 [%f10], i32 [0], i32 [4]) -> f64 [%f10]
|
|
; check: sig3 = signature(f64 [%f10], i32 [0], i32 [4]) -> f64 [%f10]
|
|
|
|
; Stack argument before register argument
|
|
sig4 = signature(f32 [72], i32 [%x10])
|
|
; check: sig4 = signature(f32 [72], i32 [%x10])
|
|
|
|
; Return value on stack
|
|
sig5 = signature() -> f32 [0]
|
|
; check: sig5 = signature() -> f32 [0]
|
|
|
|
; function + signature
|
|
fn15 = function %bar(i32 [%x10]) -> b1 [%x10]
|
|
; check: sig6 = signature(i32 [%x10]) -> b1 [%x10]
|
|
; nextln: fn0 = sig6 %bar
|
|
|
|
ebb0(v0: i32):
|
|
return v0
|
|
}
|