reg: support for register casting
Adds methods for referencing sub- or super-registers. For example, for general purpose registers you can now reference As8(), As16(), ... and for vector AsX(), AsY(), AsZ(). Closes #1
This commit is contained in:
@@ -10,7 +10,7 @@ func TestAllocatorSimple(t *testing.T) {
|
||||
c := reg.NewCollection()
|
||||
x, y := c.Xv(), c.Yv()
|
||||
|
||||
a, err := NewAllocatorForKind(reg.SSEAVX)
|
||||
a, err := NewAllocatorForKind(reg.KindVector)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -32,7 +32,7 @@ func TestAllocatorSimple(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestAllocatorImpossible(t *testing.T) {
|
||||
a, err := NewAllocatorForKind(reg.SSEAVX)
|
||||
a, err := NewAllocatorForKind(reg.KindVector)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user