diff options
| author | Drahflow <drahflow@gmx.de> | 2013-10-22 22:54:11 +0200 |
|---|---|---|
| committer | Drahflow <drahflow@gmx.de> | 2013-10-22 22:54:11 +0200 |
| commit | 1ed4d0703d433fb44fc9a38dc8a0a190a1aac54b (patch) | |
| tree | 2d0c20d2b99d999739f3c0a49f241c21fc3e63bb /compiler | |
| parent | 36db2558acb7fee6f4e575963b340bdd76143045 (diff) | |
Optimizations
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/elymasGlobal.ey | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/compiler/elymasGlobal.ey b/compiler/elymasGlobal.ey index 9ba92c9..cca3ad6 100644 --- a/compiler/elymasGlobal.ey +++ b/compiler/elymasGlobal.ey @@ -1869,6 +1869,19 @@ # /r15 -> first part # 8 /r15 -> second part + # check loop parts for being functions + /r15 /rsi :movqMemReg + 7 /rsi /cl :movbMemDisp8Reg + %F0 /cl :andbImmReg + %50 /cl :cmpbImmReg + /loop :jnzLbl8 + 8 /r15 /rdi :movqMemDisp8Reg + 7 /rdi /cl :movbMemDisp8Reg + %F0 /cl :andbImmReg + %50 /cl :cmpbImmReg + /loop :jnzLbl8 + /functionLoop :jmpLbl8 + @loop /r15 :pushqMem |ey* /rax :movqImmReg @@ -1891,6 +1904,41 @@ /r15 :pushqMem 8 /r15 :addqImm8Reg :retn + + @functionLoop + # check loop parts for being non-typed + 16 /rsi /rax :movqMemDisp8Reg + 16 /rdi /rax :orqMemDisp8Reg + /nonTypedLoop :jzLbl8 + /loop :jmpLbl8 # TODO: maybe put a faster version here one day + + @nonTypedLoop + # check loop parts for being non-capturing + 8 /rsi /rax :movqMemDisp8Reg + 8 /rdi /rax :orqMemDisp8Reg + /nonCapturingLoopEntry :jzLbl8 + /loop :jmpLbl8 # TODO: here should follow a significantly faster version already + + @nonCapturingLoopEntry + 24 /rsi /rsi :movqMemDisp8Reg + 24 /rdi /rdi :movqMemDisp8Reg + 16 /rsi :addqImm8Reg + 16 /rdi :addqImm8Reg + /rsi /r15 :movqRegMem + /rdi 8 /r15 :movqRegMemDisp8 + + @nonCapturingLoop + /r15 /rax :movqMemReg + /rax :callqReg + + /rax :popqReg + /rax ::unboxInteger + /rax /rax :testqRegReg + /end :jzLbl8 + + 8 /r15 /rax :movqMemDisp8Reg + /rax :callqReg + /nonCapturingLoop :jmpLbl8 ]] /eyloop defv # a foreach loop |
