This gives the target ISA a chance to reserve registers like the stack pointer or hard-wired 0 registers like %x0 on RISC-V.
14 lines
251 B
Plaintext
14 lines
251 B
Plaintext
test regalloc
|
|
|
|
; We can add more ISAs once they have defined encodings.
|
|
isa riscv
|
|
|
|
function add(i32, i32) {
|
|
ebb0(v1: i32, v2: i32):
|
|
v3 = iadd v1, v2
|
|
; TODO: This shouldn't clobber the link register.
|
|
; check: [R#0c,%x1]
|
|
; sameln: iadd
|
|
return
|
|
}
|