From bb395ab8e0cdacb6b381f576ff4cae431290da19 Mon Sep 17 00:00:00 2001 From: Drahflow Date: Wed, 17 Jun 2015 17:30:16 +0200 Subject: If strings reside at the same address, they are eq --- compiler/elymasAsmLib.ey | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'compiler') 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 -- cgit v1.2.3