sparc: Reuse m_vector_asm.h.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
This commit is contained in:
Eric Anholt 2019-06-20 10:35:32 -07:00
parent 20294dceeb
commit 67ffb853f0
3 changed files with 14 additions and 34 deletions

View File

@ -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

View File

@ -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

View File

@ -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