Add two new value types: iflags and fflags.
These two value types represent the state of CPU flags after an integer comparison and a floating point comparison respectively. Instructions using these types TBD.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
The base.types module predefines all the Cretonne scalar types.
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
from cdsl.types import IntType, FloatType, BoolType
|
||||
from cdsl.types import IntType, FloatType, BoolType, FlagsType
|
||||
|
||||
#: Boolean.
|
||||
b1 = BoolType(1) #: 1-bit bool. Type is abstract (can't be stored in mem)
|
||||
@@ -31,3 +31,16 @@ f64 = FloatType(
|
||||
*binary64* interchange format. This corresponds to the :c:type:`double`
|
||||
type in most C implementations.
|
||||
""")
|
||||
#: CPU flags from an integer comparison.
|
||||
iflags = FlagsType(
|
||||
'iflags', """
|
||||
CPU flags representing the result of an integer comparison. These flags
|
||||
can be tested with an `intcc` condition code.
|
||||
""")
|
||||
|
||||
#: CPU flags from a floating point comparison.
|
||||
fflags = FlagsType(
|
||||
'fflags', """
|
||||
CPU flags representing the result of a floating point comparison. These
|
||||
flags can be tested with a `floatcc` condition code.
|
||||
""")
|
||||
|
||||
Reference in New Issue
Block a user