diff options
| author | Andrew Chambers <[email protected]> | 2021-10-16 02:07:56 +1300 |
|---|---|---|
| committer | Andrew Chambers <[email protected]> | 2021-10-16 02:07:56 +1300 |
| commit | 490cb559cc4713b43d38c5667e56abc2f52973f9 (patch) | |
| tree | 808edd96ed4d84334953e5ca04972fd6d94115a8 /asm.peg | |
| parent | e45f7325b6104396676deedfe203833a52a11b18 (diff) | |
Add instructions and refactor.
Diffstat (limited to 'asm.peg')
| -rw-r--r-- | asm.peg | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -31,7 +31,7 @@ directive = | "byte" ws v:value { $$.dirbyte = (Byte){.kind = ASM_DIR_BYTE, .value = v.value }; } | "short" ws v:value - { $$.dirshort = (Short){.kind = ASM_DIR_BYTE, .value = v.value }; } + { $$.dirshort = (Short){.kind = ASM_DIR_SHORT, .value = v.value }; } | "int" ws v:value { $$.dirint = (Int){.kind = ASM_DIR_INT, .value = v.value }; } | "quad" ws v:value @@ -115,6 +115,7 @@ instr = # Floating point is less common, so check last. | i:addss { $$ = i; } | i:addsd { $$ = i; } + | i:divss { $$ = i; } | i:divsd { $$ = i; } | i:pxor { $$ = i; } | i:xorpd { $$ = i; } @@ -489,6 +490,11 @@ divsd = "divsd" ( | ws s:mem ws? ',' ws? d:xmm { $$ = INSTR2(1, s, d); } ) { $$.instr.kind = ASM_DIVSD; } +divss = "divss" ( + ws s:xmm ws? ',' ws? d:xmm { $$ = INSTR2(0, s, d); } + | ws s:mem ws? ',' ws? d:xmm { $$ = INSTR2(1, s, d); } +) { $$.instr.kind = ASM_DIVSS; } + movaps = "movaps" ( ws s:xmm ws? ',' ws? d:xmm { $$ = INSTR2(0, s, d); } | ws s:mem ws? ',' ws? d:xmm { $$ = INSTR2(1, s, d); } |
