From b8f29f29eb611c92d43aaf8ffcd2d9743b3af967 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 23 Jul 2004 15:45:56 +0000 Subject: [PATCH] ALIGN16 macro repairs --- src/mesa/math/m_debug_clip.c | 12 ++++++------ src/mesa/math/m_debug_util.h | 11 +++++------ src/mesa/math/m_debug_xform.c | 11 +++++------ 3 files changed, 16 insertions(+), 18 deletions(-) diff --git a/src/mesa/math/m_debug_clip.c b/src/mesa/math/m_debug_clip.c index c74ca5f7e45..ae8108b88a1 100644 --- a/src/mesa/math/m_debug_clip.c +++ b/src/mesa/math/m_debug_clip.c @@ -1,9 +1,8 @@ - /* * Mesa 3-D graphics library - * Version: 5.0 + * Version: 6.1 * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2005 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -194,9 +193,10 @@ static clip_func ref_cliptest[5] = { * Cliptest tests */ -static GLfloat s[TEST_COUNT][4] ALIGN16; -static GLfloat d[TEST_COUNT][4] ALIGN16; -static GLfloat r[TEST_COUNT][4] ALIGN16; +ALIGN16(static GLfloat, s[TEST_COUNT][4]); +ALIGN16(static GLfloat, d[TEST_COUNT][4]); +ALIGN16(static GLfloat, r[TEST_COUNT][4]); + static int test_cliptest_function( clip_func func, int np, int psize, long *cycles ) diff --git a/src/mesa/math/m_debug_util.h b/src/mesa/math/m_debug_util.h index e1690344530..c07cdcf7ba7 100644 --- a/src/mesa/math/m_debug_util.h +++ b/src/mesa/math/m_debug_util.h @@ -1,9 +1,8 @@ - /* * Mesa 3-D graphics library - * Version: 3.5 + * Version: 6.1 * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -265,11 +264,11 @@ enum { NIL = 0, ONE = 1, NEG = -1, VAR = 2 }; /* Ensure our arrays are correctly aligned. */ #if defined(__GNUC__) -# define ALIGN16 type array __attribute__ ((aligned (16))) +# define ALIGN16(type, array) type array __attribute__ ((aligned (16))) #elif defined(__MSC__) -# define ALIGN16 type array __declspec(align(16)) /* GH: Does this work? */ +# define ALIGN16(type, array) type array __declspec(align(16)) /* GH: Does this work? */ #elif defined(__WATCOMC__) -# define ALIGN16 /* Watcom does not support this */ +# define ALIGN16(type, array) /* Watcom does not support this */ #elif defined(__xlC__) # define ALIGN16(type, array) type __align (16) array #else diff --git a/src/mesa/math/m_debug_xform.c b/src/mesa/math/m_debug_xform.c index 728ee2f1efe..b634527b24d 100644 --- a/src/mesa/math/m_debug_xform.c +++ b/src/mesa/math/m_debug_xform.c @@ -1,9 +1,8 @@ - /* * Mesa 3-D graphics library - * Version: 3.5 + * Version: 6.1 * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -162,9 +161,9 @@ static void init_matrix( GLfloat *m ) m[3] = 11.0; m[7] = 23.0; m[11] = 91.0; m[15] = 9.0; } -static GLfloat s[TEST_COUNT][4] ALIGN16; -static GLfloat d[TEST_COUNT][4] ALIGN16; -static GLfloat r[TEST_COUNT][4] ALIGN16; +ALIGN16(static GLfloat, s[TEST_COUNT][4]); +ALIGN16(static GLfloat, d[TEST_COUNT][4]); +ALIGN16(static GLfloat, r[TEST_COUNT][4]); static int test_transform_function( transform_func func, int psize, int mtype, long *cycles )