Add stubs for Intel and ARM architectures.

The Intel ISA handles both 32-bit and 64-bit code.

ARM is split into separate arm32 and arm64 ISAs since the architectures
have little in common in instruction encodings and register files.
This commit is contained in:
Jakob Stoklund Olesen
2016-11-11 11:27:29 -08:00
parent 856b8c99aa
commit 77c672a279
7 changed files with 88 additions and 2 deletions

View File

@@ -0,0 +1,13 @@
"""
ARM 32-bit Architecture
----------------------
This target ISA generates code for ARMv7 and ARMv8 CPUs in 32-bit mode
(AArch32). We support both ARM and Thumb2 instruction encodings.
"""
from __future__ import absolute_import
from . import defs
# Re-export the primary target ISA definition.
ISA = defs.ISA.finish()

View File

@@ -0,0 +1,14 @@
"""
ARM 32-bit definitions.
Commonly used definitions.
"""
from __future__ import absolute_import
from cdsl.isa import TargetISA, CPUMode
import base.instructions
ISA = TargetISA('arm32', [base.instructions.GROUP])
# CPU modes for 32-bit ARM and Thumb2.
A32 = CPUMode('A32', ISA)
T32 = CPUMode('T32', ISA)