summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2019-06-20 10:35:32 -0700
committerEric Anholt <[email protected]>2019-07-01 11:14:29 -0700
commit67ffb853f05eb24222970261018f6ed0982e6be4 (patch)
tree42cf1145acb416178752c858b721edbf95510ffa /src/mesa
parent20294dceebc23236e33b22578245f7e6f41b6997 (diff)
sparc: Reuse m_vector_asm.h.
Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/sparc/norm.S12
-rw-r--r--src/mesa/sparc/sparc_clip.S16
-rw-r--r--src/mesa/sparc/sparc_matrix.h20
3 files changed, 14 insertions, 34 deletions
diff --git a/src/mesa/sparc/norm.S b/src/mesa/sparc/norm.S
index 117d36fa223..f0b1fdeeba6 100644
--- a/src/mesa/sparc/norm.S
+++ b/src/mesa/sparc/norm.S
@@ -29,7 +29,7 @@ _mesa_sparc_transform_normalize_normals:
ld [%sp + STACK_VAR_OFF+0x4], %f15 ! f15 = scale
add %sp, 16, %sp
- LDPTR [%o0 + MAT_INV], %o0 ! o0 = mat->inv
+ LDPTR [%o0 + MATRIX_INV], %o0 ! o0 = mat->inv
LDPTR [%o2 + V4F_START], %o5 ! o5 = 'from' in->start
ld [%o2 + V4F_COUNT], %g1 ! g1 = in->count
ld [%o2 + V4F_STRIDE], %g2 ! g2 = in->stride
@@ -168,7 +168,7 @@ _mesa_sparc_transform_normalize_normals_no_rot:
ld [%sp + STACK_VAR_OFF+0x4], %f15 ! f15 = scale
add %sp, 16, %sp
- LDPTR [%o0 + MAT_INV], %o0 ! o0 = mat->inv
+ LDPTR [%o0 + MATRIX_INV], %o0 ! o0 = mat->inv
LDPTR [%o2 + V4F_START], %o5 ! o5 = 'from' in->start
ld [%o2 + V4F_COUNT], %g1 ! g1 = in->count
ld [%o2 + V4F_STRIDE], %g2 ! g2 = in->stride
@@ -273,7 +273,7 @@ _mesa_sparc_transform_rescale_normals_no_rot:
ld [%sp + STACK_VAR_OFF+0x0], %f15 ! f15 = scale
add %sp, 16, %sp
- LDPTR [%o0 + MAT_INV], %o0 ! o0 = mat->inv
+ LDPTR [%o0 + MATRIX_INV], %o0 ! o0 = mat->inv
LDPTR [%o2 + V4F_START], %o5 ! o5 = 'from' in->start
ld [%o2 + V4F_COUNT], %g1 ! g1 = in->count
ld [%o2 + V4F_STRIDE], %g2 ! g2 = in->stride
@@ -324,7 +324,7 @@ _mesa_sparc_transform_rescale_normals:
ld [%sp + STACK_VAR_OFF+0x0], %f15 ! f15 = scale
add %sp, 16, %sp
- LDPTR [%o0 + MAT_INV], %o0 ! o0 = mat->inv
+ LDPTR [%o0 + MATRIX_INV], %o0 ! o0 = mat->inv
LDPTR [%o2 + V4F_START], %o5 ! o5 = 'from' in->start
ld [%o2 + V4F_COUNT], %g1 ! g1 = in->count
ld [%o2 + V4F_STRIDE], %g2 ! g2 = in->stride
@@ -384,7 +384,7 @@ _mesa_sparc_transform_rescale_normals:
.globl _mesa_sparc_transform_normals_no_rot
_mesa_sparc_transform_normals_no_rot:
/* o0=mat o1=scale o2=in o3=lengths o4=dest */
- LDPTR [%o0 + MAT_INV], %o0 ! o0 = mat->inv
+ LDPTR [%o0 + MATRIX_INV], %o0 ! o0 = mat->inv
LDPTR [%o2 + V4F_START], %o5 ! o5 = 'from' in->start
ld [%o2 + V4F_COUNT], %g1 ! g1 = in->count
ld [%o2 + V4F_STRIDE], %g2 ! g2 = in->stride
@@ -426,7 +426,7 @@ _mesa_sparc_transform_normals_no_rot:
.globl _mesa_sparc_transform_normals
_mesa_sparc_transform_normals:
/* o0=mat o1=scale o2=in o3=lengths o4=dest */
- LDPTR [%o0 + MAT_INV], %o0 ! o0 = mat->inv
+ LDPTR [%o0 + MATRIX_INV], %o0 ! o0 = mat->inv
LDPTR [%o2 + V4F_START], %o5 ! o5 = 'from' in->start
ld [%o2 + V4F_COUNT], %g1 ! g1 = in->count
ld [%o2 + V4F_STRIDE], %g2 ! g2 = in->stride
diff --git a/src/mesa/sparc/sparc_clip.S b/src/mesa/sparc/sparc_clip.S
index dc239171ff9..11aa8324ec2 100644
--- a/src/mesa/sparc/sparc_clip.S
+++ b/src/mesa/sparc/sparc_clip.S
@@ -4,20 +4,12 @@
#if __arch64__
#define LDPTR ldx
-#define V4F_DATA 0x00
-#define V4F_START 0x08
-#define V4F_COUNT 0x10
-#define V4F_STRIDE 0x14
-#define V4F_SIZE 0x18
-#define V4F_FLAGS 0x1c
+#define MATH_ASM_PTR_SIZE 8
+#include "math/m_vector_asm.h"
#else
#define LDPTR ld
-#define V4F_DATA 0x00
-#define V4F_START 0x04
-#define V4F_COUNT 0x08
-#define V4F_STRIDE 0x0c
-#define V4F_SIZE 0x10
-#define V4F_FLAGS 0x14
+#define MATH_ASM_PTR_SIZE 4
+#include "math/m_vector_asm.h"
#endif
#define VEC_SIZE_1 1
diff --git a/src/mesa/sparc/sparc_matrix.h b/src/mesa/sparc/sparc_matrix.h
index 6ef0acde69e..d478b76802f 100644
--- a/src/mesa/sparc/sparc_matrix.h
+++ b/src/mesa/sparc/sparc_matrix.h
@@ -7,24 +7,12 @@
#ifdef __arch64__
#define LDPTR ldx
-#define MAT_M 0x00
-#define MAT_INV 0x08
-#define V4F_DATA 0x00
-#define V4F_START 0x08
-#define V4F_COUNT 0x10
-#define V4F_STRIDE 0x14
-#define V4F_SIZE 0x18
-#define V4F_FLAGS 0x1c
+#define MATH_ASM_PTR_SIZE 8
+#include "math/m_vector_asm.h"
#else
#define LDPTR ld
-#define MAT_M 0x00
-#define MAT_INV 0x04
-#define V4F_DATA 0x00
-#define V4F_START 0x04
-#define V4F_COUNT 0x08
-#define V4F_STRIDE 0x0c
-#define V4F_SIZE 0x10
-#define V4F_FLAGS 0x14
+#define MATH_ASM_PTR_SIZE 4
+#include "math/m_vector_asm.h"
#endif
#define VEC_SIZE_1 1