aboutsummaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorDrahflow <drahflow@gmx.de>2015-06-17 17:30:16 +0200
committerDrahflow <drahflow@gmx.de>2015-06-17 17:30:16 +0200
commitbb395ab8e0cdacb6b381f576ff4cae431290da19 (patch)
tree791812c4b9a44b4ed850a6132aea2a9ccc3adc04 /compiler
parent58fdd254cedd61ab2a4a52b77010751c01e9c46a (diff)
If strings reside at the same address, they are eq
Diffstat (limited to 'compiler')
-rw-r--r--compiler/elymasAsmLib.ey7
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/elymasAsmLib.ey b/compiler/elymasAsmLib.ey
index 0e94b07..2075c74 100644
--- a/compiler/elymasAsmLib.ey
+++ b/compiler/elymasAsmLib.ey
@@ -1288,6 +1288,9 @@
# rsi -> second string
# rax <- 1 if both strings are equal, 0 otherwise
[[
+ /rdi /rsi :cmpqRegReg
+ /identical :jzLbl8
+
# compare lengths
16 /rdi /rax :movqMemDisp8Reg
16 /rsi /rax :cmpqMemDisp8Reg
@@ -1335,6 +1338,10 @@
@different
/rax /rax :xorqRegReg
:retn
+
+ @identical
+ 1 /rax :movqImmReg
+ :retn
]] /internalCompareString defv
> { defv }' allocateOffsetStruct