Fix profiler
parent
b7327b6228
commit
96f4f3ff40
|
@ -8,6 +8,7 @@ IN: bootstrap.x86
|
||||||
|
|
||||||
: arg0 EAX ;
|
: arg0 EAX ;
|
||||||
: arg1 EDX ;
|
: arg1 EDX ;
|
||||||
|
: temp-reg EBX ;
|
||||||
: stack-reg ESP ;
|
: stack-reg ESP ;
|
||||||
: ds-reg ESI ;
|
: ds-reg ESI ;
|
||||||
: fixnum>slot@ arg0 1 SAR ;
|
: fixnum>slot@ arg0 1 SAR ;
|
||||||
|
|
|
@ -13,15 +13,15 @@ big-endian off
|
||||||
|
|
||||||
[
|
[
|
||||||
! Load word
|
! Load word
|
||||||
arg0 0 [] MOV
|
temp-reg 0 [] MOV
|
||||||
! Bump profiling counter
|
! Bump profiling counter
|
||||||
arg0 profile-count-offset [+] 1 tag-fixnum ADD
|
temp-reg profile-count-offset [+] 1 tag-fixnum ADD
|
||||||
! Load word->code
|
! Load word->code
|
||||||
arg0 arg0 word-code-offset [+] MOV
|
temp-reg temp-reg word-code-offset [+] MOV
|
||||||
! Compute word XT
|
! Compute word XT
|
||||||
arg0 compiled-header-size ADD
|
temp-reg compiled-header-size ADD
|
||||||
! Jump to XT
|
! Jump to XT
|
||||||
arg0 JMP
|
temp-reg JMP
|
||||||
] rc-absolute-cell rt-literal 2 jit-profiling jit-define
|
] rc-absolute-cell rt-literal 2 jit-profiling jit-define
|
||||||
|
|
||||||
[
|
[
|
||||||
|
|
|
@ -46,8 +46,6 @@ void update_word_xt(F_WORD *word)
|
||||||
}
|
}
|
||||||
|
|
||||||
word->xt = (XT)(word->profiling + 1);
|
word->xt = (XT)(word->profiling + 1);
|
||||||
|
|
||||||
printf("%x\n",word->xt);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
word->xt = (XT)(word->code + 1);
|
word->xt = (XT)(word->code + 1);
|
||||||
|
|
Loading…
Reference in New Issue