Add new immediate types for floating point and vector immediates. Use new immediates to define the constant value instructions in meta. Split the fconst instruction into two: f32const and f64const. This prevents confusion about the interpretation of 64 immediate bits when generating an f32 constant. Add an immvector ImmediateType. This immediate type is variable length, and provides all the bits of a SIMD vector directly.
26 lines
785 B
Python
26 lines
785 B
Python
"""
|
|
The cretonne.immdiates module predefines all the Cretonne immediate operand
|
|
types.
|
|
"""
|
|
|
|
from . import ImmediateType
|
|
|
|
#: A 64-bit immediate integer operand.
|
|
#:
|
|
#: This type of immediate integer can interact with SSA values with any
|
|
#: :py:class:`cretonne.IntType` type.
|
|
imm64 = ImmediateType('imm64', 'A 64-bit immediate integer.')
|
|
|
|
#: A 32-bit immediate floating point operand.
|
|
#:
|
|
#: IEEE 754-2008 binary32 interchange format.
|
|
ieee32 = ImmediateType('ieee32', 'A 32-bit immediate floating point number.')
|
|
|
|
#: A 64-bit immediate floating point operand.
|
|
#:
|
|
#: IEEE 754-2008 binary64 interchange format.
|
|
ieee64 = ImmediateType('ieee64', 'A 64-bit immediate floating point number.')
|
|
|
|
#: A large SIMD vector constant.
|
|
immvector = ImmediateType('immvector', 'An immediate SIMD vector.')
|