UNION: reg-class int-regs float-regs ;
CONSTANT: reg-classes { int-regs float-regs }
-! On x86, vectors and floats are stored in the same register bank
-! On PowerPC they are distinct
-HOOK: vector-regs cpu ( -- reg-class )
-
GENERIC: reg-class-of ( rep -- reg-class )
M: tagged-rep reg-class-of drop int-regs ;
M: int-rep reg-class-of drop int-regs ;
M: float-rep reg-class-of drop float-regs ;
M: double-rep reg-class-of drop float-regs ;
-M: vector-rep reg-class-of drop vector-regs ;
-M: scalar-rep reg-class-of drop vector-regs ;
+
+! Note that on PowerPC, vectors and floats are stored in different
+! register banks. But Factor doesn't support SIMD on that platform.
+M: vector-rep reg-class-of drop float-regs ;
+M: scalar-rep reg-class-of drop float-regs ;
GENERIC: rep-size ( rep -- n ) foldable
enable-float-intrinsics
-M: ppc vector-regs ( -- reg-class )
- float-regs ;
-
M: ppc machine-registers ( -- assoc )
{
{ int-regs $[ 3 12 [a,b] 17 29 [a,b] append ] }
M: label JMP 0 JMP rc-relative label-fixup ;
M: label JUMPcc [ 0 ] dip JUMPcc rc-relative label-fixup ;
-M: x86 vector-regs float-regs ;
-
HOOK: stack-reg cpu ( -- reg )
HOOK: reserved-stack-space cpu ( -- n )