aboutsummaryrefslogtreecommitdiff
path: root/compiler/elymasGlobalStr.ey
diff options
context:
space:
mode:
authorDrahflow <drahflow@gmx.de>2013-12-28 17:41:33 +0100
committerDrahflow <drahflow@gmx.de>2013-12-28 17:41:33 +0100
commitd245b90de88b762f65a5007c1776206dc7cd72dc (patch)
tree342e65618ef54cf788a10fd8e64ebd52579a5f25 /compiler/elymasGlobalStr.ey
parente57558ebe4635cb0183f94c50f9f61e8603807ff (diff)
Reducing memory footprint
Diffstat (limited to 'compiler/elymasGlobalStr.ey')
-rw-r--r--compiler/elymasGlobalStr.ey7
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/elymasGlobalStr.ey b/compiler/elymasGlobalStr.ey
index d6d395b..be0b65d 100644
--- a/compiler/elymasGlobalStr.ey
+++ b/compiler/elymasGlobalStr.ey
@@ -242,8 +242,12 @@
/rcx :popqReg # number of characters to copy
/rsi :popqReg
- 8 /rsi :addqImm8Reg # move rsi to first array entry
/rax :pushqReg # store target string on stack
+
+ /rcx /rcx :testqRegReg
+ /emptyArray :jzLbl8
+
+ 8 /rsi :addqImm8Reg # move rsi to first array entry
24 /rax :addqImm8Reg # move rax to first string byte
@copyByte
@@ -255,6 +259,7 @@
/rax :incqReg
/copyByte :loopLbl8
+ @emptyArray
/rbx :pushqReg
:retn
]] /eyfromArray defv