1 # Based on arch_xtensa, but simplifies for usage in adhoc tests.
2 from core
import ADDR
, REG
3 from archutils
import *
9 ALL_REGS
= {REG("a0"), REG("sp")} |
reg_range("a", 2, 15)
12 def call_params(addr
):
13 return reg_range("a", 2, 7)
16 def param_filter(regs
):
21 return reg_range("a", 2, 5)
26 return regs
& reg_range("a", 2, 5)
30 return reg_range("a", 12, 15) |
{REG("sp")}
34 return call_ret(addr
) |
(ALL_REGS
- call_save(addr
))
38 # a0 contains return address
39 # sp should be preserved across call, but we'll check that using sp0 pseudo-reg.
40 #return {REG("a0"), REG("sp")}