aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorAndrew Chambers <[email protected]>2021-10-12 22:20:39 +1300
committerAndrew Chambers <[email protected]>2021-10-12 22:20:39 +1300
commit3a203ec645f411c5f7b3cecca446262c3638c341 (patch)
tree5e1a76d736f8fda4a596135ad90d41a388ebad97 /main.c
parent974e600961c849e552433756fe3c2c69f1b3677a (diff)
Fix sqlite3 assembly.
Diffstat (limited to 'main.c')
-rw-r--r--main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main.c b/main.c
index a36250a..fc56947 100644
--- a/main.c
+++ b/main.c
@@ -498,9 +498,9 @@ static void assemblemem(Memarg *memarg, uint8_t rexw, VarBytes prefix,
if (memarg->index == ASM_NO_REG) {
index = 4;
} else {
+ if (memarg->index == ASM_RSP)
+ lfatal("rsp cannot be used as an index");
index = regbits(memarg->index);
- if ((index & 7) == 4)
- lfatal("sp cannot be used as an index");
}
/* If our base is a bp register, we must use the index instead. */