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:
committed by
Jakob Stoklund Olesen
parent
2f33848fcd
commit
706eef23d3
@@ -4,7 +4,7 @@ isa riscv supports_m=1
|
||||
|
||||
; regex: V=v\d+
|
||||
|
||||
function bitwise_and(i64, i64) -> i64 {
|
||||
function %bitwise_and(i64, i64) -> i64 {
|
||||
ebb0(v1: i64, v2: i64):
|
||||
v3 = band v1, v2
|
||||
return v3
|
||||
@@ -17,7 +17,7 @@ ebb0(v1: i64, v2: i64):
|
||||
; check: $v3 = iconcat $v3l, $v3h
|
||||
; check: return $v3l, $v3h, $link
|
||||
|
||||
function bitwise_or(i64, i64) -> i64 {
|
||||
function %bitwise_or(i64, i64) -> i64 {
|
||||
ebb0(v1: i64, v2: i64):
|
||||
v3 = bor v1, v2
|
||||
return v3
|
||||
@@ -30,7 +30,7 @@ ebb0(v1: i64, v2: i64):
|
||||
; check: $v3 = iconcat $v3l, $v3h
|
||||
; check: return $v3l, $v3h, $link
|
||||
|
||||
function bitwise_xor(i64, i64) -> i64 {
|
||||
function %bitwise_xor(i64, i64) -> i64 {
|
||||
ebb0(v1: i64, v2: i64):
|
||||
v3 = bxor v1, v2
|
||||
return v3
|
||||
@@ -43,7 +43,7 @@ ebb0(v1: i64, v2: i64):
|
||||
; check: $v3 = iconcat $v3l, $v3h
|
||||
; check: return $v3l, $v3h, $link
|
||||
|
||||
function arith_add(i64, i64) -> i64 {
|
||||
function %arith_add(i64, i64) -> i64 {
|
||||
; Legalizing iadd.i64 requires two steps:
|
||||
; 1. Narrow to iadd_cout.i32, then
|
||||
; 2. Expand iadd_cout.i32 since RISC-V has no carry flag.
|
||||
|
||||
Reference in New Issue
Block a user