moved crates in lib/ to src/, renamed crates, modified some files' text (#660)
moved crates in lib/ to src/, renamed crates, modified some files' text (#660)
This commit is contained in:
23
cranelift/codegen/meta-python/isa/riscv/registers.py
Normal file
23
cranelift/codegen/meta-python/isa/riscv/registers.py
Normal file
@@ -0,0 +1,23 @@
|
||||
"""
|
||||
RISC-V register banks.
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
from cdsl.registers import RegBank, RegClass
|
||||
from .defs import ISA
|
||||
|
||||
|
||||
# We include `x0`, a.k.a `zero` in the register bank. It will be reserved.
|
||||
IntRegs = RegBank(
|
||||
'IntRegs', ISA,
|
||||
'General purpose registers',
|
||||
units=32, prefix='x')
|
||||
|
||||
FloatRegs = RegBank(
|
||||
'FloatRegs', ISA,
|
||||
'Floating point registers',
|
||||
units=32, prefix='f')
|
||||
|
||||
GPR = RegClass(IntRegs)
|
||||
FPR = RegClass(FloatRegs)
|
||||
|
||||
RegClass.extract_names(globals())
|
||||
Reference in New Issue
Block a user