diff options
| author | Andrew Chambers <[email protected]> | 2021-10-19 16:15:49 +1300 |
|---|---|---|
| committer | Andrew Chambers <[email protected]> | 2021-10-19 16:15:49 +1300 |
| commit | 221b83997a22fc2abc2282d90763e0435943021c (patch) | |
| tree | 7e89cee98dad066e3d0de4204e21adead95c4dde /asm.peg | |
| parent | 375efafb6aeb486ff2b079e8464d4b746ba4f213 (diff) | |
Remove special case for call.
Diffstat (limited to 'asm.peg')
| -rw-r--r-- | asm.peg | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -134,11 +134,12 @@ instr = call = "call" 'q'? ws ( '*' t:mem - { $$.call = (Call){ .kind = ASM_CALL, .target.indirect=internparsev(&t), .indirect=1 } ; } + { $$ = OPMEM({.w=0}, -1, 0xff, 0x02, t); } | '*' t:r64 - { $$.call = (Call){ .kind = ASM_CALL, .target.indirect=internparsev(&t), .indirect=1 } ; } + { $$ = OPREG({.w=0}, -1, 0xff, 0x02, t); } | t:value - { $$.call = (Call){ .kind = ASM_CALL, .target.direct=t.value, .indirect=0 } ; } + { Parsev ma = (Parsev){.memarg = (Memarg) {.kind=ASM_MEMARG, .disp = t.value }}; + $$ = RELCALL({.w=0}, -1, 0xe8, ma); } ) jmp = 'j' v:jmp-variant ws t:ident |
