xref: /onnv-gate/usr/src/uts/intel/dtrace/dtrace_asm.s (revision 3677:b34b45f03271)
10Sstevel@tonic-gate/*
20Sstevel@tonic-gate * CDDL HEADER START
30Sstevel@tonic-gate *
40Sstevel@tonic-gate * The contents of this file are subject to the terms of the
5*3677Ssudheer * Common Development and Distribution License (the "License").
6*3677Ssudheer * You may not use this file except in compliance with the License.
70Sstevel@tonic-gate *
80Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
90Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing.
100Sstevel@tonic-gate * See the License for the specific language governing permissions
110Sstevel@tonic-gate * and limitations under the License.
120Sstevel@tonic-gate *
130Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each
140Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
150Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the
160Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying
170Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner]
180Sstevel@tonic-gate *
190Sstevel@tonic-gate * CDDL HEADER END
200Sstevel@tonic-gate */
210Sstevel@tonic-gate/*
22*3677Ssudheer * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
230Sstevel@tonic-gate * Use is subject to license terms.
240Sstevel@tonic-gate */
250Sstevel@tonic-gate
260Sstevel@tonic-gate#pragma ident	"%Z%%M%	%I%	%E% SMI"
270Sstevel@tonic-gate
280Sstevel@tonic-gate#include <sys/asm_linkage.h>
290Sstevel@tonic-gate#include <sys/regset.h>
300Sstevel@tonic-gate
310Sstevel@tonic-gate#if defined(lint)
320Sstevel@tonic-gate#include <sys/dtrace_impl.h>
33*3677Ssudheer#else
34*3677Ssudheer#include "assym.h"
350Sstevel@tonic-gate#endif
360Sstevel@tonic-gate
370Sstevel@tonic-gate#if defined(lint) || defined(__lint)
380Sstevel@tonic-gate
390Sstevel@tonic-gategreg_t
400Sstevel@tonic-gatedtrace_getfp(void)
410Sstevel@tonic-gate{ return (0); }
420Sstevel@tonic-gate
430Sstevel@tonic-gate#else	/* lint */
440Sstevel@tonic-gate
450Sstevel@tonic-gate#if defined(__amd64)
460Sstevel@tonic-gate
470Sstevel@tonic-gate	ENTRY_NP(dtrace_getfp)
480Sstevel@tonic-gate	movq	%rbp, %rax
490Sstevel@tonic-gate	ret
500Sstevel@tonic-gate	SET_SIZE(dtrace_getfp)
510Sstevel@tonic-gate
520Sstevel@tonic-gate#elif defined(__i386)
530Sstevel@tonic-gate
540Sstevel@tonic-gate	ENTRY_NP(dtrace_getfp)
550Sstevel@tonic-gate	movl	%ebp, %eax
560Sstevel@tonic-gate	ret
570Sstevel@tonic-gate	SET_SIZE(dtrace_getfp)
580Sstevel@tonic-gate
590Sstevel@tonic-gate#endif	/* __i386 */
600Sstevel@tonic-gate#endif	/* lint */
610Sstevel@tonic-gate
620Sstevel@tonic-gate
630Sstevel@tonic-gate#if defined(lint) || defined(__lint)
640Sstevel@tonic-gate
650Sstevel@tonic-gateuint32_t
660Sstevel@tonic-gatedtrace_cas32(uint32_t *target, uint32_t cmp, uint32_t new)
670Sstevel@tonic-gate{
680Sstevel@tonic-gate	uint32_t old;
690Sstevel@tonic-gate
700Sstevel@tonic-gate	if ((old = *target) == cmp)
710Sstevel@tonic-gate		*target = new;
720Sstevel@tonic-gate	return (old);
730Sstevel@tonic-gate}
740Sstevel@tonic-gate
750Sstevel@tonic-gatevoid *
760Sstevel@tonic-gatedtrace_casptr(void *target, void *cmp, void *new)
770Sstevel@tonic-gate{
780Sstevel@tonic-gate	void *old;
790Sstevel@tonic-gate
800Sstevel@tonic-gate	if ((old = *(void **)target) == cmp)
810Sstevel@tonic-gate		*(void **)target = new;
820Sstevel@tonic-gate	return (old);
830Sstevel@tonic-gate}
840Sstevel@tonic-gate
850Sstevel@tonic-gate#else	/* lint */
860Sstevel@tonic-gate
870Sstevel@tonic-gate#if defined(__amd64)
880Sstevel@tonic-gate
890Sstevel@tonic-gate	ENTRY(dtrace_cas32)
900Sstevel@tonic-gate	movl	%esi, %eax
910Sstevel@tonic-gate	lock
920Sstevel@tonic-gate	cmpxchgl %edx, (%rdi)
930Sstevel@tonic-gate	ret
940Sstevel@tonic-gate	SET_SIZE(dtrace_cas32)
950Sstevel@tonic-gate
960Sstevel@tonic-gate	ENTRY(dtrace_casptr)
970Sstevel@tonic-gate	movq	%rsi, %rax
980Sstevel@tonic-gate	lock
990Sstevel@tonic-gate	cmpxchgq %rdx, (%rdi)
1000Sstevel@tonic-gate	ret
1010Sstevel@tonic-gate	SET_SIZE(dtrace_casptr)
1020Sstevel@tonic-gate
1030Sstevel@tonic-gate#elif defined(__i386)
1040Sstevel@tonic-gate
1050Sstevel@tonic-gate	ENTRY(dtrace_cas32)
1060Sstevel@tonic-gate	ALTENTRY(dtrace_casptr)
1070Sstevel@tonic-gate	movl	4(%esp), %edx
1080Sstevel@tonic-gate	movl	8(%esp), %eax
1090Sstevel@tonic-gate	movl	12(%esp), %ecx
1100Sstevel@tonic-gate	lock
1110Sstevel@tonic-gate	cmpxchgl %ecx, (%edx)
1120Sstevel@tonic-gate	ret
1130Sstevel@tonic-gate	SET_SIZE(dtrace_casptr)
1140Sstevel@tonic-gate	SET_SIZE(dtrace_cas32)
1150Sstevel@tonic-gate
1160Sstevel@tonic-gate#endif	/* __i386 */
1170Sstevel@tonic-gate#endif	/* lint */
1180Sstevel@tonic-gate
1190Sstevel@tonic-gate#if defined(lint)
1200Sstevel@tonic-gate
1210Sstevel@tonic-gate/*ARGSUSED*/
1220Sstevel@tonic-gateuintptr_t
1230Sstevel@tonic-gatedtrace_caller(int aframes)
1240Sstevel@tonic-gate{
1250Sstevel@tonic-gate	return (0);
1260Sstevel@tonic-gate}
1270Sstevel@tonic-gate
1280Sstevel@tonic-gate#else	/* lint */
1290Sstevel@tonic-gate
1300Sstevel@tonic-gate#if defined(__amd64)
1310Sstevel@tonic-gate	ENTRY(dtrace_caller)
1320Sstevel@tonic-gate	movq	$-1, %rax
1330Sstevel@tonic-gate	ret
1340Sstevel@tonic-gate	SET_SIZE(dtrace_caller)
1350Sstevel@tonic-gate
1360Sstevel@tonic-gate#elif defined(__i386)
1370Sstevel@tonic-gate
1380Sstevel@tonic-gate	ENTRY(dtrace_caller)
1390Sstevel@tonic-gate	movl	$-1, %eax
1400Sstevel@tonic-gate	ret
1410Sstevel@tonic-gate	SET_SIZE(dtrace_caller)
1420Sstevel@tonic-gate
1430Sstevel@tonic-gate#endif	/* __i386 */
1440Sstevel@tonic-gate#endif	/* lint */
1450Sstevel@tonic-gate
1460Sstevel@tonic-gate#if defined(lint)
1470Sstevel@tonic-gate
1480Sstevel@tonic-gate/*ARGSUSED*/
1490Sstevel@tonic-gatevoid
1500Sstevel@tonic-gatedtrace_copy(uintptr_t src, uintptr_t dest, size_t size)
1510Sstevel@tonic-gate{}
1520Sstevel@tonic-gate
1530Sstevel@tonic-gate#else
1540Sstevel@tonic-gate
1550Sstevel@tonic-gate#if defined(__amd64)
1560Sstevel@tonic-gate
1570Sstevel@tonic-gate	ENTRY(dtrace_copy)
1580Sstevel@tonic-gate	pushq	%rbp
1590Sstevel@tonic-gate	movq	%rsp, %rbp
1600Sstevel@tonic-gate
1610Sstevel@tonic-gate	xchgq	%rdi, %rsi		/* make %rsi source, %rdi dest */
1620Sstevel@tonic-gate	movq	%rdx, %rcx		/* load count */
1630Sstevel@tonic-gate	repz				/* repeat for count ... */
1640Sstevel@tonic-gate	smovb				/*   move from %ds:rsi to %ed:rdi */
1650Sstevel@tonic-gate	leave
1660Sstevel@tonic-gate	ret
1670Sstevel@tonic-gate	SET_SIZE(dtrace_copy)
1680Sstevel@tonic-gate
1690Sstevel@tonic-gate#elif defined(__i386)
1700Sstevel@tonic-gate
1710Sstevel@tonic-gate	ENTRY(dtrace_copy)
1720Sstevel@tonic-gate	pushl	%ebp
1730Sstevel@tonic-gate	movl	%esp, %ebp
1740Sstevel@tonic-gate	pushl	%esi
1750Sstevel@tonic-gate	pushl	%edi
1760Sstevel@tonic-gate
1770Sstevel@tonic-gate	movl	8(%ebp), %esi		/ Load source address
1780Sstevel@tonic-gate	movl	12(%ebp), %edi		/ Load destination address
1790Sstevel@tonic-gate	movl	16(%ebp), %ecx		/ Load count
1800Sstevel@tonic-gate	repz				/ Repeat for count...
1810Sstevel@tonic-gate	smovb				/   move from %ds:si to %es:di
1820Sstevel@tonic-gate
1830Sstevel@tonic-gate	popl	%edi
1840Sstevel@tonic-gate	popl	%esi
1850Sstevel@tonic-gate	movl	%ebp, %esp
1860Sstevel@tonic-gate	popl	%ebp
1870Sstevel@tonic-gate	ret
1880Sstevel@tonic-gate	SET_SIZE(dtrace_copy)
1890Sstevel@tonic-gate
1900Sstevel@tonic-gate#endif	/* __i386 */
1910Sstevel@tonic-gate#endif
1920Sstevel@tonic-gate
1930Sstevel@tonic-gate#if defined(lint)
1940Sstevel@tonic-gate
1950Sstevel@tonic-gate/*ARGSUSED*/
1960Sstevel@tonic-gatevoid
197*3677Ssudheerdtrace_copystr(uintptr_t uaddr, uintptr_t kaddr, size_t size,
198*3677Ssudheer    volatile uint16_t *flags)
1990Sstevel@tonic-gate{}
2000Sstevel@tonic-gate
2010Sstevel@tonic-gate#else
2020Sstevel@tonic-gate
2030Sstevel@tonic-gate#if defined(__amd64)
2040Sstevel@tonic-gate
2050Sstevel@tonic-gate	ENTRY(dtrace_copystr)
2060Sstevel@tonic-gate	pushq	%rbp
2070Sstevel@tonic-gate	movq	%rsp, %rbp
2080Sstevel@tonic-gate
2090Sstevel@tonic-gate0:
2100Sstevel@tonic-gate	movb	(%rdi), %al		/* load from source */
2110Sstevel@tonic-gate	movb	%al, (%rsi)		/* store to destination */
2120Sstevel@tonic-gate	addq	$1, %rdi		/* increment source pointer */
2130Sstevel@tonic-gate	addq	$1, %rsi		/* increment destination pointer */
2140Sstevel@tonic-gate	subq	$1, %rdx		/* decrement remaining count */
2150Sstevel@tonic-gate	cmpb	$0, %al
216*3677Ssudheer	je	2f
217*3677Ssudheer	testq	$0xfff, %rdx		/* test if count is 4k-aligned */
218*3677Ssudheer	jnz	1f			/* if not, continue with copying */
219*3677Ssudheer	testq	$CPU_DTRACE_BADADDR, (%rcx) /* load and test dtrace flags */
220*3677Ssudheer	jnz	2f
221*3677Ssudheer1:
2220Sstevel@tonic-gate	cmpq	$0, %rdx
2230Sstevel@tonic-gate	jne	0b
224*3677Ssudheer2:
2250Sstevel@tonic-gate	leave
2260Sstevel@tonic-gate	ret
2270Sstevel@tonic-gate
2280Sstevel@tonic-gate	SET_SIZE(dtrace_copystr)
2290Sstevel@tonic-gate
2300Sstevel@tonic-gate#elif defined(__i386)
2310Sstevel@tonic-gate
2320Sstevel@tonic-gate	ENTRY(dtrace_copystr)
2330Sstevel@tonic-gate
2340Sstevel@tonic-gate	pushl	%ebp			/ Setup stack frame
2350Sstevel@tonic-gate	movl	%esp, %ebp
2360Sstevel@tonic-gate	pushl	%ebx			/ Save registers
2370Sstevel@tonic-gate
2380Sstevel@tonic-gate	movl	8(%ebp), %ebx		/ Load source address
2390Sstevel@tonic-gate	movl	12(%ebp), %edx		/ Load destination address
2400Sstevel@tonic-gate	movl	16(%ebp), %ecx		/ Load count
2410Sstevel@tonic-gate
2420Sstevel@tonic-gate0:
2430Sstevel@tonic-gate	movb	(%ebx), %al		/ Load from source
2440Sstevel@tonic-gate	movb	%al, (%edx)		/ Store to destination
2450Sstevel@tonic-gate	incl	%ebx			/ Increment source pointer
2460Sstevel@tonic-gate	incl	%edx			/ Increment destination pointer
2470Sstevel@tonic-gate	decl	%ecx			/ Decrement remaining count
2480Sstevel@tonic-gate	cmpb	$0, %al
249*3677Ssudheer	je	2f
250*3677Ssudheer	testl	$0xfff, %ecx		/ Check if count is 4k-aligned
251*3677Ssudheer	jnz	1f
252*3677Ssudheer	movl	20(%ebp), %eax		/ load flags pointer
253*3677Ssudheer	testl	$CPU_DTRACE_BADADDR, (%eax) / load and test dtrace flags
254*3677Ssudheer	jnz	2f
255*3677Ssudheer1:
2560Sstevel@tonic-gate	cmpl	$0, %ecx
2570Sstevel@tonic-gate	jne	0b
2580Sstevel@tonic-gate
259*3677Ssudheer2:
2600Sstevel@tonic-gate	popl	%ebx
2610Sstevel@tonic-gate	movl	%ebp, %esp
2620Sstevel@tonic-gate	popl	%ebp
2630Sstevel@tonic-gate	ret
2640Sstevel@tonic-gate
2650Sstevel@tonic-gate	SET_SIZE(dtrace_copystr)
2660Sstevel@tonic-gate
2670Sstevel@tonic-gate#endif	/* __i386 */
2680Sstevel@tonic-gate#endif
2690Sstevel@tonic-gate
2700Sstevel@tonic-gate#if defined(lint)
2710Sstevel@tonic-gate
2720Sstevel@tonic-gate/*ARGSUSED*/
2730Sstevel@tonic-gateuintptr_t
2740Sstevel@tonic-gatedtrace_fulword(void *addr)
2750Sstevel@tonic-gate{ return (0); }
2760Sstevel@tonic-gate
2770Sstevel@tonic-gate#else
2780Sstevel@tonic-gate#if defined(__amd64)
2790Sstevel@tonic-gate
2800Sstevel@tonic-gate	ENTRY(dtrace_fulword)
2810Sstevel@tonic-gate	movq	(%rdi), %rax
2820Sstevel@tonic-gate	ret
2830Sstevel@tonic-gate	SET_SIZE(dtrace_fulword)
2840Sstevel@tonic-gate
2850Sstevel@tonic-gate#elif defined(__i386)
2860Sstevel@tonic-gate
2870Sstevel@tonic-gate	ENTRY(dtrace_fulword)
2880Sstevel@tonic-gate	movl	4(%esp), %ecx
2890Sstevel@tonic-gate	xorl	%eax, %eax
2900Sstevel@tonic-gate	movl	(%ecx), %eax
2910Sstevel@tonic-gate	ret
2920Sstevel@tonic-gate	SET_SIZE(dtrace_fulword)
2930Sstevel@tonic-gate
2940Sstevel@tonic-gate#endif	/* __i386 */
2950Sstevel@tonic-gate#endif
2960Sstevel@tonic-gate
2970Sstevel@tonic-gate#if defined(lint)
2980Sstevel@tonic-gate
2990Sstevel@tonic-gate/*ARGSUSED*/
3000Sstevel@tonic-gateuint8_t
3010Sstevel@tonic-gatedtrace_fuword8_nocheck(void *addr)
3020Sstevel@tonic-gate{ return (0); }
3030Sstevel@tonic-gate
3040Sstevel@tonic-gate#else
3050Sstevel@tonic-gate#if defined(__amd64)
3060Sstevel@tonic-gate
3070Sstevel@tonic-gate	ENTRY(dtrace_fuword8_nocheck)
3080Sstevel@tonic-gate	xorq	%rax, %rax
3090Sstevel@tonic-gate	movb	(%rdi), %al
3100Sstevel@tonic-gate	ret
3110Sstevel@tonic-gate	SET_SIZE(dtrace_fuword8_nocheck)
3120Sstevel@tonic-gate
3130Sstevel@tonic-gate#elif defined(__i386)
3140Sstevel@tonic-gate
3150Sstevel@tonic-gate	ENTRY(dtrace_fuword8_nocheck)
3160Sstevel@tonic-gate	movl	4(%esp), %ecx
3170Sstevel@tonic-gate	xorl	%eax, %eax
3180Sstevel@tonic-gate	movzbl	(%ecx), %eax
3190Sstevel@tonic-gate	ret
3200Sstevel@tonic-gate	SET_SIZE(dtrace_fuword8_nocheck)
3210Sstevel@tonic-gate
3220Sstevel@tonic-gate#endif	/* __i386 */
3230Sstevel@tonic-gate#endif
3240Sstevel@tonic-gate
3250Sstevel@tonic-gate#if defined(lint)
3260Sstevel@tonic-gate
3270Sstevel@tonic-gate/*ARGSUSED*/
3280Sstevel@tonic-gateuint16_t
3290Sstevel@tonic-gatedtrace_fuword16_nocheck(void *addr)
3300Sstevel@tonic-gate{ return (0); }
3310Sstevel@tonic-gate
3320Sstevel@tonic-gate#else
3330Sstevel@tonic-gate#if defined(__amd64)
3340Sstevel@tonic-gate
3350Sstevel@tonic-gate	ENTRY(dtrace_fuword16_nocheck)
3360Sstevel@tonic-gate	xorq	%rax, %rax
3370Sstevel@tonic-gate	movw	(%rdi), %ax
3380Sstevel@tonic-gate	ret
3390Sstevel@tonic-gate	SET_SIZE(dtrace_fuword16_nocheck)
3400Sstevel@tonic-gate
3410Sstevel@tonic-gate#elif defined(__i386)
3420Sstevel@tonic-gate
3430Sstevel@tonic-gate	ENTRY(dtrace_fuword16_nocheck)
3440Sstevel@tonic-gate	movl	4(%esp), %ecx
3450Sstevel@tonic-gate	xorl	%eax, %eax
3460Sstevel@tonic-gate	movzwl	(%ecx), %eax
3470Sstevel@tonic-gate	ret
3480Sstevel@tonic-gate	SET_SIZE(dtrace_fuword16_nocheck)
3490Sstevel@tonic-gate
3500Sstevel@tonic-gate#endif	/* __i386 */
3510Sstevel@tonic-gate#endif
3520Sstevel@tonic-gate
3530Sstevel@tonic-gate#if defined(lint)
3540Sstevel@tonic-gate
3550Sstevel@tonic-gate/*ARGSUSED*/
3560Sstevel@tonic-gateuint32_t
3570Sstevel@tonic-gatedtrace_fuword32_nocheck(void *addr)
3580Sstevel@tonic-gate{ return (0); }
3590Sstevel@tonic-gate
3600Sstevel@tonic-gate#else
3610Sstevel@tonic-gate#if defined(__amd64)
3620Sstevel@tonic-gate
3630Sstevel@tonic-gate	ENTRY(dtrace_fuword32_nocheck)
3640Sstevel@tonic-gate	xorq	%rax, %rax
3650Sstevel@tonic-gate	movl	(%rdi), %eax
3660Sstevel@tonic-gate	ret
3670Sstevel@tonic-gate	SET_SIZE(dtrace_fuword32_nocheck)
3680Sstevel@tonic-gate
3690Sstevel@tonic-gate#elif defined(__i386)
3700Sstevel@tonic-gate
3710Sstevel@tonic-gate	ENTRY(dtrace_fuword32_nocheck)
3720Sstevel@tonic-gate	movl	4(%esp), %ecx
3730Sstevel@tonic-gate	xorl	%eax, %eax
3740Sstevel@tonic-gate	movl	(%ecx), %eax
3750Sstevel@tonic-gate	ret
3760Sstevel@tonic-gate	SET_SIZE(dtrace_fuword32_nocheck)
3770Sstevel@tonic-gate
3780Sstevel@tonic-gate#endif	/* __i386 */
3790Sstevel@tonic-gate#endif
3800Sstevel@tonic-gate
3810Sstevel@tonic-gate#if defined(lint)
3820Sstevel@tonic-gate
3830Sstevel@tonic-gate/*ARGSUSED*/
3840Sstevel@tonic-gateuint64_t
3850Sstevel@tonic-gatedtrace_fuword64_nocheck(void *addr)
3860Sstevel@tonic-gate{ return (0); }
3870Sstevel@tonic-gate
3880Sstevel@tonic-gate#else
3890Sstevel@tonic-gate#if defined(__amd64)
3900Sstevel@tonic-gate
3910Sstevel@tonic-gate	ENTRY(dtrace_fuword64_nocheck)
3920Sstevel@tonic-gate	movq	(%rdi), %rax
3930Sstevel@tonic-gate	ret
3940Sstevel@tonic-gate	SET_SIZE(dtrace_fuword64_nocheck)
3950Sstevel@tonic-gate
3960Sstevel@tonic-gate#elif defined(__i386)
3970Sstevel@tonic-gate
3980Sstevel@tonic-gate	ENTRY(dtrace_fuword64_nocheck)
3990Sstevel@tonic-gate	movl	4(%esp), %ecx
4000Sstevel@tonic-gate	xorl	%eax, %eax
4010Sstevel@tonic-gate	xorl	%edx, %edx
4020Sstevel@tonic-gate	movl	(%ecx), %eax
4030Sstevel@tonic-gate	movl	4(%ecx), %edx
4040Sstevel@tonic-gate	ret
4050Sstevel@tonic-gate	SET_SIZE(dtrace_fuword64_nocheck)
4060Sstevel@tonic-gate
4070Sstevel@tonic-gate#endif	/* __i386 */
4080Sstevel@tonic-gate#endif
4090Sstevel@tonic-gate
4100Sstevel@tonic-gate#if defined(lint) || defined(__lint)
4110Sstevel@tonic-gate
4120Sstevel@tonic-gate/*ARGSUSED*/
4130Sstevel@tonic-gatevoid
4140Sstevel@tonic-gatedtrace_probe_error(dtrace_state_t *state, dtrace_epid_t epid, int which,
4150Sstevel@tonic-gate    int fault, int fltoffs, uintptr_t illval)
4160Sstevel@tonic-gate{}
4170Sstevel@tonic-gate
4180Sstevel@tonic-gate#else	/* lint */
4190Sstevel@tonic-gate#if defined(__amd64)
4200Sstevel@tonic-gate
4210Sstevel@tonic-gate	ENTRY(dtrace_probe_error)
4220Sstevel@tonic-gate	pushq	%rbp
4230Sstevel@tonic-gate	movq	%rsp, %rbp
4240Sstevel@tonic-gate	subq	$0x8, %rsp
4250Sstevel@tonic-gate	movq	%r9, (%rsp)
4260Sstevel@tonic-gate	movq	%r8, %r9
4270Sstevel@tonic-gate	movq	%rcx, %r8
4280Sstevel@tonic-gate	movq	%rdx, %rcx
4290Sstevel@tonic-gate	movq	%rsi, %rdx
4300Sstevel@tonic-gate	movq	%rdi, %rsi
4310Sstevel@tonic-gate	movl	dtrace_probeid_error(%rip), %edi
4320Sstevel@tonic-gate	call	dtrace_probe
4330Sstevel@tonic-gate	addq	$0x8, %rsp
4340Sstevel@tonic-gate	leave
4350Sstevel@tonic-gate	ret
4360Sstevel@tonic-gate	SET_SIZE(dtrace_probe_error)
4370Sstevel@tonic-gate
4380Sstevel@tonic-gate#elif defined(__i386)
4390Sstevel@tonic-gate
4400Sstevel@tonic-gate	ENTRY(dtrace_probe_error)
4410Sstevel@tonic-gate	pushl	%ebp
4420Sstevel@tonic-gate	movl	%esp, %ebp
4430Sstevel@tonic-gate	pushl	0x1c(%ebp)
4440Sstevel@tonic-gate	pushl	0x18(%ebp)
4450Sstevel@tonic-gate	pushl	0x14(%ebp)
4460Sstevel@tonic-gate	pushl	0x10(%ebp)
4470Sstevel@tonic-gate	pushl	0xc(%ebp)
4480Sstevel@tonic-gate	pushl	0x8(%ebp)
4490Sstevel@tonic-gate	pushl	dtrace_probeid_error
4500Sstevel@tonic-gate	call	dtrace_probe
4510Sstevel@tonic-gate	movl	%ebp, %esp
4520Sstevel@tonic-gate	popl	%ebp
4530Sstevel@tonic-gate	ret
4540Sstevel@tonic-gate	SET_SIZE(dtrace_probe_error)
4550Sstevel@tonic-gate
4560Sstevel@tonic-gate#endif	/* __i386 */
4570Sstevel@tonic-gate#endif
458