diff options
| author | Drahflow <drahflow@gmx.de> | 2013-03-01 16:21:10 +0100 |
|---|---|---|
| committer | Drahflow <drahflow@gmx.de> | 2013-03-01 16:21:10 +0100 |
| commit | d20e7ed28f46e40ce02ee34403e2f3166daa95ff (patch) | |
| tree | f9930032d1ecf28489b121179da7a43ed657f8ba | |
| parent | 13ac51a7ba381fc02994b5b9580f7c6e755256ad (diff) | |
Correct handling length-divisible-by-8-strings
| -rw-r--r-- | compiler/elymasAsmLib.ey | 14 |
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 |
