aboutsummaryrefslogtreecommitdiff
path: root/asm.peg
diff options
context:
space:
mode:
authorAndrew Chambers <[email protected]>2021-10-15 18:08:21 +1300
committerAndrew Chambers <[email protected]>2021-10-15 18:08:21 +1300
commitb457444efaa0afcdb41601ca86a10bb81bbbd8c1 (patch)
tree51687407d150861b4cdec2b2d84de5acbae5c438 /asm.peg
parentbd5990843a77278a8f7e205131e42f89463225f4 (diff)
Add movq.
Diffstat (limited to 'asm.peg')
-rw-r--r--asm.peg8
1 files changed, 8 insertions, 0 deletions
diff --git a/asm.peg b/asm.peg
index b2dbaae..a2e90b1 100644
--- a/asm.peg
+++ b/asm.peg
@@ -77,6 +77,7 @@ instr =
| i:mul { $$ = i; }
# Less common, but we have already checked for 'm'
| i:movaps { $$ = i; }
+ | i:movq { $$ = i; }
| i:movsd { $$ = i; }
| i:movss { $$ = i; }
| i:mulsd { $$ = i; }
@@ -492,6 +493,13 @@ movsd = "movsd" (
| ws s:xmm ws? ',' ws? d:mem { $$ = INSTR2(2, s, d); }
) { $$.instr.kind = ASM_MOVSD; }
+movq = "mov" (
+ 'q'? ws s:xmm ws? ',' ws? d:r64 { $$ = INSTR2(0, s, d); }
+ | 'q'? ws s:r64 ws? ',' ws? d:xmm { $$ = INSTR2(1, s, d); }
+ | 'q' ws s:xmm ws? ',' ws? d:mem { $$ = INSTR2(2, s, d); }
+ | 'q' ws s:mem ws? ',' ws? d:xmm { $$ = INSTR2(3, s, d); }
+) { $$.instr.kind = ASM_MOVQ; }
+
ucomiss = "ucomiss" (
ws s:xmm ws? ',' ws? d:xmm { $$ = INSTR2(0, s, d); }
| ws s:mem ws? ',' ws? d:xmm { $$ = INSTR2(1, s, d); }