Files
wasmtime/lib/codegen/meta/isa/x86/defs.py
Dan Gohman 846a71d93b Fixes for mypy 0.600 (#324)
* Remove the mypy version constraint and set strict_optional to False.

* Add type annotations for `ISA` variables.

mypy 0.600 seems to require explicit annotations here.

* Annotate the ISA variables in the defs.py files too.
2018-05-03 12:12:19 -07:00

29 lines
746 B
Python

"""
x86 definitions.
Commonly used definitions.
"""
from __future__ import absolute_import
from cdsl.isa import TargetISA, CPUMode
import base.instructions
from . import instructions as x86
from base.immediates import floatcc
ISA = TargetISA('x86', [base.instructions.GROUP, x86.GROUP]) # type: TargetISA
# CPU modes for 32-bit and 64-bit operation.
X86_64 = CPUMode('I64', ISA)
X86_32 = CPUMode('I32', ISA)
# The set of floating point condition codes that are directly supported.
# Other condition codes need to be reversed or expressed as two tests.
supported_floatccs = [
floatcc.ord,
floatcc.uno,
floatcc.one,
floatcc.ueq,
floatcc.gt,
floatcc.ge,
floatcc.ult,
floatcc.ule]