Merge git://factorcode.org/git/factor
commit
aa08a1f5f6
|
@ -17,7 +17,7 @@ IN: bootstrap.compiler
|
||||||
"cpu." cpu append require
|
"cpu." cpu append require
|
||||||
|
|
||||||
nl
|
nl
|
||||||
"Compiling some words to speed up bootstrap..." write
|
"Compiling some words to speed up bootstrap..." write flush
|
||||||
|
|
||||||
! Compile a set of words ahead of the full compile.
|
! Compile a set of words ahead of the full compile.
|
||||||
! This set of words was determined semi-empirically
|
! This set of words was determined semi-empirically
|
||||||
|
|
|
@ -450,6 +450,14 @@ cell 8 = [
|
||||||
16 -3 [ fixnum-shift-fast ] compile-call
|
16 -3 [ fixnum-shift-fast ] compile-call
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
|
[ 2 ] [
|
||||||
|
16 [ -3 fixnum-shift-fast ] compile-call
|
||||||
|
] unit-test
|
||||||
|
|
||||||
[ 8 ] [
|
[ 8 ] [
|
||||||
1 3 [ fixnum-shift-fast ] compile-call
|
1 3 [ fixnum-shift-fast ] compile-call
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
|
[ 8 ] [
|
||||||
|
1 [ 3 fixnum-shift-fast ] compile-call
|
||||||
|
] unit-test
|
||||||
|
|
|
@ -172,7 +172,8 @@ IN: cpu.ppc.intrinsics
|
||||||
\ fixnum-shift-fast {
|
\ fixnum-shift-fast {
|
||||||
{
|
{
|
||||||
[
|
[
|
||||||
"out" operand "x" operand "y" get neg SRAWI
|
"out" operand "x" operand "y" get
|
||||||
|
dup 0 < [ neg SRAWI ] [ swapd SLWI ] if
|
||||||
! Mask off low bits
|
! Mask off low bits
|
||||||
"out" operand dup %untag
|
"out" operand dup %untag
|
||||||
] H{
|
] H{
|
||||||
|
@ -199,6 +200,7 @@ IN: cpu.ppc.intrinsics
|
||||||
{ +input+ { { f "x" } { f "y" } } }
|
{ +input+ { { f "x" } { f "y" } } }
|
||||||
{ +scratch+ { { f "out" } } }
|
{ +scratch+ { { f "out" } } }
|
||||||
{ +output+ { "out" } }
|
{ +output+ { "out" } }
|
||||||
|
{ +clobber+ { "x" "y" } }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} define-intrinsics
|
} define-intrinsics
|
||||||
|
|
|
@ -120,7 +120,7 @@ HELP: fixnum-shift ( x y -- z )
|
||||||
{ $description "Primitive version of " { $link shift } ". The result may overflow to a bignum." }
|
{ $description "Primitive version of " { $link shift } ". The result may overflow to a bignum." }
|
||||||
{ $warning "This word does not perform type checking, and passing objects of the wrong type can crash the runtime. User code should call the generic word " { $link shift } " instead." } ;
|
{ $warning "This word does not perform type checking, and passing objects of the wrong type can crash the runtime. User code should call the generic word " { $link shift } " instead." } ;
|
||||||
|
|
||||||
HELP: fixnum-shift-shift ( x y -- z )
|
HELP: fixnum-shift-fast ( x y -- z )
|
||||||
{ $values { "x" fixnum } { "y" fixnum } { "z" fixnum } }
|
{ $values { "x" fixnum } { "y" fixnum } { "z" fixnum } }
|
||||||
{ $description "Primitive version of " { $link shift } ". Unlike " { $link fixnum-shift } ", does not perform an overflow check, so the result may be incorrect." }
|
{ $description "Primitive version of " { $link shift } ". Unlike " { $link fixnum-shift } ", does not perform an overflow check, so the result may be incorrect." }
|
||||||
{ $warning "This word does not perform type checking, and passing objects of the wrong type can crash the runtime. User code should call the generic word " { $link shift } " instead." } ;
|
{ $warning "This word does not perform type checking, and passing objects of the wrong type can crash the runtime. User code should call the generic word " { $link shift } " instead." } ;
|
||||||
|
|
Loading…
Reference in New Issue