Define register banks.
Add a RegBank class for describing CPU register banks. Define register banks for all the ISA stubs. The ARM32 floating point bank in particular requires attention.
This commit is contained in:
29
lib/cretonne/meta/isa/arm32/registers.py
Normal file
29
lib/cretonne/meta/isa/arm32/registers.py
Normal file
@@ -0,0 +1,29 @@
|
||||
"""
|
||||
ARM32 register banks.
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
from cdsl.registers import RegBank
|
||||
from .defs import ISA
|
||||
|
||||
|
||||
# Special register units:
|
||||
# - r15 is the program counter.
|
||||
# - r14 is the link register.
|
||||
# - r13 is usually the stack pointer.
|
||||
IntRegs = RegBank(
|
||||
'IntRegs', ISA,
|
||||
'General purpose registers',
|
||||
units=16, prefix='r')
|
||||
|
||||
FloatRegs = RegBank(
|
||||
'FloatRegs', ISA, r"""
|
||||
Floating point registers.
|
||||
|
||||
The floating point register units correspond to the S-registers, but
|
||||
extended as if there were 64 registers.
|
||||
|
||||
- S registers are one unit each.
|
||||
- D registers are two units each, even D16 and above.
|
||||
- Q registers are 4 units each.
|
||||
""",
|
||||
units=64, prefix='s')
|
||||
Reference in New Issue
Block a user