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
This commit is contained in:
Aleksey Kuznetsov
2017-06-10 22:30:37 +05:00
committed by Jakob Stoklund Olesen
parent 731278aad8
commit 8b484b1c77
41 changed files with 306 additions and 208 deletions

View File

@@ -9,7 +9,7 @@ isa riscv supports_m=1
; regex: V=v\d+
function carry_out(i32, i32) -> i32, b1 {
function %carry_out(i32, i32) -> i32, b1 {
ebb0(v1: i32, v2: i32):
v3, v4 = iadd_cout v1, v2
return v3, v4
@@ -20,7 +20,7 @@ ebb0(v1: i32, v2: i32):
; Expanding illegal immediate constants.
; Note that at some point we'll probably expand the iconst as well.
function large_imm(i32) -> i32 {
function %large_imm(i32) -> i32 {
ebb0(v0: i32):
v1 = iadd_imm v0, 1000000000
return v1