xref: /onnv-gate/usr/src/uts/intel/dtrace/dtrace_asm.s (revision 0:68f95e015346)
1*0Sstevel@tonic-gate/*
2*0Sstevel@tonic-gate * CDDL HEADER START
3*0Sstevel@tonic-gate *
4*0Sstevel@tonic-gate * The contents of this file are subject to the terms of the
5*0Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only
6*0Sstevel@tonic-gate * (the "License").  You may not use this file except in compliance
7*0Sstevel@tonic-gate * with the License.
8*0Sstevel@tonic-gate *
9*0Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*0Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing.
11*0Sstevel@tonic-gate * See the License for the specific language governing permissions
12*0Sstevel@tonic-gate * and limitations under the License.
13*0Sstevel@tonic-gate *
14*0Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each
15*0Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*0Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the
17*0Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying
18*0Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner]
19*0Sstevel@tonic-gate *
20*0Sstevel@tonic-gate * CDDL HEADER END
21*0Sstevel@tonic-gate */
22*0Sstevel@tonic-gate/*
23*0Sstevel@tonic-gate * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
24*0Sstevel@tonic-gate * Use is subject to license terms.
25*0Sstevel@tonic-gate */
26*0Sstevel@tonic-gate
27*0Sstevel@tonic-gate#pragma ident	"%Z%%M%	%I%	%E% SMI"
28*0Sstevel@tonic-gate
29*0Sstevel@tonic-gate#include <sys/asm_linkage.h>
30*0Sstevel@tonic-gate#include <sys/regset.h>
31*0Sstevel@tonic-gate
32*0Sstevel@tonic-gate#if defined(lint)
33*0Sstevel@tonic-gate#include <sys/dtrace_impl.h>
34*0Sstevel@tonic-gate#endif
35*0Sstevel@tonic-gate
36*0Sstevel@tonic-gate#if defined(lint) || defined(__lint)
37*0Sstevel@tonic-gate
38*0Sstevel@tonic-gategreg_t
39*0Sstevel@tonic-gatedtrace_getfp(void)
40*0Sstevel@tonic-gate{ return (0); }
41*0Sstevel@tonic-gate
42*0Sstevel@tonic-gate#else	/* lint */
43*0Sstevel@tonic-gate
44*0Sstevel@tonic-gate#if defined(__amd64)
45*0Sstevel@tonic-gate
46*0Sstevel@tonic-gate	ENTRY_NP(dtrace_getfp)
47*0Sstevel@tonic-gate	movq	%rbp, %rax
48*0Sstevel@tonic-gate	ret
49*0Sstevel@tonic-gate	SET_SIZE(dtrace_getfp)
50*0Sstevel@tonic-gate
51*0Sstevel@tonic-gate#elif defined(__i386)
52*0Sstevel@tonic-gate
53*0Sstevel@tonic-gate	ENTRY_NP(dtrace_getfp)
54*0Sstevel@tonic-gate	movl	%ebp, %eax
55*0Sstevel@tonic-gate	ret
56*0Sstevel@tonic-gate	SET_SIZE(dtrace_getfp)
57*0Sstevel@tonic-gate
58*0Sstevel@tonic-gate#endif	/* __i386 */
59*0Sstevel@tonic-gate#endif	/* lint */
60*0Sstevel@tonic-gate
61*0Sstevel@tonic-gate
62*0Sstevel@tonic-gate#if defined(lint) || defined(__lint)
63*0Sstevel@tonic-gate
64*0Sstevel@tonic-gateuint32_t
65*0Sstevel@tonic-gatedtrace_cas32(uint32_t *target, uint32_t cmp, uint32_t new)
66*0Sstevel@tonic-gate{
67*0Sstevel@tonic-gate	uint32_t old;
68*0Sstevel@tonic-gate
69*0Sstevel@tonic-gate	if ((old = *target) == cmp)
70*0Sstevel@tonic-gate		*target = new;
71*0Sstevel@tonic-gate	return (old);
72*0Sstevel@tonic-gate}
73*0Sstevel@tonic-gate
74*0Sstevel@tonic-gatevoid *
75*0Sstevel@tonic-gatedtrace_casptr(void *target, void *cmp, void *new)
76*0Sstevel@tonic-gate{
77*0Sstevel@tonic-gate	void *old;
78*0Sstevel@tonic-gate
79*0Sstevel@tonic-gate	if ((old = *(void **)target) == cmp)
80*0Sstevel@tonic-gate		*(void **)target = new;
81*0Sstevel@tonic-gate	return (old);
82*0Sstevel@tonic-gate}
83*0Sstevel@tonic-gate
84*0Sstevel@tonic-gate#else	/* lint */
85*0Sstevel@tonic-gate
86*0Sstevel@tonic-gate#if defined(__amd64)
87*0Sstevel@tonic-gate
88*0Sstevel@tonic-gate	ENTRY(dtrace_cas32)
89*0Sstevel@tonic-gate	movl	%esi, %eax
90*0Sstevel@tonic-gate	lock
91*0Sstevel@tonic-gate	cmpxchgl %edx, (%rdi)
92*0Sstevel@tonic-gate	ret
93*0Sstevel@tonic-gate	SET_SIZE(dtrace_cas32)
94*0Sstevel@tonic-gate
95*0Sstevel@tonic-gate	ENTRY(dtrace_casptr)
96*0Sstevel@tonic-gate	movq	%rsi, %rax
97*0Sstevel@tonic-gate	lock
98*0Sstevel@tonic-gate	cmpxchgq %rdx, (%rdi)
99*0Sstevel@tonic-gate	ret
100*0Sstevel@tonic-gate	SET_SIZE(dtrace_casptr)
101*0Sstevel@tonic-gate
102*0Sstevel@tonic-gate#elif defined(__i386)
103*0Sstevel@tonic-gate
104*0Sstevel@tonic-gate	ENTRY(dtrace_cas32)
105*0Sstevel@tonic-gate	ALTENTRY(dtrace_casptr)
106*0Sstevel@tonic-gate	movl	4(%esp), %edx
107*0Sstevel@tonic-gate	movl	8(%esp), %eax
108*0Sstevel@tonic-gate	movl	12(%esp), %ecx
109*0Sstevel@tonic-gate	lock
110*0Sstevel@tonic-gate	cmpxchgl %ecx, (%edx)
111*0Sstevel@tonic-gate	ret
112*0Sstevel@tonic-gate	SET_SIZE(dtrace_casptr)
113*0Sstevel@tonic-gate	SET_SIZE(dtrace_cas32)
114*0Sstevel@tonic-gate
115*0Sstevel@tonic-gate#endif	/* __i386 */
116*0Sstevel@tonic-gate#endif	/* lint */
117*0Sstevel@tonic-gate
118*0Sstevel@tonic-gate#if defined(lint)
119*0Sstevel@tonic-gate
120*0Sstevel@tonic-gate/*ARGSUSED*/
121*0Sstevel@tonic-gateuintptr_t
122*0Sstevel@tonic-gatedtrace_caller(int aframes)
123*0Sstevel@tonic-gate{
124*0Sstevel@tonic-gate	return (0);
125*0Sstevel@tonic-gate}
126*0Sstevel@tonic-gate
127*0Sstevel@tonic-gate#else	/* lint */
128*0Sstevel@tonic-gate
129*0Sstevel@tonic-gate#if defined(__amd64)
130*0Sstevel@tonic-gate	ENTRY(dtrace_caller)
131*0Sstevel@tonic-gate	movq	$-1, %rax
132*0Sstevel@tonic-gate	ret
133*0Sstevel@tonic-gate	SET_SIZE(dtrace_caller)
134*0Sstevel@tonic-gate
135*0Sstevel@tonic-gate#elif defined(__i386)
136*0Sstevel@tonic-gate
137*0Sstevel@tonic-gate	ENTRY(dtrace_caller)
138*0Sstevel@tonic-gate	movl	$-1, %eax
139*0Sstevel@tonic-gate	ret
140*0Sstevel@tonic-gate	SET_SIZE(dtrace_caller)
141*0Sstevel@tonic-gate
142*0Sstevel@tonic-gate#endif	/* __i386 */
143*0Sstevel@tonic-gate#endif	/* lint */
144*0Sstevel@tonic-gate
145*0Sstevel@tonic-gate#if defined(lint)
146*0Sstevel@tonic-gate
147*0Sstevel@tonic-gate/*ARGSUSED*/
148*0Sstevel@tonic-gatevoid
149*0Sstevel@tonic-gatedtrace_copy(uintptr_t src, uintptr_t dest, size_t size)
150*0Sstevel@tonic-gate{}
151*0Sstevel@tonic-gate
152*0Sstevel@tonic-gate#else
153*0Sstevel@tonic-gate
154*0Sstevel@tonic-gate#if defined(__amd64)
155*0Sstevel@tonic-gate
156*0Sstevel@tonic-gate	ENTRY(dtrace_copy)
157*0Sstevel@tonic-gate	pushq	%rbp
158*0Sstevel@tonic-gate	movq	%rsp, %rbp
159*0Sstevel@tonic-gate
160*0Sstevel@tonic-gate	xchgq	%rdi, %rsi		/* make %rsi source, %rdi dest */
161*0Sstevel@tonic-gate	movq	%rdx, %rcx		/* load count */
162*0Sstevel@tonic-gate	repz				/* repeat for count ... */
163*0Sstevel@tonic-gate	smovb				/*   move from %ds:rsi to %ed:rdi */
164*0Sstevel@tonic-gate	leave
165*0Sstevel@tonic-gate	ret
166*0Sstevel@tonic-gate	SET_SIZE(dtrace_copy)
167*0Sstevel@tonic-gate
168*0Sstevel@tonic-gate#elif defined(__i386)
169*0Sstevel@tonic-gate
170*0Sstevel@tonic-gate	ENTRY(dtrace_copy)
171*0Sstevel@tonic-gate	pushl	%ebp
172*0Sstevel@tonic-gate	movl	%esp, %ebp
173*0Sstevel@tonic-gate	pushl	%esi
174*0Sstevel@tonic-gate	pushl	%edi
175*0Sstevel@tonic-gate
176*0Sstevel@tonic-gate	movl	8(%ebp), %esi		/ Load source address
177*0Sstevel@tonic-gate	movl	12(%ebp), %edi		/ Load destination address
178*0Sstevel@tonic-gate	movl	16(%ebp), %ecx		/ Load count
179*0Sstevel@tonic-gate	repz				/ Repeat for count...
180*0Sstevel@tonic-gate	smovb				/   move from %ds:si to %es:di
181*0Sstevel@tonic-gate
182*0Sstevel@tonic-gate	popl	%edi
183*0Sstevel@tonic-gate	popl	%esi
184*0Sstevel@tonic-gate	movl	%ebp, %esp
185*0Sstevel@tonic-gate	popl	%ebp
186*0Sstevel@tonic-gate	ret
187*0Sstevel@tonic-gate	SET_SIZE(dtrace_copy)
188*0Sstevel@tonic-gate
189*0Sstevel@tonic-gate#endif	/* __i386 */
190*0Sstevel@tonic-gate#endif
191*0Sstevel@tonic-gate
192*0Sstevel@tonic-gate#if defined(lint)
193*0Sstevel@tonic-gate
194*0Sstevel@tonic-gate/*ARGSUSED*/
195*0Sstevel@tonic-gatevoid
196*0Sstevel@tonic-gatedtrace_copystr(uintptr_t uaddr, uintptr_t kaddr, size_t size)
197*0Sstevel@tonic-gate{}
198*0Sstevel@tonic-gate
199*0Sstevel@tonic-gate#else
200*0Sstevel@tonic-gate
201*0Sstevel@tonic-gate#if defined(__amd64)
202*0Sstevel@tonic-gate
203*0Sstevel@tonic-gate	ENTRY(dtrace_copystr)
204*0Sstevel@tonic-gate	pushq	%rbp
205*0Sstevel@tonic-gate	movq	%rsp, %rbp
206*0Sstevel@tonic-gate
207*0Sstevel@tonic-gate0:
208*0Sstevel@tonic-gate	movb	(%rdi), %al		/* load from source */
209*0Sstevel@tonic-gate	movb	%al, (%rsi)		/* store to destination */
210*0Sstevel@tonic-gate	addq	$1, %rdi		/* increment source pointer */
211*0Sstevel@tonic-gate	addq	$1, %rsi		/* increment destination pointer */
212*0Sstevel@tonic-gate	subq	$1, %rdx		/* decrement remaining count */
213*0Sstevel@tonic-gate	cmpb	$0, %al
214*0Sstevel@tonic-gate	je	1f
215*0Sstevel@tonic-gate	cmpq	$0, %rdx
216*0Sstevel@tonic-gate	jne	0b
217*0Sstevel@tonic-gate1:
218*0Sstevel@tonic-gate	leave
219*0Sstevel@tonic-gate	ret
220*0Sstevel@tonic-gate
221*0Sstevel@tonic-gate	SET_SIZE(dtrace_copystr)
222*0Sstevel@tonic-gate
223*0Sstevel@tonic-gate#elif defined(__i386)
224*0Sstevel@tonic-gate
225*0Sstevel@tonic-gate	ENTRY(dtrace_copystr)
226*0Sstevel@tonic-gate
227*0Sstevel@tonic-gate	pushl	%ebp			/ Setup stack frame
228*0Sstevel@tonic-gate	movl	%esp, %ebp
229*0Sstevel@tonic-gate	pushl	%ebx			/ Save registers
230*0Sstevel@tonic-gate
231*0Sstevel@tonic-gate	movl	8(%ebp), %ebx		/ Load source address
232*0Sstevel@tonic-gate	movl	12(%ebp), %edx		/ Load destination address
233*0Sstevel@tonic-gate	movl	16(%ebp), %ecx		/ Load count
234*0Sstevel@tonic-gate
235*0Sstevel@tonic-gate0:
236*0Sstevel@tonic-gate	movb	(%ebx), %al		/ Load from source
237*0Sstevel@tonic-gate	movb	%al, (%edx)		/ Store to destination
238*0Sstevel@tonic-gate	incl	%ebx			/ Increment source pointer
239*0Sstevel@tonic-gate	incl	%edx			/ Increment destination pointer
240*0Sstevel@tonic-gate	decl	%ecx			/ Decrement remaining count
241*0Sstevel@tonic-gate	cmpb	$0, %al
242*0Sstevel@tonic-gate	je	1f
243*0Sstevel@tonic-gate	cmpl	$0, %ecx
244*0Sstevel@tonic-gate	jne	0b
245*0Sstevel@tonic-gate
246*0Sstevel@tonic-gate1:
247*0Sstevel@tonic-gate	popl	%ebx
248*0Sstevel@tonic-gate	movl	%ebp, %esp
249*0Sstevel@tonic-gate	popl	%ebp
250*0Sstevel@tonic-gate	ret
251*0Sstevel@tonic-gate
252*0Sstevel@tonic-gate	SET_SIZE(dtrace_copystr)
253*0Sstevel@tonic-gate
254*0Sstevel@tonic-gate#endif	/* __i386 */
255*0Sstevel@tonic-gate#endif
256*0Sstevel@tonic-gate
257*0Sstevel@tonic-gate#if defined(lint)
258*0Sstevel@tonic-gate
259*0Sstevel@tonic-gate/*ARGSUSED*/
260*0Sstevel@tonic-gateuintptr_t
261*0Sstevel@tonic-gatedtrace_fulword(void *addr)
262*0Sstevel@tonic-gate{ return (0); }
263*0Sstevel@tonic-gate
264*0Sstevel@tonic-gate#else
265*0Sstevel@tonic-gate#if defined(__amd64)
266*0Sstevel@tonic-gate
267*0Sstevel@tonic-gate	ENTRY(dtrace_fulword)
268*0Sstevel@tonic-gate	movq	(%rdi), %rax
269*0Sstevel@tonic-gate	ret
270*0Sstevel@tonic-gate	SET_SIZE(dtrace_fulword)
271*0Sstevel@tonic-gate
272*0Sstevel@tonic-gate#elif defined(__i386)
273*0Sstevel@tonic-gate
274*0Sstevel@tonic-gate	ENTRY(dtrace_fulword)
275*0Sstevel@tonic-gate	movl	4(%esp), %ecx
276*0Sstevel@tonic-gate	xorl	%eax, %eax
277*0Sstevel@tonic-gate	movl	(%ecx), %eax
278*0Sstevel@tonic-gate	ret
279*0Sstevel@tonic-gate	SET_SIZE(dtrace_fulword)
280*0Sstevel@tonic-gate
281*0Sstevel@tonic-gate#endif	/* __i386 */
282*0Sstevel@tonic-gate#endif
283*0Sstevel@tonic-gate
284*0Sstevel@tonic-gate#if defined(lint)
285*0Sstevel@tonic-gate
286*0Sstevel@tonic-gate/*ARGSUSED*/
287*0Sstevel@tonic-gateuint8_t
288*0Sstevel@tonic-gatedtrace_fuword8_nocheck(void *addr)
289*0Sstevel@tonic-gate{ return (0); }
290*0Sstevel@tonic-gate
291*0Sstevel@tonic-gate#else
292*0Sstevel@tonic-gate#if defined(__amd64)
293*0Sstevel@tonic-gate
294*0Sstevel@tonic-gate	ENTRY(dtrace_fuword8_nocheck)
295*0Sstevel@tonic-gate	xorq	%rax, %rax
296*0Sstevel@tonic-gate	movb	(%rdi), %al
297*0Sstevel@tonic-gate	ret
298*0Sstevel@tonic-gate	SET_SIZE(dtrace_fuword8_nocheck)
299*0Sstevel@tonic-gate
300*0Sstevel@tonic-gate#elif defined(__i386)
301*0Sstevel@tonic-gate
302*0Sstevel@tonic-gate	ENTRY(dtrace_fuword8_nocheck)
303*0Sstevel@tonic-gate	movl	4(%esp), %ecx
304*0Sstevel@tonic-gate	xorl	%eax, %eax
305*0Sstevel@tonic-gate	movzbl	(%ecx), %eax
306*0Sstevel@tonic-gate	ret
307*0Sstevel@tonic-gate	SET_SIZE(dtrace_fuword8_nocheck)
308*0Sstevel@tonic-gate
309*0Sstevel@tonic-gate#endif	/* __i386 */
310*0Sstevel@tonic-gate#endif
311*0Sstevel@tonic-gate
312*0Sstevel@tonic-gate#if defined(lint)
313*0Sstevel@tonic-gate
314*0Sstevel@tonic-gate/*ARGSUSED*/
315*0Sstevel@tonic-gateuint16_t
316*0Sstevel@tonic-gatedtrace_fuword16_nocheck(void *addr)
317*0Sstevel@tonic-gate{ return (0); }
318*0Sstevel@tonic-gate
319*0Sstevel@tonic-gate#else
320*0Sstevel@tonic-gate#if defined(__amd64)
321*0Sstevel@tonic-gate
322*0Sstevel@tonic-gate	ENTRY(dtrace_fuword16_nocheck)
323*0Sstevel@tonic-gate	xorq	%rax, %rax
324*0Sstevel@tonic-gate	movw	(%rdi), %ax
325*0Sstevel@tonic-gate	ret
326*0Sstevel@tonic-gate	SET_SIZE(dtrace_fuword16_nocheck)
327*0Sstevel@tonic-gate
328*0Sstevel@tonic-gate#elif defined(__i386)
329*0Sstevel@tonic-gate
330*0Sstevel@tonic-gate	ENTRY(dtrace_fuword16_nocheck)
331*0Sstevel@tonic-gate	movl	4(%esp), %ecx
332*0Sstevel@tonic-gate	xorl	%eax, %eax
333*0Sstevel@tonic-gate	movzwl	(%ecx), %eax
334*0Sstevel@tonic-gate	ret
335*0Sstevel@tonic-gate	SET_SIZE(dtrace_fuword16_nocheck)
336*0Sstevel@tonic-gate
337*0Sstevel@tonic-gate#endif	/* __i386 */
338*0Sstevel@tonic-gate#endif
339*0Sstevel@tonic-gate
340*0Sstevel@tonic-gate#if defined(lint)
341*0Sstevel@tonic-gate
342*0Sstevel@tonic-gate/*ARGSUSED*/
343*0Sstevel@tonic-gateuint32_t
344*0Sstevel@tonic-gatedtrace_fuword32_nocheck(void *addr)
345*0Sstevel@tonic-gate{ return (0); }
346*0Sstevel@tonic-gate
347*0Sstevel@tonic-gate#else
348*0Sstevel@tonic-gate#if defined(__amd64)
349*0Sstevel@tonic-gate
350*0Sstevel@tonic-gate	ENTRY(dtrace_fuword32_nocheck)
351*0Sstevel@tonic-gate	xorq	%rax, %rax
352*0Sstevel@tonic-gate	movl	(%rdi), %eax
353*0Sstevel@tonic-gate	ret
354*0Sstevel@tonic-gate	SET_SIZE(dtrace_fuword32_nocheck)
355*0Sstevel@tonic-gate
356*0Sstevel@tonic-gate#elif defined(__i386)
357*0Sstevel@tonic-gate
358*0Sstevel@tonic-gate	ENTRY(dtrace_fuword32_nocheck)
359*0Sstevel@tonic-gate	movl	4(%esp), %ecx
360*0Sstevel@tonic-gate	xorl	%eax, %eax
361*0Sstevel@tonic-gate	movl	(%ecx), %eax
362*0Sstevel@tonic-gate	ret
363*0Sstevel@tonic-gate	SET_SIZE(dtrace_fuword32_nocheck)
364*0Sstevel@tonic-gate
365*0Sstevel@tonic-gate#endif	/* __i386 */
366*0Sstevel@tonic-gate#endif
367*0Sstevel@tonic-gate
368*0Sstevel@tonic-gate#if defined(lint)
369*0Sstevel@tonic-gate
370*0Sstevel@tonic-gate/*ARGSUSED*/
371*0Sstevel@tonic-gateuint64_t
372*0Sstevel@tonic-gatedtrace_fuword64_nocheck(void *addr)
373*0Sstevel@tonic-gate{ return (0); }
374*0Sstevel@tonic-gate
375*0Sstevel@tonic-gate#else
376*0Sstevel@tonic-gate#if defined(__amd64)
377*0Sstevel@tonic-gate
378*0Sstevel@tonic-gate	ENTRY(dtrace_fuword64_nocheck)
379*0Sstevel@tonic-gate	movq	(%rdi), %rax
380*0Sstevel@tonic-gate	ret
381*0Sstevel@tonic-gate	SET_SIZE(dtrace_fuword64_nocheck)
382*0Sstevel@tonic-gate
383*0Sstevel@tonic-gate#elif defined(__i386)
384*0Sstevel@tonic-gate
385*0Sstevel@tonic-gate	ENTRY(dtrace_fuword64_nocheck)
386*0Sstevel@tonic-gate	movl	4(%esp), %ecx
387*0Sstevel@tonic-gate	xorl	%eax, %eax
388*0Sstevel@tonic-gate	xorl	%edx, %edx
389*0Sstevel@tonic-gate	movl	(%ecx), %eax
390*0Sstevel@tonic-gate	movl	4(%ecx), %edx
391*0Sstevel@tonic-gate	ret
392*0Sstevel@tonic-gate	SET_SIZE(dtrace_fuword64_nocheck)
393*0Sstevel@tonic-gate
394*0Sstevel@tonic-gate#endif	/* __i386 */
395*0Sstevel@tonic-gate#endif
396*0Sstevel@tonic-gate
397*0Sstevel@tonic-gate#if defined(lint) || defined(__lint)
398*0Sstevel@tonic-gate
399*0Sstevel@tonic-gate/*ARGSUSED*/
400*0Sstevel@tonic-gatevoid
401*0Sstevel@tonic-gatedtrace_probe_error(dtrace_state_t *state, dtrace_epid_t epid, int which,
402*0Sstevel@tonic-gate    int fault, int fltoffs, uintptr_t illval)
403*0Sstevel@tonic-gate{}
404*0Sstevel@tonic-gate
405*0Sstevel@tonic-gate#else	/* lint */
406*0Sstevel@tonic-gate#if defined(__amd64)
407*0Sstevel@tonic-gate
408*0Sstevel@tonic-gate	ENTRY(dtrace_probe_error)
409*0Sstevel@tonic-gate	pushq	%rbp
410*0Sstevel@tonic-gate	movq	%rsp, %rbp
411*0Sstevel@tonic-gate	subq	$0x8, %rsp
412*0Sstevel@tonic-gate	movq	%r9, (%rsp)
413*0Sstevel@tonic-gate	movq	%r8, %r9
414*0Sstevel@tonic-gate	movq	%rcx, %r8
415*0Sstevel@tonic-gate	movq	%rdx, %rcx
416*0Sstevel@tonic-gate	movq	%rsi, %rdx
417*0Sstevel@tonic-gate	movq	%rdi, %rsi
418*0Sstevel@tonic-gate	movl	dtrace_probeid_error(%rip), %edi
419*0Sstevel@tonic-gate	call	dtrace_probe
420*0Sstevel@tonic-gate	addq	$0x8, %rsp
421*0Sstevel@tonic-gate	leave
422*0Sstevel@tonic-gate	ret
423*0Sstevel@tonic-gate	SET_SIZE(dtrace_probe_error)
424*0Sstevel@tonic-gate
425*0Sstevel@tonic-gate#elif defined(__i386)
426*0Sstevel@tonic-gate
427*0Sstevel@tonic-gate	ENTRY(dtrace_probe_error)
428*0Sstevel@tonic-gate	pushl	%ebp
429*0Sstevel@tonic-gate	movl	%esp, %ebp
430*0Sstevel@tonic-gate	pushl	0x1c(%ebp)
431*0Sstevel@tonic-gate	pushl	0x18(%ebp)
432*0Sstevel@tonic-gate	pushl	0x14(%ebp)
433*0Sstevel@tonic-gate	pushl	0x10(%ebp)
434*0Sstevel@tonic-gate	pushl	0xc(%ebp)
435*0Sstevel@tonic-gate	pushl	0x8(%ebp)
436*0Sstevel@tonic-gate	pushl	dtrace_probeid_error
437*0Sstevel@tonic-gate	call	dtrace_probe
438*0Sstevel@tonic-gate	movl	%ebp, %esp
439*0Sstevel@tonic-gate	popl	%ebp
440*0Sstevel@tonic-gate	ret
441*0Sstevel@tonic-gate	SET_SIZE(dtrace_probe_error)
442*0Sstevel@tonic-gate
443*0Sstevel@tonic-gate#endif	/* __i386 */
444*0Sstevel@tonic-gate#endif
445