summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Fiddaman <omnios@citrus-it.co.uk>2020-07-25 12:44:21 +0000
committerAndy Fiddaman <omnios@citrus-it.co.uk>2020-07-28 21:53:05 +0000
commitabe1e6b305e672d0eedeb6b52003acac658c8371 (patch)
tree6b8ff7a3432f0624014f812bfa5c9760ffc274d9
parentc3ae3afa3e57b39e29577c4b791adbe511bb7e3f (diff)
downloadillumos-joyent-abe1e6b305e672d0eedeb6b52003acac658c8371.tar.gz
12982 ambiguous instructions require an explicit suffix
Reviewed by: Toomas Soome <tsoome@me.com> Reviewed by: John Levon <john.levon@joyent.com> Reviewed by: Robert Mustacchi <rm@fingolfin.org> Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r--usr/src/boot/sys/boot/i386/cdboot/cdboot.S8
-rw-r--r--usr/src/uts/i86pc/ml/cpr_wakecode.s3
-rw-r--r--usr/src/uts/i86pc/ml/kpti_trampolines.s3
-rw-r--r--usr/src/uts/i86pc/ml/locore.s3
-rw-r--r--usr/src/uts/i86pc/ml/mpcore.s3
-rw-r--r--usr/src/uts/intel/brand/common/brand_asm.h5
-rw-r--r--usr/src/uts/intel/ia32/ml/float.s5
-rw-r--r--usr/src/uts/intel/kdi/kdi_idthdl.s3
8 files changed, 20 insertions, 13 deletions
diff --git a/usr/src/boot/sys/boot/i386/cdboot/cdboot.S b/usr/src/boot/sys/boot/i386/cdboot/cdboot.S
index 22e277eace..3ab75c1fb2 100644
--- a/usr/src/boot/sys/boot/i386/cdboot/cdboot.S
+++ b/usr/src/boot/sys/boot/i386/cdboot/cdboot.S
@@ -34,7 +34,7 @@
#
# Basically, we first create a set of boot arguments to pass to the loaded
# binary. Then we attempt to load /boot/loader from the CD we were booted
-# off of.
+# from.
#
#include <bootargs.h>
@@ -136,7 +136,7 @@ real_start: cld # string ops inc
stosl # to zero
mov drive,%dl # Store BIOS boot device
mov %dl,0x4(%bx) # in kargs->bootdev
- or $KARGS_FLAGS_CD,0x8(%bx) # kargs->bootflags |=
+ orb $KARGS_FLAGS_CD,0x8(%bx) # kargs->bootflags |=
# KARGS_FLAGS_CD
#
# Load Volume Descriptor
@@ -494,7 +494,7 @@ twiddle: push %ax # Save
# legacy-free and simply doesn't have a keyboard controller.
# Thus, the A20 line is already enabled.
#
-seta20: cli # Disable interrupts
+seta20: cli # Disable interrupts
xor %cx,%cx # Clear
seta20.1: inc %cx # Increment, overflow?
jz seta20.3 # Yes
@@ -518,7 +518,7 @@ hex8: pushl %eax # Save
shrb $0x4,%al # Do upper
call hex8.1 # 4
popl %eax # Restore
-hex8.1: andb $0xf,%al # Get lower 4
+hex8.1: andb $0xf,%al # Get lower 4
cmpb $0xa,%al # Convert
sbbb $0x69,%al # to hex
das # digit
diff --git a/usr/src/uts/i86pc/ml/cpr_wakecode.s b/usr/src/uts/i86pc/ml/cpr_wakecode.s
index 7b0d642884..c4a36a5ef6 100644
--- a/usr/src/uts/i86pc/ml/cpr_wakecode.s
+++ b/usr/src/uts/i86pc/ml/cpr_wakecode.s
@@ -21,6 +21,7 @@
/*
* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright 2019 Joyent, Inc.
+ * Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
*/
#include <sys/asm_linkage.h>
@@ -583,7 +584,7 @@ kernel_wc_code:
* Before proceeding, enable usage of the page table NX bit if
* that's how the page tables are set up.
*/
- bt $X86FSET_NX, x86_featureset(%rip)
+ btl $X86FSET_NX, x86_featureset(%rip)
jnc 1f
movl $MSR_AMD_EFER, %ecx
rdmsr
diff --git a/usr/src/uts/i86pc/ml/kpti_trampolines.s b/usr/src/uts/i86pc/ml/kpti_trampolines.s
index 031a7fa8af..dd4d4a8afd 100644
--- a/usr/src/uts/i86pc/ml/kpti_trampolines.s
+++ b/usr/src/uts/i86pc/ml/kpti_trampolines.s
@@ -10,6 +10,7 @@
*/
/*
* Copyright 2019 Joyent, Inc.
+ * Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
*/
/*
@@ -256,7 +257,7 @@ kpti_kbase:
pushq %r14; \
subq $KPTI_R14, %rsp; \
/* Check for clobbering */ \
- cmp $0, KPTI_FLAG(%rsp); \
+ cmpq $0, KPTI_FLAG(%rsp); \
je 1f; \
/* Don't worry, this totally works */ \
int $8; \
diff --git a/usr/src/uts/i86pc/ml/locore.s b/usr/src/uts/i86pc/ml/locore.s
index 3ef051d928..4f966dc1e8 100644
--- a/usr/src/uts/i86pc/ml/locore.s
+++ b/usr/src/uts/i86pc/ml/locore.s
@@ -24,6 +24,7 @@
*/
/*
* Copyright 2019 Joyent, Inc.
+ * Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
*/
/* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */
@@ -184,7 +185,7 @@
/*
* (We just assert this works by virtue of being here)
*/
- bts $X86FSET_CPUID, x86_featureset(%rip)
+ btsl $X86FSET_CPUID, x86_featureset(%rip)
/*
* mlsetup() gets called with a struct regs as argument, while
diff --git a/usr/src/uts/i86pc/ml/mpcore.s b/usr/src/uts/i86pc/ml/mpcore.s
index 249fd2aec0..3f75268e5c 100644
--- a/usr/src/uts/i86pc/ml/mpcore.s
+++ b/usr/src/uts/i86pc/ml/mpcore.s
@@ -26,6 +26,7 @@
* All rights reserved.
*
* Copyright 2019 Joyent, Inc.
+ * Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
*/
#include <sys/asm_linkage.h>
@@ -275,7 +276,7 @@ kernel_cs_code:
* Before going any further, enable usage of page table NX bit if
* that's how our page tables are set up.
*/
- bt $X86FSET_NX, x86_featureset(%rip)
+ btl $X86FSET_NX, x86_featureset(%rip)
jnc 1f
movl $MSR_AMD_EFER, %ecx
rdmsr
diff --git a/usr/src/uts/intel/brand/common/brand_asm.h b/usr/src/uts/intel/brand/common/brand_asm.h
index 1d540db2a9..175b98eb7d 100644
--- a/usr/src/uts/intel/brand/common/brand_asm.h
+++ b/usr/src/uts/intel/brand/common/brand_asm.h
@@ -20,6 +20,7 @@
*/
/*
* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
*/
#ifndef _COMMON_BRAND_ASM_H
@@ -65,7 +66,7 @@ extern "C" {
* 24 | saved stack pointer |
* | 16 | lwp pointer |
* v 8 | user return address |
- * 0 | BRAND_CALLBACK()'s return addr |
+ * 0 | BRAND_CALLBACK()'s return addr |
* --------------------------------------
*/
@@ -182,7 +183,7 @@ extern "C" {
GET_P_BRAND_DATA(SP_REG, 0, scr); /* get p_brand_data */ \
cmp $0, scr; \
je 9f; \
- cmp $0, handler(scr); /* check handler */ \
+ cmpq $0, handler(scr); /* check handler */ \
je 9f
/*
diff --git a/usr/src/uts/intel/ia32/ml/float.s b/usr/src/uts/intel/ia32/ml/float.s
index b3c4643707..807647f553 100644
--- a/usr/src/uts/intel/ia32/ml/float.s
+++ b/usr/src/uts/intel/ia32/ml/float.s
@@ -22,6 +22,7 @@
/*
* Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, Joyent, Inc.
+ * Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
*/
/* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */
@@ -262,7 +263,7 @@
*/
ENTRY_NP(fpdisable)
- STTS(%rdi) /* set TS bit in %cr0 (disable FPU) */
+ STTS(%rdi) /* set TS bit in %cr0 (disable FPU) */
ret
SET_SIZE(fpdisable)
@@ -284,7 +285,7 @@
leaq avx_initial(%rip), %rcx
xorl %edx, %edx
movl $XFEATURE_AVX, %eax
- bt $X86FSET_AVX, x86_featureset
+ btl $X86FSET_AVX, x86_featureset
cmovael %edx, %eax
orl $(XFEATURE_LEGACY_FP | XFEATURE_SSE), %eax
xrstor (%rcx)
diff --git a/usr/src/uts/intel/kdi/kdi_idthdl.s b/usr/src/uts/intel/kdi/kdi_idthdl.s
index 77ef433184..9c50f7e23f 100644
--- a/usr/src/uts/intel/kdi/kdi_idthdl.s
+++ b/usr/src/uts/intel/kdi/kdi_idthdl.s
@@ -23,6 +23,7 @@
* Use is subject to license terms.
*
* Copyright 2018 Joyent, Inc.
+ * Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
*/
/*
@@ -71,7 +72,7 @@
pushq %r14; \
subq $KPTI_R14, %rsp; \
/* Check for clobbering */ \
- cmp $0, KPTI_FLAG(%rsp); \
+ cmpq $0, KPTI_FLAG(%rsp); \
je 1f; \
/* Don't worry, this totally works */ \
int $8; \