aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Chambers <[email protected]>2021-10-11 11:42:20 +1300
committerAndrew Chambers <[email protected]>2021-10-11 11:42:20 +1300
commitfb0ac681dd8d271799c6652b1e581572cf68a9c3 (patch)
treeb960df315437e86ddeaa3ed1780c43edc77a4cb9
parenteb7790fa6db6b15ac1867256369ac524cf9ce622 (diff)
Bug fixes.
-rw-r--r--asm.peg2
-rw-r--r--main.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/asm.peg b/asm.peg
index 6bd3553..742da11 100644
--- a/asm.peg
+++ b/asm.peg
@@ -249,7 +249,7 @@ mov = "mov" (
movsx = "movs" (
args:mov-extend-opargs { $$ = args; }
| 'lq' ws s:m ws? ',' ws? d:r64 { $$ = INSTR2(10, s, d); }
- | 'lq' ws s:r32 ws? ',' ws? d:r64 { $$ = INSTR2(10, s, d); }
+ | 'lq' ws s:r32 ws? ',' ws? d:r64 { $$ = INSTR2(11, s, d); }
) { $$.instr.kind = ASM_MOVSX; }
movzx = "movz" args:mov-extend-opargs { $$ = args; $$.instr.kind = ASM_MOVZX; }
diff --git a/main.c b/main.c
index 1b0f071..81f31fb 100644
--- a/main.c
+++ b/main.c
@@ -299,7 +299,7 @@ static void su64(uint32_t l) {
uint8_t buf[8] = {
l & 0xff,
(l & 0xff00) >> 8,
- (l & 0xff00) >> 16,
+ (l & 0xff0000) >> 16,
(l & 0xff000000) >> 24,
(l & 0xff00000000) >> 32,
(l & 0xff0000000000) >> 40,