From f3af7886fe46706df9d21deb1ccb5de3d04a5507 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 9 Aug 2019 13:25:56 +1000 Subject: [PATCH] mesa: add support for CET to x86/x86-64 asm files. Control-flow enforcement technology is a new instructions on x86 processors to denote where indirect jumps can land. Gcc auto adds the instruction (which encodes as a NOP on older CPUs) to entrypoints but assembler files need manual adding. This adds it to all the entry points in the mesa x86/x86-64 assembler files. This will only happen if mesa is built with the -fcf-protection flag to gcc as some distros are wanting to do. Acked-by: Eric Anholt --- meson.build | 2 +- src/mesa/x86-64/xform4.S | 19 +++++++++++++------ src/mesa/x86/3dnow_xform1.S | 14 +++++++------- src/mesa/x86/3dnow_xform2.S | 14 +++++++------- src/mesa/x86/3dnow_xform3.S | 14 +++++++------- src/mesa/x86/3dnow_xform4.S | 14 +++++++------- src/mesa/x86/assyntax.h | 7 +++++++ src/mesa/x86/common_x86_asm.S | 16 ++++++++-------- src/mesa/x86/mmx_blendtmp.h | 2 +- src/mesa/x86/read_rgba_span_x86.S | 11 ++++++++++- src/mesa/x86/sse_normal.S | 6 +++--- src/mesa/x86/sse_xform1.S | 14 +++++++------- src/mesa/x86/sse_xform2.S | 14 +++++++------- src/mesa/x86/sse_xform3.S | 14 +++++++------- src/mesa/x86/sse_xform4.S | 6 +++--- src/mesa/x86/x86_cliptest.S | 4 ++-- 16 files changed, 97 insertions(+), 74 deletions(-) diff --git a/meson.build b/meson.build index 9c8768bbad0..379090fbbf6 100644 --- a/meson.build +++ b/meson.build @@ -1034,7 +1034,7 @@ elif cc.has_header_symbol('sys/mkdev.h', 'major') pre_args += '-DMAJOR_IN_MKDEV' endif -foreach h : ['xlocale.h', 'sys/sysctl.h', 'linux/futex.h', 'endian.h', 'dlfcn.h', 'execinfo.h', 'sys/shm.h'] +foreach h : ['xlocale.h', 'sys/sysctl.h', 'linux/futex.h', 'endian.h', 'dlfcn.h', 'execinfo.h', 'sys/shm.h', 'cet.h'] if cc.compiles('#include <@0@>'.format(h), name : '@0@'.format(h)) pre_args += '-DHAVE_@0@'.format(h.to_upper().underscorify()) endif diff --git a/src/mesa/x86-64/xform4.S b/src/mesa/x86-64/xform4.S index b5d224237cf..e36a6276d2a 100644 --- a/src/mesa/x86-64/xform4.S +++ b/src/mesa/x86-64/xform4.S @@ -21,6 +21,11 @@ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. */ +#ifdef HAVE_CET_H +#include +#else +#define _CET_ENDBR +#endif #ifdef USE_X86_64_ASM @@ -33,6 +38,7 @@ .globl _mesa_x86_64_cpuid .hidden _mesa_x86_64_cpuid _mesa_x86_64_cpuid: + _CET_ENDBR pushq %rbx movl (%rdi), %eax movl 8(%rdi), %ecx @@ -55,6 +61,7 @@ _mesa_x86_64_transform_points4_general: * rsi = matrix * rdx = source */ + _CET_ENDBR movl V4F_COUNT(%rdx), %ecx /* count */ movzbl V4F_STRIDE(%rdx), %eax /* stride */ @@ -130,7 +137,7 @@ p4_constants: * because it ensures that the last matrix row (or is it column?) is 0,0,0,1 */ _mesa_x86_64_transform_points4_3d: - + _CET_ENDBR leaq p4_constants(%rip), %rax prefetchnta 64(%rsi) @@ -198,7 +205,7 @@ p4_3d_done: .globl _mesa_x86_64_transform_points4_identity .hidden _mesa_x86_64_transform_points4_identity _mesa_x86_64_transform_points4_identity: - + _CET_ENDBR movl V4F_COUNT(%rdx), %ecx /* count */ movzbl V4F_STRIDE(%rdx), %eax /* stride */ @@ -227,7 +234,7 @@ p4_identity_done: .globl _mesa_3dnow_transform_points4_3d_no_rot .hidden _mesa_3dnow_transform_points4_3d_no_rot _mesa_3dnow_transform_points4_3d_no_rot: - + _CET_ENDBR movl V4F_COUNT(%rdx), %ecx /* count */ movzbl V4F_STRIDE(%rdx), %eax /* stride */ @@ -292,7 +299,7 @@ p4_3d_no_rot_done: .globl _mesa_3dnow_transform_points4_perspective .hidden _mesa_3dnow_transform_points4_perspective _mesa_3dnow_transform_points4_perspective: - + _CET_ENDBR movl V4F_COUNT(%rdx), %ecx /* count */ movzbl V4F_STRIDE(%rdx), %eax /* stride */ @@ -359,7 +366,7 @@ p4_perspective_done: .globl _mesa_3dnow_transform_points4_2d_no_rot .hidden _mesa_3dnow_transform_points4_2d_no_rot _mesa_3dnow_transform_points4_2d_no_rot: - + _CET_ENDBR movl V4F_COUNT(%rdx), %ecx /* count */ movzbl V4F_STRIDE(%rdx), %eax /* stride */ @@ -415,7 +422,7 @@ p4_2d_no_rot_done: .globl _mesa_3dnow_transform_points4_2d .hidden _mesa_3dnow_transform_points4_2d _mesa_3dnow_transform_points4_2d: - + _CET_ENDBR movl V4F_COUNT(%rdx), %ecx /* count */ movzbl V4F_STRIDE(%rdx), %eax /* stride */ diff --git a/src/mesa/x86/3dnow_xform1.S b/src/mesa/x86/3dnow_xform1.S index 2b157bb0e27..b158a5a3714 100644 --- a/src/mesa/x86/3dnow_xform1.S +++ b/src/mesa/x86/3dnow_xform1.S @@ -38,7 +38,7 @@ ALIGNTEXT16 GLOBL GLNAME( _mesa_3dnow_transform_points1_general ) HIDDEN(_mesa_3dnow_transform_points1_general) GLNAME( _mesa_3dnow_transform_points1_general ): - + _CET_ENDBR PUSH_L ( ESI ) MOV_L ( ARG_DEST, ECX ) @@ -103,7 +103,7 @@ ALIGNTEXT16 GLOBL GLNAME( _mesa_3dnow_transform_points1_identity ) HIDDEN(_mesa_3dnow_transform_points1_identity) GLNAME( _mesa_3dnow_transform_points1_identity ): - + _CET_ENDBR PUSH_L ( ESI ) MOV_L ( ARG_DEST, ECX ) @@ -151,7 +151,7 @@ ALIGNTEXT16 GLOBL GLNAME( _mesa_3dnow_transform_points1_3d_no_rot ) HIDDEN(_mesa_3dnow_transform_points1_3d_no_rot) GLNAME( _mesa_3dnow_transform_points1_3d_no_rot ): - + _CET_ENDBR PUSH_L ( ESI ) MOV_L ( ARG_DEST, ECX ) @@ -209,7 +209,7 @@ ALIGNTEXT16 GLOBL GLNAME( _mesa_3dnow_transform_points1_perspective ) HIDDEN(_mesa_3dnow_transform_points1_perspective) GLNAME( _mesa_3dnow_transform_points1_perspective ): - + _CET_ENDBR PUSH_L ( ESI ) MOV_L ( ARG_DEST, ECX ) @@ -263,7 +263,7 @@ ALIGNTEXT16 GLOBL GLNAME( _mesa_3dnow_transform_points1_2d ) HIDDEN(_mesa_3dnow_transform_points1_2d) GLNAME( _mesa_3dnow_transform_points1_2d ): - + _CET_ENDBR PUSH_L ( ESI ) MOV_L ( ARG_DEST, ECX ) @@ -319,7 +319,7 @@ ALIGNTEXT16 GLOBL GLNAME( _mesa_3dnow_transform_points1_2d_no_rot ) HIDDEN(_mesa_3dnow_transform_points1_2d_no_rot) GLNAME( _mesa_3dnow_transform_points1_2d_no_rot ): - + _CET_ENDBR PUSH_L ( ESI ) MOV_L ( ARG_DEST, ECX ) @@ -373,7 +373,7 @@ ALIGNTEXT16 GLOBL GLNAME( _mesa_3dnow_transform_points1_3d ) HIDDEN(_mesa_3dnow_transform_points1_3d) GLNAME( _mesa_3dnow_transform_points1_3d ): - + _CET_ENDBR PUSH_L ( ESI ) MOV_L ( ARG_DEST, ECX ) diff --git a/src/mesa/x86/3dnow_xform2.S b/src/mesa/x86/3dnow_xform2.S index fd71648e2c0..bed217bd8ca 100644 --- a/src/mesa/x86/3dnow_xform2.S +++ b/src/mesa/x86/3dnow_xform2.S @@ -38,7 +38,7 @@ ALIGNTEXT16 GLOBL GLNAME( _mesa_3dnow_transform_points2_general ) HIDDEN(_mesa_3dnow_transform_points2_general) GLNAME( _mesa_3dnow_transform_points2_general ): - + _CET_ENDBR PUSH_L ( ESI ) MOV_L ( ARG_DEST, ECX ) @@ -119,7 +119,7 @@ ALIGNTEXT16 GLOBL GLNAME( _mesa_3dnow_transform_points2_perspective ) HIDDEN(_mesa_3dnow_transform_points2_perspective) GLNAME( _mesa_3dnow_transform_points2_perspective ): - + _CET_ENDBR PUSH_L ( ESI ) MOV_L ( ARG_DEST, ECX ) @@ -175,7 +175,7 @@ ALIGNTEXT16 GLOBL GLNAME( _mesa_3dnow_transform_points2_3d ) HIDDEN(_mesa_3dnow_transform_points2_3d) GLNAME( _mesa_3dnow_transform_points2_3d ): - + _CET_ENDBR PUSH_L ( ESI ) MOV_L ( ARG_DEST, ECX ) @@ -252,7 +252,7 @@ ALIGNTEXT16 GLOBL GLNAME( _mesa_3dnow_transform_points2_3d_no_rot ) HIDDEN(_mesa_3dnow_transform_points2_3d_no_rot) GLNAME( _mesa_3dnow_transform_points2_3d_no_rot ): - + _CET_ENDBR PUSH_L ( ESI ) MOV_L ( ARG_DEST, ECX ) @@ -311,7 +311,7 @@ ALIGNTEXT16 GLOBL GLNAME( _mesa_3dnow_transform_points2_2d ) HIDDEN(_mesa_3dnow_transform_points2_2d) GLNAME( _mesa_3dnow_transform_points2_2d ): - + _CET_ENDBR PUSH_L ( ESI ) MOV_L ( ARG_DEST, ECX ) @@ -375,7 +375,7 @@ ALIGNTEXT16 GLOBL GLNAME( _mesa_3dnow_transform_points2_2d_no_rot ) HIDDEN(_mesa_3dnow_transform_points2_2d_no_rot) GLNAME( _mesa_3dnow_transform_points2_2d_no_rot ): - + _CET_ENDBR PUSH_L ( ESI ) MOV_L ( ARG_DEST, ECX ) @@ -431,7 +431,7 @@ ALIGNTEXT16 GLOBL GLNAME( _mesa_3dnow_transform_points2_identity ) HIDDEN(_mesa_3dnow_transform_points2_identity) GLNAME( _mesa_3dnow_transform_points2_identity ): - + _CET_ENDBR PUSH_L ( ESI ) MOV_L ( ARG_DEST, ECX ) diff --git a/src/mesa/x86/3dnow_xform3.S b/src/mesa/x86/3dnow_xform3.S index db24843463f..85ad3014413 100644 --- a/src/mesa/x86/3dnow_xform3.S +++ b/src/mesa/x86/3dnow_xform3.S @@ -38,7 +38,7 @@ ALIGNTEXT16 GLOBL GLNAME( _mesa_3dnow_transform_points3_general ) HIDDEN(_mesa_3dnow_transform_points3_general) GLNAME( _mesa_3dnow_transform_points3_general ): - + _CET_ENDBR PUSH_L ( ESI ) MOV_L ( ARG_DEST, ECX ) @@ -123,7 +123,7 @@ ALIGNTEXT16 GLOBL GLNAME( _mesa_3dnow_transform_points3_perspective ) HIDDEN(_mesa_3dnow_transform_points3_perspective) GLNAME( _mesa_3dnow_transform_points3_perspective ): - + _CET_ENDBR PUSH_L ( ESI ) MOV_L ( ARG_DEST, ECX ) @@ -204,7 +204,7 @@ ALIGNTEXT16 GLOBL GLNAME( _mesa_3dnow_transform_points3_3d ) HIDDEN(_mesa_3dnow_transform_points3_3d) GLNAME( _mesa_3dnow_transform_points3_3d ): - + _CET_ENDBR PUSH_L ( ESI ) MOV_L ( ARG_DEST, ECX ) @@ -292,7 +292,7 @@ ALIGNTEXT16 GLOBL GLNAME( _mesa_3dnow_transform_points3_3d_no_rot ) HIDDEN(_mesa_3dnow_transform_points3_3d_no_rot) GLNAME( _mesa_3dnow_transform_points3_3d_no_rot ): - + _CET_ENDBR PUSH_L ( ESI ) MOV_L ( ARG_DEST, ECX ) @@ -368,7 +368,7 @@ ALIGNTEXT16 GLOBL GLNAME( _mesa_3dnow_transform_points3_2d ) HIDDEN(_mesa_3dnow_transform_points3_2d) GLNAME( _mesa_3dnow_transform_points3_2d ): - + _CET_ENDBR PUSH_L ( ESI ) MOV_L ( ARG_DEST, ECX ) @@ -441,7 +441,7 @@ ALIGNTEXT16 GLOBL GLNAME( _mesa_3dnow_transform_points3_2d_no_rot ) HIDDEN(_mesa_3dnow_transform_points3_2d_no_rot) GLNAME( _mesa_3dnow_transform_points3_2d_no_rot ): - + _CET_ENDBR PUSH_L ( ESI ) MOV_L ( ARG_DEST, ECX ) @@ -508,7 +508,7 @@ ALIGNTEXT16 GLOBL GLNAME( _mesa_3dnow_transform_points3_identity ) HIDDEN(_mesa_3dnow_transform_points3_identity) GLNAME( _mesa_3dnow_transform_points3_identity ): - + _CET_ENDBR PUSH_L ( ESI ) MOV_L ( ARG_DEST, ECX ) diff --git a/src/mesa/x86/3dnow_xform4.S b/src/mesa/x86/3dnow_xform4.S index 161aaa1a9b7..87868e44523 100644 --- a/src/mesa/x86/3dnow_xform4.S +++ b/src/mesa/x86/3dnow_xform4.S @@ -38,7 +38,7 @@ ALIGNTEXT16 GLOBL GLNAME( _mesa_3dnow_transform_points4_general ) HIDDEN(_mesa_3dnow_transform_points4_general) GLNAME( _mesa_3dnow_transform_points4_general ): - + _CET_ENDBR PUSH_L ( ESI ) MOV_L ( ARG_DEST, ECX ) @@ -131,7 +131,7 @@ ALIGNTEXT16 GLOBL GLNAME( _mesa_3dnow_transform_points4_perspective ) HIDDEN(_mesa_3dnow_transform_points4_perspective) GLNAME( _mesa_3dnow_transform_points4_perspective ): - + _CET_ENDBR PUSH_L ( ESI ) MOV_L ( ARG_DEST, ECX ) @@ -211,7 +211,7 @@ ALIGNTEXT16 GLOBL GLNAME( _mesa_3dnow_transform_points4_3d ) HIDDEN(_mesa_3dnow_transform_points4_3d) GLNAME( _mesa_3dnow_transform_points4_3d ): - + _CET_ENDBR PUSH_L ( ESI ) MOV_L ( ARG_DEST, ECX ) @@ -301,7 +301,7 @@ ALIGNTEXT16 GLOBL GLNAME( _mesa_3dnow_transform_points4_3d_no_rot ) HIDDEN(_mesa_3dnow_transform_points4_3d_no_rot) GLNAME( _mesa_3dnow_transform_points4_3d_no_rot ): - + _CET_ENDBR PUSH_L ( ESI ) MOV_L ( ARG_DEST, ECX ) MOV_L ( ARG_MATRIX, ESI ) @@ -374,7 +374,7 @@ ALIGNTEXT16 GLOBL GLNAME( _mesa_3dnow_transform_points4_2d ) HIDDEN(_mesa_3dnow_transform_points4_2d) GLNAME( _mesa_3dnow_transform_points4_2d ): - + _CET_ENDBR PUSH_L ( ESI ) MOV_L ( ARG_DEST, ECX ) @@ -449,7 +449,7 @@ ALIGNTEXT16 GLOBL GLNAME( _mesa_3dnow_transform_points4_2d_no_rot ) HIDDEN(_mesa_3dnow_transform_points4_2d_no_rot) GLNAME( _mesa_3dnow_transform_points4_2d_no_rot ): - + _CET_ENDBR PUSH_L ( ESI ) MOV_L ( ARG_DEST, ECX ) @@ -517,7 +517,7 @@ ALIGNTEXT16 GLOBL GLNAME( _mesa_3dnow_transform_points4_identity ) HIDDEN(_mesa_3dnow_transform_points4_identity) GLNAME( _mesa_3dnow_transform_points4_identity ): - + _CET_ENDBR PUSH_L ( ESI ) MOV_L ( ARG_DEST, ECX ) diff --git a/src/mesa/x86/assyntax.h b/src/mesa/x86/assyntax.h index 67867bda457..f269cb45ce7 100644 --- a/src/mesa/x86/assyntax.h +++ b/src/mesa/x86/assyntax.h @@ -1736,4 +1736,11 @@ # define HIDDEN(x) #endif +/* Control flow enforcement support */ +#ifdef HAVE_CET_H +#include +#else +#define _CET_ENDBR +#endif + #endif /* __ASSYNTAX_H__ */ diff --git a/src/mesa/x86/common_x86_asm.S b/src/mesa/x86/common_x86_asm.S index 7b29416c7aa..765e324b20e 100644 --- a/src/mesa/x86/common_x86_asm.S +++ b/src/mesa/x86/common_x86_asm.S @@ -48,7 +48,7 @@ ALIGNTEXT4 GLOBL GLNAME(_mesa_x86_has_cpuid) HIDDEN(_mesa_x86_has_cpuid) GLNAME(_mesa_x86_has_cpuid): - + _CET_ENDBR /* Test for the CPUID command. If the ID Flag bit in EFLAGS * (bit 21) is writable, the CPUID command is present */ PUSHF_L @@ -72,7 +72,7 @@ ALIGNTEXT4 GLOBL GLNAME(_mesa_x86_cpuid) HIDDEN(_mesa_x86_cpuid) GLNAME(_mesa_x86_cpuid): - + _CET_ENDBR MOV_L (REGOFF(4, ESP), EAX) /* cpuid op */ PUSH_L (EDI) PUSH_L (EBX) @@ -96,7 +96,7 @@ ALIGNTEXT4 GLOBL GLNAME(_mesa_x86_cpuid_eax) HIDDEN(_mesa_x86_cpuid_eax) GLNAME(_mesa_x86_cpuid_eax): - + _CET_ENDBR MOV_L (REGOFF(4, ESP), EAX) /* cpuid op */ PUSH_L (EBX) @@ -109,7 +109,7 @@ ALIGNTEXT4 GLOBL GLNAME(_mesa_x86_cpuid_ebx) HIDDEN(_mesa_x86_cpuid_ebx) GLNAME(_mesa_x86_cpuid_ebx): - + _CET_ENDBR MOV_L (REGOFF(4, ESP), EAX) /* cpuid op */ PUSH_L (EBX) @@ -123,7 +123,7 @@ ALIGNTEXT4 GLOBL GLNAME(_mesa_x86_cpuid_ecx) HIDDEN(_mesa_x86_cpuid_ecx) GLNAME(_mesa_x86_cpuid_ecx): - + _CET_ENDBR MOV_L (REGOFF(4, ESP), EAX) /* cpuid op */ PUSH_L (EBX) @@ -137,7 +137,7 @@ ALIGNTEXT4 GLOBL GLNAME(_mesa_x86_cpuid_edx) HIDDEN(_mesa_x86_cpuid_edx) GLNAME(_mesa_x86_cpuid_edx): - + _CET_ENDBR MOV_L (REGOFF(4, ESP), EAX) /* cpuid op */ PUSH_L (EBX) @@ -163,7 +163,7 @@ ALIGNTEXT4 GLOBL GLNAME( _mesa_test_os_sse_support ) HIDDEN(_mesa_test_os_sse_support) GLNAME( _mesa_test_os_sse_support ): - + _CET_ENDBR XORPS ( XMM0, XMM0 ) RET @@ -178,7 +178,7 @@ ALIGNTEXT4 GLOBL GLNAME( _mesa_test_os_sse_exception_support ) HIDDEN(_mesa_test_os_sse_exception_support) GLNAME( _mesa_test_os_sse_exception_support ): - + _CET_ENDBR PUSH_L ( EBP ) MOV_L ( ESP, EBP ) SUB_L ( CONST( 8 ), ESP ) diff --git a/src/mesa/x86/mmx_blendtmp.h b/src/mesa/x86/mmx_blendtmp.h index 8534792e297..56fee70d93a 100644 --- a/src/mesa/x86/mmx_blendtmp.h +++ b/src/mesa/x86/mmx_blendtmp.h @@ -15,7 +15,7 @@ ALIGNTEXT16 GLOBL GLNAME( TAG(_mesa_mmx_blend) ) HIDDEN( TAG(_mesa_mmx_blend) ) GLNAME( TAG(_mesa_mmx_blend) ): - + _CET_ENDBR PUSH_L ( EBP ) MOV_L ( ESP, EBP ) PUSH_L ( ESI ) diff --git a/src/mesa/x86/read_rgba_span_x86.S b/src/mesa/x86/read_rgba_span_x86.S index 0b94f024ec2..9a68ab83e34 100644 --- a/src/mesa/x86/read_rgba_span_x86.S +++ b/src/mesa/x86/read_rgba_span_x86.S @@ -29,6 +29,12 @@ * * \author Ian Romanick */ +/* Control flow enforcement support */ +#ifdef HAVE_CET_H +#include +#else +#define _CET_ENDBR +#endif .file "read_rgba_span_x86.S" #if !defined(__MINGW32__) && !defined(__APPLE__) /* this one cries for assyntax.h */ @@ -80,6 +86,7 @@ .hidden _generic_read_RGBA_span_BGRA8888_REV_MMX .type _generic_read_RGBA_span_BGRA8888_REV_MMX, @function _generic_read_RGBA_span_BGRA8888_REV_MMX: + _CET_ENDBR pushl %ebx #ifdef USE_INNER_EMMS @@ -175,6 +182,7 @@ _generic_read_RGBA_span_BGRA8888_REV_MMX: .hidden _generic_read_RGBA_span_BGRA8888_REV_SSE .type _generic_read_RGBA_span_BGRA8888_REV_SSE, @function _generic_read_RGBA_span_BGRA8888_REV_SSE: + _CET_ENDBR pushl %esi pushl %ebx pushl %ebp @@ -338,6 +346,7 @@ _generic_read_RGBA_span_BGRA8888_REV_SSE: .hidden _generic_read_RGBA_span_BGRA8888_REV_SSE2 .type _generic_read_RGBA_span_BGRA8888_REV_SSE2, @function _generic_read_RGBA_span_BGRA8888_REV_SSE2: + _CET_ENDBR pushl %esi pushl %ebx @@ -498,7 +507,7 @@ _generic_read_RGBA_span_BGRA8888_REV_SSE2: .type _generic_read_RGBA_span_RGB565_MMX, @function _generic_read_RGBA_span_RGB565_MMX: - + _CET_ENDBR #ifdef USE_INNER_EMMS emms #endif diff --git a/src/mesa/x86/sse_normal.S b/src/mesa/x86/sse_normal.S index 279f6eafcad..b04a77a7b2d 100644 --- a/src/mesa/x86/sse_normal.S +++ b/src/mesa/x86/sse_normal.S @@ -48,7 +48,7 @@ ALIGNTEXT16 GLOBL GLNAME(_mesa_sse_transform_rescale_normals_no_rot) HIDDEN(_mesa_sse_transform_rescale_normals_no_rot) GLNAME(_mesa_sse_transform_rescale_normals_no_rot): - + _CET_ENDBR #define FRAME_OFFSET 8 PUSH_L ( ESI ) PUSH_L ( EDI ) @@ -110,7 +110,7 @@ ALIGNTEXT16 GLOBL GLNAME(_mesa_sse_transform_rescale_normals) HIDDEN(_mesa_sse_transform_rescale_normals) GLNAME(_mesa_sse_transform_rescale_normals): - + _CET_ENDBR #define FRAME_OFFSET 8 PUSH_L ( ESI ) PUSH_L ( EDI ) @@ -203,7 +203,7 @@ ALIGNTEXT16 GLOBL GLNAME(_mesa_sse_transform_normals_no_rot) HIDDEN(_mesa_sse_transform_normals_no_rot) GLNAME(_mesa_sse_transform_normals_no_rot): - + _CET_ENDBR #define FRAME_OFFSET 8 PUSH_L ( ESI ) PUSH_L ( EDI ) diff --git a/src/mesa/x86/sse_xform1.S b/src/mesa/x86/sse_xform1.S index 9473fc1571f..aeeda863d0f 100644 --- a/src/mesa/x86/sse_xform1.S +++ b/src/mesa/x86/sse_xform1.S @@ -47,7 +47,7 @@ ALIGNTEXT4 GLOBL GLNAME(_mesa_sse_transform_points1_general) HIDDEN( _mesa_sse_transform_points1_general ) GLNAME( _mesa_sse_transform_points1_general ): - + _CET_ENDBR #define FRAME_OFFSET 8 PUSH_L ( ESI ) PUSH_L ( EDI ) @@ -104,7 +104,7 @@ ALIGNTEXT4 GLOBL GLNAME(_mesa_sse_transform_points1_identity) HIDDEN(_mesa_sse_transform_points1_identity) GLNAME( _mesa_sse_transform_points1_identity ): - + _CET_ENDBR #define FRAME_OFFSET 8 PUSH_L ( ESI ) PUSH_L ( EDI ) @@ -156,7 +156,7 @@ ALIGNTEXT4 GLOBL GLNAME(_mesa_sse_transform_points1_3d_no_rot) HIDDEN(_mesa_sse_transform_points1_3d_no_rot) GLNAME(_mesa_sse_transform_points1_3d_no_rot): - + _CET_ENDBR #define FRAME_OFFSET 8 PUSH_L( ESI ) PUSH_L( EDI ) @@ -217,7 +217,7 @@ ALIGNTEXT4 GLOBL GLNAME(_mesa_sse_transform_points1_perspective) HIDDEN(_mesa_sse_transform_points1_perspective) GLNAME(_mesa_sse_transform_points1_perspective): - + _CET_ENDBR #define FRAME_OFFSET 8 PUSH_L ( ESI ) PUSH_L ( EDI ) @@ -276,7 +276,7 @@ ALIGNTEXT4 GLOBL GLNAME(_mesa_sse_transform_points1_2d) HIDDEN(_mesa_sse_transform_points1_2d) GLNAME(_mesa_sse_transform_points1_2d): - + _CET_ENDBR #define FRAME_OFFSET 8 PUSH_L( ESI ) PUSH_L( EDI ) @@ -331,7 +331,7 @@ ALIGNTEXT4 GLOBL GLNAME(_mesa_sse_transform_points1_2d_no_rot) HIDDEN(_mesa_sse_transform_points1_2d_no_rot) GLNAME(_mesa_sse_transform_points1_2d_no_rot): - + _CET_ENDBR #define FRAME_OFFSET 8 PUSH_L( ESI ) PUSH_L( EDI ) @@ -388,7 +388,7 @@ ALIGNTEXT4 GLOBL GLNAME(_mesa_sse_transform_points1_3d) HIDDEN(_mesa_sse_transform_points1_3d) GLNAME(_mesa_sse_transform_points1_3d): - + _CET_ENDBR #define FRAME_OFFSET 8 PUSH_L( ESI ) PUSH_L( EDI ) diff --git a/src/mesa/x86/sse_xform2.S b/src/mesa/x86/sse_xform2.S index f89146b42d5..5ba9afa012f 100644 --- a/src/mesa/x86/sse_xform2.S +++ b/src/mesa/x86/sse_xform2.S @@ -47,7 +47,7 @@ ALIGNTEXT4 GLOBL GLNAME(_mesa_sse_transform_points2_general) HIDDEN (_mesa_sse_transform_points2_general) GLNAME( _mesa_sse_transform_points2_general ): - + _CET_ENDBR #define FRAME_OFFSET 8 PUSH_L ( ESI ) PUSH_L ( EDI ) @@ -108,7 +108,7 @@ ALIGNTEXT4 GLOBL GLNAME(_mesa_sse_transform_points2_identity) HIDDEN(_mesa_sse_transform_points2_identity) GLNAME( _mesa_sse_transform_points2_identity ): - + _CET_ENDBR #define FRAME_OFFSET 8 PUSH_L ( ESI ) PUSH_L ( EDI ) @@ -161,7 +161,7 @@ ALIGNTEXT4 GLOBL GLNAME(_mesa_sse_transform_points2_3d_no_rot) HIDDEN(_mesa_sse_transform_points2_3d_no_rot) GLNAME(_mesa_sse_transform_points2_3d_no_rot): - + _CET_ENDBR #define FRAME_OFFSET 8 PUSH_L( ESI ) PUSH_L( EDI ) @@ -222,7 +222,7 @@ ALIGNTEXT4 GLOBL GLNAME(_mesa_sse_transform_points2_perspective) HIDDEN(_mesa_sse_transform_points2_perspective) GLNAME(_mesa_sse_transform_points2_perspective): - + _CET_ENDBR #define FRAME_OFFSET 8 PUSH_L ( ESI ) PUSH_L ( EDI ) @@ -281,7 +281,7 @@ ALIGNTEXT4 GLOBL GLNAME(_mesa_sse_transform_points2_2d) HIDDEN(_mesa_sse_transform_points2_2d) GLNAME(_mesa_sse_transform_points2_2d): - + _CET_ENDBR #define FRAME_OFFSET 8 PUSH_L( ESI ) PUSH_L( EDI ) @@ -344,7 +344,7 @@ ALIGNTEXT4 GLOBL GLNAME(_mesa_sse_transform_points2_2d_no_rot) HIDDEN(_mesa_sse_transform_points2_2d_no_rot) GLNAME(_mesa_sse_transform_points2_2d_no_rot): - + _CET_ENDBR #define FRAME_OFFSET 8 PUSH_L( ESI ) PUSH_L( EDI ) @@ -401,7 +401,7 @@ ALIGNTEXT4 GLOBL GLNAME(_mesa_sse_transform_points2_3d) HIDDEN(_mesa_sse_transform_points2_3d) GLNAME(_mesa_sse_transform_points2_3d): - + _CET_ENDBR #define FRAME_OFFSET 8 PUSH_L( ESI ) PUSH_L( EDI ) diff --git a/src/mesa/x86/sse_xform3.S b/src/mesa/x86/sse_xform3.S index 93387860389..fe0ccca1a11 100644 --- a/src/mesa/x86/sse_xform3.S +++ b/src/mesa/x86/sse_xform3.S @@ -47,7 +47,7 @@ ALIGNTEXT4 GLOBL GLNAME(_mesa_sse_transform_points3_general) HIDDEN(_mesa_sse_transform_points3_general) GLNAME( _mesa_sse_transform_points3_general ): - + _CET_ENDBR #define FRAME_OFFSET 8 PUSH_L ( ESI ) PUSH_L ( EDI ) @@ -117,7 +117,7 @@ ALIGNTEXT4 GLOBL GLNAME(_mesa_sse_transform_points3_identity) HIDDEN(_mesa_sse_transform_points3_identity) GLNAME( _mesa_sse_transform_points3_identity ): - + _CET_ENDBR #define FRAME_OFFSET 8 PUSH_L ( ESI ) PUSH_L ( EDI ) @@ -172,7 +172,7 @@ ALIGNTEXT4 GLOBL GLNAME(_mesa_sse_transform_points3_3d_no_rot) HIDDEN(_mesa_sse_transform_points3_3d_no_rot) GLNAME(_mesa_sse_transform_points3_3d_no_rot): - + _CET_ENDBR #define FRAME_OFFSET 8 PUSH_L( ESI ) PUSH_L( EDI ) @@ -240,7 +240,7 @@ ALIGNTEXT4 GLOBL GLNAME(_mesa_sse_transform_points3_perspective) HIDDEN(_mesa_sse_transform_points3_perspective) GLNAME(_mesa_sse_transform_points3_perspective): - + _CET_ENDBR #define FRAME_OFFSET 8 PUSH_L ( ESI ) PUSH_L ( EDI ) @@ -313,7 +313,7 @@ ALIGNTEXT4 GLOBL GLNAME(_mesa_sse_transform_points3_2d) HIDDEN(_mesa_sse_transform_points3_2d) GLNAME(_mesa_sse_transform_points3_2d): - + _CET_ENDBR #define FRAME_OFFSET 8 PUSH_L( ESI ) PUSH_L( EDI ) @@ -378,7 +378,7 @@ ALIGNTEXT4 GLOBL GLNAME(_mesa_sse_transform_points3_2d_no_rot) HIDDEN(_mesa_sse_transform_points3_2d_no_rot) GLNAME(_mesa_sse_transform_points3_2d_no_rot): - + _CET_ENDBR #define FRAME_OFFSET 8 PUSH_L( ESI ) PUSH_L( EDI ) @@ -439,7 +439,7 @@ ALIGNTEXT4 GLOBL GLNAME(_mesa_sse_transform_points3_3d) HIDDEN(_mesa_sse_transform_points3_3d) GLNAME(_mesa_sse_transform_points3_3d): - + _CET_ENDBR #define FRAME_OFFSET 8 PUSH_L( ESI ) PUSH_L( EDI ) diff --git a/src/mesa/x86/sse_xform4.S b/src/mesa/x86/sse_xform4.S index d81e9a5b9a1..bd322e822d5 100644 --- a/src/mesa/x86/sse_xform4.S +++ b/src/mesa/x86/sse_xform4.S @@ -44,7 +44,7 @@ ALIGNTEXT16 GLOBL GLNAME( _mesa_sse_transform_points4_general ) HIDDEN(_mesa_sse_transform_points4_general) GLNAME( _mesa_sse_transform_points4_general ): - + _CET_ENDBR PUSH_L( ESI ) PUSH_L( EDI ) @@ -116,7 +116,7 @@ ALIGNTEXT4 GLOBL GLNAME( _mesa_sse_transform_points4_3d ) HIDDEN(_mesa_sse_transform_points4_3d) GLNAME( _mesa_sse_transform_points4_3d ): - + _CET_ENDBR PUSH_L( ESI ) PUSH_L( EDI ) @@ -188,7 +188,7 @@ ALIGNTEXT16 GLOBL GLNAME( _mesa_sse_transform_points4_identity ) HIDDEN(_mesa_sse_transform_points4_identity) GLNAME( _mesa_sse_transform_points4_identity ): - + _CET_ENDBR PUSH_L( ESI ) PUSH_L( EDI ) diff --git a/src/mesa/x86/x86_cliptest.S b/src/mesa/x86/x86_cliptest.S index 231c029e84f..6ae64ae8564 100644 --- a/src/mesa/x86/x86_cliptest.S +++ b/src/mesa/x86/x86_cliptest.S @@ -104,7 +104,7 @@ ALIGNTEXT16 GLOBL GLNAME( _mesa_x86_cliptest_points4 ) HIDDEN(_mesa_x86_cliptest_points4) GLNAME( _mesa_x86_cliptest_points4 ): - + _CET_ENDBR #ifdef ELFPIC #define FRAME_OFFSET 20 #else @@ -279,7 +279,7 @@ ALIGNTEXT16 GLOBL GLNAME( _mesa_x86_cliptest_points4_np ) HIDDEN(_mesa_x86_cliptest_points4_np) GLNAME( _mesa_x86_cliptest_points4_np ): - + _CET_ENDBR #ifdef ELFPIC #define FRAME_OFFSET 20 #else -- 2.30.2