aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrahflow <drahflow@gmx.de>2015-06-17 14:30:20 +0200
committerDrahflow <drahflow@gmx.de>2015-06-17 14:30:20 +0200
commitc81b7f3d3fcc6eb37933e141d851ac58e53c63cd (patch)
treef40c8aea25751aa20bc27b494e139563bc2a615f
parent35791f772740ea9b8a5772f8110a1e3ea33a34d7 (diff)
Killed some instructions on the hot path
-rw-r--r--compiler/elymasAsmLib.ey14
-rw-r--r--compiler/elymasAsmOps.ey3
2 files changed, 8 insertions, 9 deletions
diff --git a/compiler/elymasAsmLib.ey b/compiler/elymasAsmLib.ey
index e193111..9219c5d 100644
--- a/compiler/elymasAsmLib.ey
+++ b/compiler/elymasAsmLib.ey
@@ -457,11 +457,7 @@
/rdi :pushqReg
markAndSweepCosts /rax :movqImmReg
- /rax /rdx :movqMemReg
- /rdx /rdx :testqRegReg
- /costAlreadyZero :jzLbl8
- 1 /rax :subqImm8Mem
- @costAlreadyZero
+ 1 /rax :addqImm8Mem
/searchForFreeBlock :callqLbl32
/rax /rax :andqRegReg
@@ -470,11 +466,9 @@
markAndSweepCosts /rax :movqImmReg
MARKANDSWEEPCOST /rdx :movqImmReg
- /rdx /rax :addqRegMem
-
- MARKANDSWEEPCOST 16 add /rdx :movqImmReg
/rdx /rax :cmpqRegMem
- /allocateFromSystemAtLeastOnce :jaeLbl8
+ /allocateFromSystemAtLeastOnce :jbLbl8
+ 0 /rax :andqImm8Mem
@allocateFromSystemLoop
/rdi :popqReg
@@ -484,6 +478,8 @@
/success :jnzLbl32
@allocateFromSystemAtLeastOnce
+ markAndSweepCosts /rax :movqImmReg
+ 0 /rax :andqImm8Mem
/allocateFromSystem :callqLbl32
/allocateFromSystemLoop :jmpLbl8
diff --git a/compiler/elymasAsmOps.ey b/compiler/elymasAsmOps.ey
index 0a8c5f6..06efb82 100644
--- a/compiler/elymasAsmOps.ey
+++ b/compiler/elymasAsmOps.ey
@@ -1461,6 +1461,9 @@ memoryAddressingVariants keys { ==variant memoryAddressingVariants variant . =*p
%AB
} /stosq deff
+/sbb %19 defAsmAddq
+/sbb /three defAsmAddImm
+
{ ==reg ==mem
reg bit32assert
mem bit64assert