]> gitweb.factorcode.org Git - factor.git/commitdiff
cpu.*: removes the vector-regs hook
authorBjörn Lindqvist <bjourne@gmail.com>
Mon, 1 Aug 2016 17:33:01 +0000 (19:33 +0200)
committerBjörn Lindqvist <bjourne@gmail.com>
Mon, 1 Aug 2016 19:52:05 +0000 (21:52 +0200)
It is not needed for now as float-regs are always used for vector-reps.

basis/cpu/architecture/architecture.factor
basis/cpu/ppc/ppc.factor
basis/cpu/x86/x86.factor

index 8c1ac6d3146c33763d028c630d491d67922f352f..2d9bf8f0a3ec048dc0083e72214f72eb8fdb1be8 100644 (file)
@@ -150,18 +150,17 @@ SINGLETONS: int-regs float-regs ;
 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
 
index 9302f4e5b84a4834b18fa779e4c0de0b46306407..477b949dc31bdd1304e74ddf54511f61df12ab56 100644 (file)
@@ -46,9 +46,6 @@ CONSTANT: vm-reg         16
 
 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 ] }
index ad82f3362343762191d3ee22fb62421fd03948c5..6c5e5d610a94a29598ba006e0ac932799a8ebbcb 100644 (file)
@@ -19,8 +19,6 @@ IN: cpu.x86
 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 )