aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/asm_amd64.s
diff options
context:
space:
mode:
authorIlya Tocar <ilya.tocar@intel.com>2016-01-13 16:43:22 +0300
committerRuss Cox <rsc@golang.org>2016-01-13 14:04:44 +0000
commit1d1f2fb4c6e4da4a88a0ab8a0b43822d411a23ea (patch)
tree519bdcb23eaaccd80a7104a4d58988ae387f1cc9 /src/runtime/asm_amd64.s
parentceeb52d86214757b25a39a939fe945eb8e787bf6 (diff)
downloadgo-1d1f2fb4c6e4da4a88a0ab8a0b43822d411a23ea.tar.xz
cmd/internal/obj/x86: add new instructions, cleanup.
Add several instructions that were used via BYTE and use them. Instructions added: PEXTRB, PEXTRD, PEXTRQ, PINSRB, XGETBV, POPCNT. Change-Id: I5a80cd390dc01f3555dbbe856a475f74b5e6df65 Reviewed-on: https://go-review.googlesource.com/18593 Run-TryBot: Ilya Tocar <ilya.tocar@intel.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/runtime/asm_amd64.s')
-rw-r--r--src/runtime/asm_amd64.s6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/runtime/asm_amd64.s b/src/runtime/asm_amd64.s
index 6ebe0dc8e6..cac032c370 100644
--- a/src/runtime/asm_amd64.s
+++ b/src/runtime/asm_amd64.s
@@ -56,7 +56,7 @@ notintel:
JNE noavx
MOVL $0, CX
// For XGETBV, OSXSAVE bit is required and sufficient
- BYTE $0x0F; BYTE $0x01; BYTE $0xD0
+ XGETBV
ANDL $6, AX
CMPL AX, $6 // Check for OS support of YMM registers
JNE noavx
@@ -822,10 +822,10 @@ TEXT runtime·getcallersp(SB),NOSPLIT,$0-16
TEXT runtime·cputicks(SB),NOSPLIT,$0-0
CMPB runtime·lfenceBeforeRdtsc(SB), $1
JNE mfence
- BYTE $0x0f; BYTE $0xae; BYTE $0xe8 // LFENCE
+ LFENCE
JMP done
mfence:
- BYTE $0x0f; BYTE $0xae; BYTE $0xf0 // MFENCE
+ MFENCE
done:
RDTSC
SHLQ $32, DX