--- old/usr/src/uts/intel/dtrace/dtrace_asm.s	Fri Feb 28 06:15:49 2020
+++ new/usr/src/uts/intel/dtrace/dtrace_asm.s	Fri Feb 28 06:15:49 2020
@@ -23,55 +23,20 @@
  * Use is subject to license terms.
  */
 /*
- * Copyright 2015 Joyent, Inc.
+ * Copyright 2019 Joyent, Inc.
  */
 
 #include <sys/asm_linkage.h>
 #include <sys/regset.h>
 
-#if defined(lint)
-#include <sys/dtrace_impl.h>
-#else
 #include "assym.h"
-#endif
 
-#if defined(lint) || defined(__lint)
-
-greg_t
-dtrace_getfp(void)
-{ return (0); }
-
-#else	/* lint */
-
-#if defined(__amd64)
-
 	ENTRY_NP(dtrace_getfp)
 	movq	%rbp, %rax
 	ret
 	SET_SIZE(dtrace_getfp)
 
-#elif defined(__i386)
 
-	ENTRY_NP(dtrace_getfp)
-	movl	%ebp, %eax
-	ret
-	SET_SIZE(dtrace_getfp)
-
-#endif	/* __i386 */
-#endif	/* lint */
-
-
-#if defined(lint) || defined(__lint)
-
-/*ARGSUSED*/
-uint64_t
-dtrace_getvmreg(uint32_t reg, volatile uint16_t *flags)
-{ return (0); }
-
-#else	/* lint */
-
-#if defined(__amd64)
-
 	ENTRY_NP(dtrace_getvmreg)
 
 	movq	%rdi, %rdx
@@ -80,51 +45,7 @@
 
 	SET_SIZE(dtrace_getvmreg)
 
-#elif defined(__i386)
 
-	ENTRY_NP(dtrace_getvmreg)
-	pushl	%ebp			/ Setup stack frame
-	movl	%esp, %ebp
-
-	movl	12(%ebp), %eax		/ Load flag pointer
-	movw	(%eax), %cx		/ Load flags
-	orw	$CPU_DTRACE_ILLOP, %cx	/ Set ILLOP
-	movw	%cx, (%eax)		/ Store flags
-
-	leave
-	ret
-	SET_SIZE(dtrace_getvmreg)
-
-#endif	/* __i386 */
-#endif	/* lint */
-
-
-#if defined(lint) || defined(__lint)
-
-uint32_t
-dtrace_cas32(uint32_t *target, uint32_t cmp, uint32_t new)
-{
-	uint32_t old;
-
-	if ((old = *target) == cmp)
-		*target = new;
-	return (old);
-}
-
-void *
-dtrace_casptr(void *target, void *cmp, void *new)
-{
-	void *old;
-
-	if ((old = *(void **)target) == cmp)
-		*(void **)target = new;
-	return (old);
-}
-
-#else	/* lint */
-
-#if defined(__amd64)
-
 	ENTRY(dtrace_cas32)
 	movl	%esi, %eax
 	lock
@@ -139,60 +60,11 @@
 	ret
 	SET_SIZE(dtrace_casptr)
 
-#elif defined(__i386)
-
-	ENTRY(dtrace_cas32)
-	ALTENTRY(dtrace_casptr)
-	movl	4(%esp), %edx
-	movl	8(%esp), %eax
-	movl	12(%esp), %ecx
-	lock
-	cmpxchgl %ecx, (%edx)
-	ret
-	SET_SIZE(dtrace_casptr)
-	SET_SIZE(dtrace_cas32)
-
-#endif	/* __i386 */
-#endif	/* lint */
-
-#if defined(lint)
-
-/*ARGSUSED*/
-uintptr_t
-dtrace_caller(int aframes)
-{
-	return (0);
-}
-
-#else	/* lint */
-
-#if defined(__amd64)
 	ENTRY(dtrace_caller)
 	movq	$-1, %rax
 	ret
 	SET_SIZE(dtrace_caller)
 
-#elif defined(__i386)
-
-	ENTRY(dtrace_caller)
-	movl	$-1, %eax
-	ret
-	SET_SIZE(dtrace_caller)
-
-#endif	/* __i386 */
-#endif	/* lint */
-
-#if defined(lint)
-
-/*ARGSUSED*/
-void
-dtrace_copy(uintptr_t src, uintptr_t dest, size_t size)
-{}
-
-#else
-
-#if defined(__amd64)
-
 	ENTRY(dtrace_copy)
 	pushq	%rbp
 	call	smap_disable
@@ -207,42 +79,6 @@
 	ret
 	SET_SIZE(dtrace_copy)
 
-#elif defined(__i386)
-
-	ENTRY(dtrace_copy)
-	pushl	%ebp
-	movl	%esp, %ebp
-	pushl	%esi
-	pushl	%edi
-
-	movl	8(%ebp), %esi		/ Load source address
-	movl	12(%ebp), %edi		/ Load destination address
-	movl	16(%ebp), %ecx		/ Load count
-	repz				/ Repeat for count...
-	smovb				/   move from %ds:si to %es:di
-
-	popl	%edi
-	popl	%esi
-	movl	%ebp, %esp
-	popl	%ebp
-	ret
-	SET_SIZE(dtrace_copy)
-
-#endif	/* __i386 */
-#endif
-
-#if defined(lint)
-
-/*ARGSUSED*/
-void
-dtrace_copystr(uintptr_t uaddr, uintptr_t kaddr, size_t size,
-    volatile uint16_t *flags)
-{}
-
-#else
-
-#if defined(__amd64)
-
 	ENTRY(dtrace_copystr)
 	pushq	%rbp
 	movq	%rsp, %rbp
@@ -269,56 +105,6 @@
 
 	SET_SIZE(dtrace_copystr)
 
-#elif defined(__i386)
-
-	ENTRY(dtrace_copystr)
-
-	pushl	%ebp			/ Setup stack frame
-	movl	%esp, %ebp
-	pushl	%ebx			/ Save registers
-	
-	movl	8(%ebp), %ebx		/ Load source address
-	movl	12(%ebp), %edx		/ Load destination address
-	movl	16(%ebp), %ecx		/ Load count
-
-0:
-	movb	(%ebx), %al		/ Load from source
-	movb	%al, (%edx)		/ Store to destination
-	incl	%ebx			/ Increment source pointer
-	incl	%edx			/ Increment destination pointer
-	decl	%ecx			/ Decrement remaining count
-	cmpb	$0, %al
-	je	2f
-	testl	$0xfff, %ecx		/ Check if count is 4k-aligned
-	jnz	1f
-	movl	20(%ebp), %eax		/ load flags pointer
-	testl	$CPU_DTRACE_BADADDR, (%eax) / load and test dtrace flags
-	jnz	2f
-1:
-	cmpl	$0, %ecx
-	jne	0b
-
-2:
-	popl	%ebx
-	movl	%ebp, %esp
-	popl	%ebp
-	ret
-
-	SET_SIZE(dtrace_copystr)
-
-#endif	/* __i386 */
-#endif
-
-#if defined(lint)
-
-/*ARGSUSED*/
-uintptr_t
-dtrace_fulword(void *addr)
-{ return (0); }
-
-#else
-#if defined(__amd64)
-
 	ENTRY(dtrace_fulword)
 	call	smap_disable
 	movq	(%rdi), %rax
@@ -326,28 +112,6 @@
 	ret
 	SET_SIZE(dtrace_fulword)
 
-#elif defined(__i386)
-
-	ENTRY(dtrace_fulword)
-	movl	4(%esp), %ecx
-	xorl	%eax, %eax
-	movl	(%ecx), %eax
-	ret
-	SET_SIZE(dtrace_fulword)
-
-#endif	/* __i386 */
-#endif
-
-#if defined(lint)
-
-/*ARGSUSED*/
-uint8_t
-dtrace_fuword8_nocheck(void *addr)
-{ return (0); }
-
-#else
-#if defined(__amd64)
-
 	ENTRY(dtrace_fuword8_nocheck)
 	call	smap_disable
 	xorq	%rax, %rax
@@ -356,28 +120,6 @@
 	ret
 	SET_SIZE(dtrace_fuword8_nocheck)
 
-#elif defined(__i386)
-
-	ENTRY(dtrace_fuword8_nocheck)
-	movl	4(%esp), %ecx
-	xorl	%eax, %eax
-	movzbl	(%ecx), %eax
-	ret
-	SET_SIZE(dtrace_fuword8_nocheck)
-
-#endif	/* __i386 */
-#endif
-
-#if defined(lint)
-
-/*ARGSUSED*/
-uint16_t
-dtrace_fuword16_nocheck(void *addr)
-{ return (0); }
-
-#else
-#if defined(__amd64)
-
 	ENTRY(dtrace_fuword16_nocheck)
 	call	smap_disable
 	xorq	%rax, %rax
@@ -386,28 +128,6 @@
 	ret
 	SET_SIZE(dtrace_fuword16_nocheck)
 
-#elif defined(__i386)
-
-	ENTRY(dtrace_fuword16_nocheck)
-	movl	4(%esp), %ecx
-	xorl	%eax, %eax
-	movzwl	(%ecx), %eax
-	ret
-	SET_SIZE(dtrace_fuword16_nocheck)
-
-#endif	/* __i386 */
-#endif
-
-#if defined(lint)
-
-/*ARGSUSED*/
-uint32_t
-dtrace_fuword32_nocheck(void *addr)
-{ return (0); }
-
-#else
-#if defined(__amd64)
-
 	ENTRY(dtrace_fuword32_nocheck)
 	call	smap_disable
 	xorq	%rax, %rax
@@ -416,28 +136,6 @@
 	ret
 	SET_SIZE(dtrace_fuword32_nocheck)
 
-#elif defined(__i386)
-
-	ENTRY(dtrace_fuword32_nocheck)
-	movl	4(%esp), %ecx
-	xorl	%eax, %eax
-	movl	(%ecx), %eax
-	ret
-	SET_SIZE(dtrace_fuword32_nocheck)
-
-#endif	/* __i386 */
-#endif
-
-#if defined(lint)
-
-/*ARGSUSED*/
-uint64_t
-dtrace_fuword64_nocheck(void *addr)
-{ return (0); }
-
-#else
-#if defined(__amd64)
-
 	ENTRY(dtrace_fuword64_nocheck)
 	call	smap_disable
 	movq	(%rdi), %rax
@@ -445,31 +143,6 @@
 	ret
 	SET_SIZE(dtrace_fuword64_nocheck)
 
-#elif defined(__i386)
-
-	ENTRY(dtrace_fuword64_nocheck)
-	movl	4(%esp), %ecx
-	xorl	%eax, %eax
-	xorl	%edx, %edx
-	movl	(%ecx), %eax
-	movl	4(%ecx), %edx
-	ret
-	SET_SIZE(dtrace_fuword64_nocheck)
-
-#endif	/* __i386 */
-#endif
-
-#if defined(lint) || defined(__lint)
-
-/*ARGSUSED*/
-void
-dtrace_probe_error(dtrace_state_t *state, dtrace_epid_t epid, int which,
-    int fault, int fltoffs, uintptr_t illval)
-{}
-
-#else	/* lint */
-#if defined(__amd64)
-
 	ENTRY(dtrace_probe_error)
 	pushq	%rbp
 	movq	%rsp, %rbp
@@ -487,23 +160,3 @@
 	ret
 	SET_SIZE(dtrace_probe_error)
 	
-#elif defined(__i386)
-
-	ENTRY(dtrace_probe_error)
-	pushl	%ebp
-	movl	%esp, %ebp
-	pushl	0x1c(%ebp)
-	pushl	0x18(%ebp)
-	pushl	0x14(%ebp)
-	pushl	0x10(%ebp)
-	pushl	0xc(%ebp)
-	pushl	0x8(%ebp)
-	pushl	dtrace_probeid_error
-	call	dtrace_probe
-	movl	%ebp, %esp
-	popl	%ebp
-	ret
-	SET_SIZE(dtrace_probe_error)
-
-#endif	/* __i386 */
-#endif
