Add a TargetIsa::allocatable_registers() method.
This gives the target ISA a chance to reserve registers like the stack pointer or hard-wired 0 registers like %x0 on RISC-V.
This commit is contained in:
@@ -6,7 +6,8 @@ isa riscv
|
||||
function add(i32, i32) {
|
||||
ebb0(v1: i32, v2: i32):
|
||||
v3 = iadd v1, v2
|
||||
; check: [R#0c,%x0]
|
||||
; TODO: This shouldn't clobber the link register.
|
||||
; check: [R#0c,%x1]
|
||||
; sameln: iadd
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user