Prefer recording loops over calls.

Hotcounts are decremented by 2 for loops and by 1 for calls.
This commit is contained in:
Mike Pall
2011-06-29 01:51:39 +02:00
parent deeb8196c4
commit 82eca898db
10 changed files with 151 additions and 141 deletions

View File

@@ -333,16 +333,16 @@
| mov reg, PC
| shr reg, 1
| and reg, HOTCOUNT_PCMASK
| sub word [DISPATCH+reg+GG_DISP2HOT], 1
| jz ->vm_hotloop
| sub word [DISPATCH+reg+GG_DISP2HOT], HOTCOUNT_LOOP
| jb ->vm_hotloop
|.endmacro
|
|.macro hotcall, reg
| mov reg, PC
| shr reg, 1
| and reg, HOTCOUNT_PCMASK
| sub word [DISPATCH+reg+GG_DISP2HOT], 1
| jz ->vm_hotcall
| sub word [DISPATCH+reg+GG_DISP2HOT], HOTCOUNT_CALL
| jb ->vm_hotcall
|.endmacro
|
|// Set current VM state.