diff options
author | David Miller <davem@davemloft.net> | 2009-02-27 02:38:40 -0800 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-02-27 07:54:02 -0700 |
commit | cf89f063634ff89cbd732bf67950debc94897ed9 (patch) | |
tree | 8103f9b801622a99c8fbaf39683ff03fd60c1378 /src | |
parent | bde27b0d94dc2b3d0d4656e2c85ecbbd1245b3ac (diff) |
mesa: Fix and re-enable sparc normal asm.
Fix a bug reported in 2003 :-)
The output vector has 4 entries, not 3.
Unconditionally emit .register directives.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/sparc/norm.S | 25 | ||||
-rw-r--r-- | src/mesa/sparc/sparc.c | 3 |
2 files changed, 11 insertions, 17 deletions
diff --git a/src/mesa/sparc/norm.S b/src/mesa/sparc/norm.S index 44950a10a5..117d36fa22 100644 --- a/src/mesa/sparc/norm.S +++ b/src/mesa/sparc/norm.S @@ -1,11 +1,8 @@ #include "sparc_matrix.h" -#if defined(SVR4) || defined(__SVR4) || defined(__svr4__) - /* Solaris requires this for 64-bit. */ .register %g2, #scratch .register %g3, #scratch -#endif .text @@ -98,7 +95,7 @@ _mesa_sparc_transform_normalize_normals: cmp %o4, %g1 ! continue if (i < count) bl 1b - add %g3, 0x0c, %g3 ! advance out vector pointer + add %g3, 0x10, %g3 ! advance out vector pointer ba 7f nop @@ -154,7 +151,7 @@ _mesa_sparc_transform_normalize_normals: cmp %o4, %g1 ! continue if (i < count) bl 5b - add %g3, 0x0c, %g3 ! advance out vector pointer + add %g3, 0x10, %g3 ! advance out vector pointer 7: retl nop @@ -225,7 +222,7 @@ _mesa_sparc_transform_normalize_normals_no_rot: cmp %o4, %g1 ! continue if (i < count) bl 1b - add %g3, 0x0c, %g3 ! advance out vector pointer + add %g3, 0x10, %g3 ! advance out vector pointer ba 7f nop @@ -263,7 +260,7 @@ _mesa_sparc_transform_normalize_normals_no_rot: cmp %o4, %g1 ! continue if (i < count) bl 5b - add %g3, 0x0c, %g3 ! advance out vector pointer + add %g3, 0x10, %g3 ! advance out vector pointer 7: retl nop @@ -314,7 +311,7 @@ _mesa_sparc_transform_rescale_normals_no_rot: cmp %o4, %g1 ! continue if (i < count) bl 1b - add %g3, 0x0c, %g3 ! advance out vector pointer + add %g3, 0x10, %g3 ! advance out vector pointer 7: retl nop @@ -379,7 +376,7 @@ _mesa_sparc_transform_rescale_normals: cmp %o4, %g1 ! continue if (i < count) bl 1b - add %g3, 0x0c, %g3 ! advance out vector pointer + add %g3, 0x10, %g3 ! advance out vector pointer 7: retl nop @@ -421,7 +418,7 @@ _mesa_sparc_transform_normals_no_rot: cmp %o4, %g1 ! continue if (i < count) bl 1b - add %g3, 0x0c, %g3 ! advance out vector pointer + add %g3, 0x10, %g3 ! advance out vector pointer 7: retl nop @@ -471,7 +468,7 @@ _mesa_sparc_transform_normals: cmp %o4, %g1 ! continue if (i < count) bl 1b - add %g3, 0x0c, %g3 ! advance out vector pointer + add %g3, 0x10, %g3 ! advance out vector pointer 7: retl nop @@ -529,7 +526,7 @@ _mesa_sparc_normalize_normals: cmp %o4, %g1 ! continue if (i < count) bl 1b - add %g3, 0x0c, %g3 ! advance out vector pointer + add %g3, 0x10, %g3 ! advance out vector pointer ba 7f nop @@ -557,7 +554,7 @@ _mesa_sparc_normalize_normals: cmp %o4, %g1 ! continue if (i < count) bl 5b - add %g3, 0x0c, %g3 ! advance out vector pointer + add %g3, 0x10, %g3 ! advance out vector pointer 7: retl nop @@ -602,7 +599,7 @@ _mesa_sparc_rescale_normals: cmp %o4, %g1 ! continue if (i < count) bl 1b - add %g3, 0x0c, %g3 ! advance out vector pointer + add %g3, 0x10, %g3 ! advance out vector pointer 7: retl nop diff --git a/src/mesa/sparc/sparc.c b/src/mesa/sparc/sparc.c index fafb49b81c..d2286a2c83 100644 --- a/src/mesa/sparc/sparc.c +++ b/src/mesa/sparc/sparc.c @@ -113,8 +113,6 @@ void _mesa_init_all_sparc_transform_asm(void) _mesa_clip_tab[4] = _mesa_sparc_cliptest_points4; _mesa_clip_np_tab[4] = _mesa_sparc_cliptest_points4_np; -#if 0 - /* disable these too. See bug 673938 */ _mesa_normal_tab[NORM_TRANSFORM | NORM_NORMALIZE] = _mesa_sparc_transform_normalize_normals; _mesa_normal_tab[NORM_TRANSFORM_NO_ROT | NORM_NORMALIZE] = @@ -131,7 +129,6 @@ void _mesa_init_all_sparc_transform_asm(void) _mesa_sparc_normalize_normals; _mesa_normal_tab[NORM_RESCALE] = _mesa_sparc_rescale_normals; -#endif #ifdef DEBUG_MATH _math_test_all_transform_functions("sparc"); |