Python 3 compat.
Try to keep our Python sources compatible with both Python 2.7 and 3. Check with 'pylint --py3k' and 'python -3'.
This commit is contained in:
@@ -5,7 +5,7 @@ Cretonne target ISA definitions
|
||||
The :py:mod:`isa` package contains sub-packages for each target instruction set
|
||||
architecture supported by Cretonne.
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
from . import riscv
|
||||
|
||||
|
||||
|
||||
@@ -24,10 +24,10 @@ RV32G / RV64G
|
||||
F, and D instruction sets listed above.
|
||||
|
||||
"""
|
||||
|
||||
import defs
|
||||
import encodings
|
||||
import settings
|
||||
from __future__ import absolute_import
|
||||
from . import defs
|
||||
from . import encodings
|
||||
from . import settings
|
||||
|
||||
# Re-export the primary target ISA definition.
|
||||
isa = defs.isa
|
||||
|
||||
@@ -3,7 +3,7 @@ RISC-V definitions.
|
||||
|
||||
Commonly used definitions.
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
from cretonne import TargetISA, CPUMode
|
||||
import cretonne.base
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
"""
|
||||
RISC-V Encodings.
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
from cretonne import base
|
||||
from defs import RV32, RV64
|
||||
from recipes import OPIMM, OPIMM32, OP, OP32, R, Rshamt
|
||||
from .defs import RV32, RV64
|
||||
from .recipes import OPIMM, OPIMM32, OP, OP32, R, Rshamt
|
||||
|
||||
# Basic arithmetic binary instructions are encoded in an R-type instruction.
|
||||
for inst, f3, f7 in [
|
||||
|
||||
@@ -8,6 +8,7 @@ instruction formats described in the reference:
|
||||
Volume I: User-Level ISA
|
||||
Version 2.1
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
from cretonne import EncRecipe
|
||||
from cretonne.formats import Binary, BinaryImm
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
"""
|
||||
RISC-V settings.
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
from cretonne import SettingGroup, BoolSetting
|
||||
from cretonne.predicates import And
|
||||
import cretonne.settings as shared
|
||||
from defs import isa
|
||||
from .defs import isa
|
||||
|
||||
isa.settings = SettingGroup('riscv', parent=shared.group)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user