Merge branch 'master' of git://factorcode.org/git/factor
commit
c9f041f79d
basis/cpu/x86
extra/benchmark
|
@ -10,6 +10,7 @@ IN: bootstrap.x86
|
|||
: shift-arg ( -- reg ) ECX ;
|
||||
: div-arg ( -- reg ) EAX ;
|
||||
: mod-arg ( -- reg ) EDX ;
|
||||
: arg ( -- reg ) EAX ;
|
||||
: temp0 ( -- reg ) EAX ;
|
||||
: temp1 ( -- reg ) EDX ;
|
||||
: temp2 ( -- reg ) ECX ;
|
||||
|
|
|
@ -5,6 +5,7 @@ cpu.x86.assembler layouts vocabs parser ;
|
|||
IN: bootstrap.x86
|
||||
|
||||
: stack-frame-size ( -- n ) 4 bootstrap-cells ;
|
||||
: arg ( -- reg ) RDI ;
|
||||
|
||||
<< "resource:basis/cpu/x86/64/bootstrap.factor" parse-file parsed >>
|
||||
call
|
||||
|
|
|
@ -5,6 +5,7 @@ cpu.x86.assembler layouts vocabs parser ;
|
|||
IN: bootstrap.x86
|
||||
|
||||
: stack-frame-size ( -- n ) 8 bootstrap-cells ;
|
||||
: arg ( -- reg ) RCX ;
|
||||
|
||||
<< "resource:basis/cpu/x86/64/bootstrap.factor" parse-file parsed >>
|
||||
call
|
||||
|
|
|
@ -162,11 +162,11 @@ big-endian off
|
|||
! Quotations and words
|
||||
[
|
||||
! load from stack
|
||||
temp0 ds-reg [] MOV
|
||||
arg ds-reg [] MOV
|
||||
! pop stack
|
||||
ds-reg bootstrap-cell SUB
|
||||
! call quotation
|
||||
temp0 quot-xt-offset [+] JMP
|
||||
arg quot-xt-offset [+] JMP
|
||||
] f f f \ (call) define-sub-primitive
|
||||
|
||||
[
|
||||
|
|
|
@ -6,8 +6,10 @@ continuations debugger math ;
|
|||
IN: benchmark
|
||||
|
||||
: run-benchmark ( vocab -- result )
|
||||
[ [ require ] [ [ run ] benchmark ] bi ] curry
|
||||
[ error. f ] recover ;
|
||||
[ "=== " write vocab-name print flush ] [
|
||||
[ [ require ] [ [ run ] benchmark ] bi ] curry
|
||||
[ error. f ] recover
|
||||
] bi ;
|
||||
|
||||
: run-benchmarks ( -- assoc )
|
||||
"benchmark" all-child-vocabs-seq
|
||||
|
|
Loading…
Reference in New Issue