Move constant instructions into meta.

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.
This commit is contained in:
Jakob Stoklund Olesen
2016-03-31 14:18:02 -07:00
parent a2db4b680e
commit ad07f67331
5 changed files with 87 additions and 30 deletions

View File

@@ -23,7 +23,7 @@ class CretonneLexer(RegexLexer):
# Numbers.
(r'[-+]?0[xX][0-9a-fA-F]+', Number.Hex),
(r'[-+]?0[xX][0-9a-fA-F]*\.[0-9a-fA-F]*([pP]\d+)?', Number.Hex),
(r'[-+]?\d+\.\d+([eE]\d+)?', Number.Float),
(r'[-+]?(\d+\.\d+([eE]\d+)?|[sq]NaN|Inf)', Number.Float),
(r'[-+]?\d+', Number.Integer),
# Reserved words.
(keywords('function', 'entry'), Keyword),