1fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes/*
2fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes * Mesa 3-D graphics library
3640492aec90b955820a762ce7724ebf681f924a8Brian Paul * Version:  6.3
4fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes *
5640492aec90b955820a762ce7724ebf681f924a8Brian Paul * Copyright (C) 1999-2004  Brian Paul   All Rights Reserved.
6fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes *
7fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes * Permission is hereby granted, free of charge, to any person obtaining a
8fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes * copy of this software and associated documentation files (the "Software"),
9fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes * to deal in the Software without restriction, including without limitation
10fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes * the rights to use, copy, modify, merge, publish, distribute, sublicense,
11fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes * and/or sell copies of the Software, and to permit persons to whom the
12fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes * Software is furnished to do so, subject to the following conditions:
13fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes *
14fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes * The above copyright notice and this permission notice shall be included
15fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes * in all copies or substantial portions of the Software.
16fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes *
17fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
20fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
21fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes */
24fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes
25fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes/*
26fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes * Check extended CPU capabilities.  Now justs returns the raw CPUID
27fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes * feature information, allowing the higher level code to interpret the
28fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes * results.
29fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes *
30fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes * Written by Holger Waechtler <holger@akaflieg.extern.tu-berlin.de>
31fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes *
32fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes * Cleaned up and simplified by Gareth Hughes <gareth@valinux.com>
33068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul *
34fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes */
35fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes
360b2fa873c6da02f169a76d74d3bedd91236f8e28Brian Paul/*
370b2fa873c6da02f169a76d74d3bedd91236f8e28Brian Paul * NOTE: Avoid using spaces in between '(' ')' and arguments, especially
380b2fa873c6da02f169a76d74d3bedd91236f8e28Brian Paul * with macros like CONST, LLBL that expand to CONCAT(...).  Putting spaces
390b2fa873c6da02f169a76d74d3bedd91236f8e28Brian Paul * in there will break the build on some platforms.
400b2fa873c6da02f169a76d74d3bedd91236f8e28Brian Paul */
410b2fa873c6da02f169a76d74d3bedd91236f8e28Brian Paul
420a59ca6cae6ef24990f1c41c8c7857214489443cGareth Hughes#include "matypes.h"
43a7573d805e9fa4d985cf48f467df5bd39dc3e7c0Chris Rankin#include "assyntax.h"
44fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes#include "common_x86_features.h"
45fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes
46068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul	SEG_TEXT
47fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes
48068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian PaulALIGNTEXT4
49068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian PaulGLOBL GLNAME(_mesa_x86_has_cpuid)
50932dee87e3002be87dc3bcc49efd8ac9ac3e1fa4Brian PaulHIDDEN(_mesa_x86_has_cpuid)
51068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian PaulGLNAME(_mesa_x86_has_cpuid):
52fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes
53068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul	/* Test for the CPUID command.  If the ID Flag bit in EFLAGS
54068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul	 * (bit 21) is writable, the CPUID command is present */
55068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul	PUSHF_L
56068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul	POP_L	(EAX)
57068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul	MOV_L	(EAX, ECX)
58068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul	XOR_L	(CONST(0x00200000), EAX)
59068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul	PUSH_L	(EAX)
60068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul	POPF_L
61068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul	PUSHF_L
62068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul	POP_L	(EAX)
63fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes
64068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul	/* Verify the ID Flag bit has been written. */
65068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul	CMP_L	(ECX, EAX)
66068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul	SETNE	(AL)
67068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul	XOR_L	(CONST(0xff), EAX)
68fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes
69068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul	RET
70fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes
712ac44e2509dff861d50239d3248c60bf08f3ed92Gareth Hughes
72068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian PaulALIGNTEXT4
73068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian PaulGLOBL GLNAME(_mesa_x86_cpuid)
74932dee87e3002be87dc3bcc49efd8ac9ac3e1fa4Brian PaulHIDDEN(_mesa_x86_cpuid)
75068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian PaulGLNAME(_mesa_x86_cpuid):
76fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes
77068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul	MOV_L	(REGOFF(4, ESP), EAX)		/* cpuid op */
78068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul	PUSH_L	(EDI)
79068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul	PUSH_L	(EBX)
80fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes
81068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul	CPUID
82fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes
83068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul	MOV_L	(REGOFF(16, ESP), EDI)	/* *eax */
84068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul	MOV_L	(EAX, REGIND(EDI))
85068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul	MOV_L	(REGOFF(20, ESP), EDI)	/* *ebx */
86068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul	MOV_L	(EBX, REGIND(EDI))
87068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul	MOV_L	(REGOFF(24, ESP), EDI)	/* *ecx */
88068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul	MOV_L	(ECX, REGIND(EDI))
89068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul	MOV_L	(REGOFF(28, ESP), EDI)	/* *edx */
90068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul	MOV_L	(EDX, REGIND(EDI))
91068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul
92068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul	POP_L	(EBX)
93068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul	POP_L	(EDI)
94068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul	RET
95fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes
96068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian PaulALIGNTEXT4
97068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian PaulGLOBL GLNAME(_mesa_x86_cpuid_eax)
98932dee87e3002be87dc3bcc49efd8ac9ac3e1fa4Brian PaulHIDDEN(_mesa_x86_cpuid_eax)
99068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian PaulGLNAME(_mesa_x86_cpuid_eax):
100fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes
101068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul	MOV_L	(REGOFF(4, ESP), EAX)		/* cpuid op */
102068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul	PUSH_L	(EBX)
103fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes
104fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes	CPUID
105fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes
106068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul	POP_L	(EBX)
107068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul	RET
108b6d90e50ea363f642027cbf31ae1b98a25443c8aKeith Whitwell
109068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian PaulALIGNTEXT4
110068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian PaulGLOBL GLNAME(_mesa_x86_cpuid_ebx)
111932dee87e3002be87dc3bcc49efd8ac9ac3e1fa4Brian PaulHIDDEN(_mesa_x86_cpuid_ebx)
112068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian PaulGLNAME(_mesa_x86_cpuid_ebx):
113fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes
114068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul	MOV_L	(REGOFF(4, ESP), EAX)		/* cpuid op */
115068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul	PUSH_L	(EBX)
116fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes
117902d2faadf37a5627ab2cbcd8993825c8749ec82Brian Paul	CPUID
118068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul	MOV_L	(EBX, EAX)			/* return EBX */
119902d2faadf37a5627ab2cbcd8993825c8749ec82Brian Paul
120068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul	POP_L	(EBX)
121068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul	RET
122fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes
123068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian PaulALIGNTEXT4
124068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian PaulGLOBL GLNAME(_mesa_x86_cpuid_ecx)
125932dee87e3002be87dc3bcc49efd8ac9ac3e1fa4Brian PaulHIDDEN(_mesa_x86_cpuid_ecx)
126068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian PaulGLNAME(_mesa_x86_cpuid_ecx):
127fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes
128068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul	MOV_L	(REGOFF(4, ESP), EAX)		/* cpuid op */
129068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul	PUSH_L	(EBX)
130fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes
131068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul	CPUID
132068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul	MOV_L	(ECX, EAX)			/* return ECX */
133fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes
134068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul	POP_L	(EBX)
135068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul	RET
136fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes
137068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian PaulALIGNTEXT4
138068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian PaulGLOBL GLNAME(_mesa_x86_cpuid_edx)
139932dee87e3002be87dc3bcc49efd8ac9ac3e1fa4Brian PaulHIDDEN(_mesa_x86_cpuid_edx)
140068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian PaulGLNAME(_mesa_x86_cpuid_edx):
141fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes
142068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul	MOV_L	(REGOFF(4, ESP), EAX)		/* cpuid op */
143068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul	PUSH_L	(EBX)
144fc2427e81b1c648550d0368652d6a475df785027Gareth Hughes
145068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul	CPUID
146068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul	MOV_L	(EDX, EAX)			/* return EDX */
1472ac44e2509dff861d50239d3248c60bf08f3ed92Gareth Hughes
148068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul	POP_L	(EBX)
149068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul	RET
1502ac44e2509dff861d50239d3248c60bf08f3ed92Gareth Hughes
1511b2fef5c28a40cd001598071e25b876ad4fccdd1Gareth Hughes#ifdef USE_SSE_ASM
1522ac44e2509dff861d50239d3248c60bf08f3ed92Gareth Hughes/* Execute an SSE instruction to see if the operating system correctly
1532ac44e2509dff861d50239d3248c60bf08f3ed92Gareth Hughes * supports SSE.  A signal handler for SIGILL should have been set
1542ac44e2509dff861d50239d3248c60bf08f3ed92Gareth Hughes * before calling this function, otherwise this could kill the client
1552ac44e2509dff861d50239d3248c60bf08f3ed92Gareth Hughes * application.
156640492aec90b955820a762ce7724ebf681f924a8Brian Paul *
157640492aec90b955820a762ce7724ebf681f924a8Brian Paul *        -----> !!!! ATTENTION DEVELOPERS !!!! <-----
158640492aec90b955820a762ce7724ebf681f924a8Brian Paul *
159640492aec90b955820a762ce7724ebf681f924a8Brian Paul * If you're debugging with gdb and you get stopped in this function,
160640492aec90b955820a762ce7724ebf681f924a8Brian Paul * just type 'continue'!  Execution will proceed normally.
161640492aec90b955820a762ce7724ebf681f924a8Brian Paul * See freedesktop.org bug #1709 for more info.
1622ac44e2509dff861d50239d3248c60bf08f3ed92Gareth Hughes */
1632ac44e2509dff861d50239d3248c60bf08f3ed92Gareth HughesALIGNTEXT4
1641b2fef5c28a40cd001598071e25b876ad4fccdd1Gareth HughesGLOBL GLNAME( _mesa_test_os_sse_support )
165932dee87e3002be87dc3bcc49efd8ac9ac3e1fa4Brian PaulHIDDEN(_mesa_test_os_sse_support)
1661b2fef5c28a40cd001598071e25b876ad4fccdd1Gareth HughesGLNAME( _mesa_test_os_sse_support ):
1672ac44e2509dff861d50239d3248c60bf08f3ed92Gareth Hughes
1682ac44e2509dff861d50239d3248c60bf08f3ed92Gareth Hughes	XORPS	( XMM0, XMM0 )
1692ac44e2509dff861d50239d3248c60bf08f3ed92Gareth Hughes
1702ac44e2509dff861d50239d3248c60bf08f3ed92Gareth Hughes	RET
1712ac44e2509dff861d50239d3248c60bf08f3ed92Gareth Hughes
1722ac44e2509dff861d50239d3248c60bf08f3ed92Gareth Hughes
1732ac44e2509dff861d50239d3248c60bf08f3ed92Gareth Hughes/* Perform an SSE divide-by-zero to see if the operating system
1742ac44e2509dff861d50239d3248c60bf08f3ed92Gareth Hughes * correctly supports unmasked SIMD FPU exceptions.  Signal handlers for
1752ac44e2509dff861d50239d3248c60bf08f3ed92Gareth Hughes * SIGILL and SIGFPE should have been set before calling this function,
1762ac44e2509dff861d50239d3248c60bf08f3ed92Gareth Hughes * otherwise this could kill the client application.
1772ac44e2509dff861d50239d3248c60bf08f3ed92Gareth Hughes */
1782ac44e2509dff861d50239d3248c60bf08f3ed92Gareth HughesALIGNTEXT4
1791b2fef5c28a40cd001598071e25b876ad4fccdd1Gareth HughesGLOBL GLNAME( _mesa_test_os_sse_exception_support )
180932dee87e3002be87dc3bcc49efd8ac9ac3e1fa4Brian PaulHIDDEN(_mesa_test_os_sse_exception_support)
1811b2fef5c28a40cd001598071e25b876ad4fccdd1Gareth HughesGLNAME( _mesa_test_os_sse_exception_support ):
1822ac44e2509dff861d50239d3248c60bf08f3ed92Gareth Hughes
1832ac44e2509dff861d50239d3248c60bf08f3ed92Gareth Hughes	PUSH_L	( EBP )
1842ac44e2509dff861d50239d3248c60bf08f3ed92Gareth Hughes	MOV_L	( ESP, EBP )
1852ac44e2509dff861d50239d3248c60bf08f3ed92Gareth Hughes	SUB_L	( CONST( 8 ), ESP )
1862ac44e2509dff861d50239d3248c60bf08f3ed92Gareth Hughes
1872ac44e2509dff861d50239d3248c60bf08f3ed92Gareth Hughes	/* Save the original MXCSR register value.
1882ac44e2509dff861d50239d3248c60bf08f3ed92Gareth Hughes	 */
1892ac44e2509dff861d50239d3248c60bf08f3ed92Gareth Hughes	STMXCSR	( REGOFF( -4, EBP ) )
1902ac44e2509dff861d50239d3248c60bf08f3ed92Gareth Hughes
1912ac44e2509dff861d50239d3248c60bf08f3ed92Gareth Hughes	/* Unmask the divide-by-zero exception and perform one.
1922ac44e2509dff861d50239d3248c60bf08f3ed92Gareth Hughes	 */
1932ac44e2509dff861d50239d3248c60bf08f3ed92Gareth Hughes	STMXCSR	( REGOFF( -8, EBP ) )
1942ac44e2509dff861d50239d3248c60bf08f3ed92Gareth Hughes	AND_L	( CONST( 0xfffffdff ), REGOFF( -8, EBP ) )
1952ac44e2509dff861d50239d3248c60bf08f3ed92Gareth Hughes	LDMXCSR	( REGOFF( -8, EBP ) )
1962ac44e2509dff861d50239d3248c60bf08f3ed92Gareth Hughes
1972ac44e2509dff861d50239d3248c60bf08f3ed92Gareth Hughes	XORPS	( XMM0, XMM0 )
19835883ceb9389f9e5b4be8233f2326367c6aecddbBrian Paul
19935883ceb9389f9e5b4be8233f2326367c6aecddbBrian Paul	PUSH_L	( CONST( 0x3f800000 ) )
20035883ceb9389f9e5b4be8233f2326367c6aecddbBrian Paul	PUSH_L	( CONST( 0x3f800000 ) )
20135883ceb9389f9e5b4be8233f2326367c6aecddbBrian Paul	PUSH_L	( CONST( 0x3f800000 ) )
20235883ceb9389f9e5b4be8233f2326367c6aecddbBrian Paul	PUSH_L	( CONST( 0x3f800000 ) )
20335883ceb9389f9e5b4be8233f2326367c6aecddbBrian Paul
20435883ceb9389f9e5b4be8233f2326367c6aecddbBrian Paul	MOVUPS	( REGIND( ESP ), XMM1 )
20535883ceb9389f9e5b4be8233f2326367c6aecddbBrian Paul
2062ac44e2509dff861d50239d3248c60bf08f3ed92Gareth Hughes	DIVPS	( XMM0, XMM1 )
2072ac44e2509dff861d50239d3248c60bf08f3ed92Gareth Hughes
2082ac44e2509dff861d50239d3248c60bf08f3ed92Gareth Hughes	/* Restore the original MXCSR register value.
2092ac44e2509dff861d50239d3248c60bf08f3ed92Gareth Hughes	 */
2102ac44e2509dff861d50239d3248c60bf08f3ed92Gareth Hughes	LDMXCSR	( REGOFF( -4, EBP ) )
2112ac44e2509dff861d50239d3248c60bf08f3ed92Gareth Hughes
2122ac44e2509dff861d50239d3248c60bf08f3ed92Gareth Hughes	LEAVE
2132ac44e2509dff861d50239d3248c60bf08f3ed92Gareth Hughes	RET
214ccc8b9239c8ae5c1f5364a5b99ffa3f8b5a731abBrian Paul
215ccc8b9239c8ae5c1f5364a5b99ffa3f8b5a731abBrian Paul#endif
216068a4812fc1d9e321aa65a91ceb8bc824bedc69aBrian Paul
217fcdc6a7d2488defd66bc7e8398c6d8c9a6190a1aKristian Høgsberg
218fcdc6a7d2488defd66bc7e8398c6d8c9a6190a1aKristian Høgsberg#if defined (__ELF__) && defined (__linux__)
219fcdc6a7d2488defd66bc7e8398c6d8c9a6190a1aKristian Høgsberg	.section .note.GNU-stack,"",%progbits
220fcdc6a7d2488defd66bc7e8398c6d8c9a6190a1aKristian Høgsberg#endif
221