aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compiler/elymasAsmLib.ey14
1 files changed, 8 insertions, 6 deletions
diff --git a/compiler/elymasAsmLib.ey b/compiler/elymasAsmLib.ey
index 6a95ee6..b9fe20b 100644
--- a/compiler/elymasAsmLib.ey
+++ b/compiler/elymasAsmLib.ey
@@ -469,12 +469,14 @@
exactLength /rdx :movqImmReg
/rdx /rax :movqRegMem
- # load string contents
- 0 exactLength 8 div range { 8 mul ==i
- 8 /rax :addqImm8Reg
- /rdx :movqImmOOBReg i _ 7 add range v 8 dearray
- /rdx /rax :movqRegMem
- } each
+ exactLength 0 neq {
+ # load string contents
+ 0 exactLength 1 sub 8 div range { 8 mul ==i
+ 8 /rax :addqImm8Reg
+ /rdx :movqImmOOBReg i _ 7 add range v 8 dearray
+ /rdx /rax :movqRegMem
+ } each
+ } rep
]
} /constStringCode deff