Begin defining the meta language.

The Cretonne meta language is used to describe Cretonne instructions, both the
target independent ones in the base instruction set and real target
instructions.

Start by providing type definitions matching langref, and begin the meta
language reference using autodoc to pull in the PYthon definitions.
This commit is contained in:
Jakob Olesen
2016-02-04 17:25:32 -08:00
parent e337d19373
commit c459c11a5a
5 changed files with 141 additions and 0 deletions

20
meta/cretonne/types.py Normal file
View File

@@ -0,0 +1,20 @@
"""Predefined types."""
from . import ScalarType, IntType, FloatType
#: A boolean value.
bool = ScalarType('bool')
i8 = IntType(8) #: 8-bit int.
i16 = IntType(16) #: 16-bit int.
i32 = IntType(32) #: 32-bit int.
i64 = IntType(64) #: 64-bit int.
f32 = FloatType(32) #: IEEE 32-bit float.
f64 = FloatType(64) #: IEEE 64-bit float
i8x16 = i8.by(16) #: Vector of 16 i8 lanes.
f32x4 = f32.by(4) #: Vector of 4 f32 lanes.
f64x2 = f64.by(2) #: Vector of 2 f64 lanes.