version 1.52, 2020/05/08 21:58:03 |
version 1.53, 2020/05/19 21:40:55 |
|
|
/* $NetBSD$ */ |
/* $NetBSD$ */ |
|
|
/* |
/* |
* Copyright (c) 1998, 2007, 2008 The NetBSD Foundation, Inc. |
* Copyright (c) 1998, 2007, 2008, 2020 The NetBSD Foundation, Inc. |
* All rights reserved. |
* All rights reserved. |
* |
* |
* This code is derived from software contributed to The NetBSD Foundation |
* This code is derived from software contributed to The NetBSD Foundation |
Line 172 ENTRY(tsc_get_timecount) |
|
Line 172 ENTRY(tsc_get_timecount) |
|
1: |
1: |
movq L_NCSW(%rcx), %rdi |
movq L_NCSW(%rcx), %rdi |
rdtsc |
rdtsc |
addl CPUVAR(CC_SKEW), %eax |
shlq $32, %rdx |
|
orq %rdx, %rax |
|
addq CPUVAR(CC_SKEW), %rax |
cmpq %rdi, L_NCSW(%rcx) |
cmpq %rdi, L_NCSW(%rcx) |
jne 2f |
jne 2f |
KMSAN_INIT_RET(4) |
KMSAN_INIT_RET(4) |
Line 181 ENTRY(tsc_get_timecount) |
|
Line 183 ENTRY(tsc_get_timecount) |
|
jmp 1b |
jmp 1b |
END(tsc_get_timecount) |
END(tsc_get_timecount) |
|
|
|
STRONG_ALIAS(cpu_counter, tsc_get_timecount) |
|
STRONG_ALIAS(cpu_counter32, tsc_get_timecount) |
|
|
/* |
/* |
* %rdi = name |
* %rdi = name |
* %rsi = sel |
* %rsi = sel |
Line 252 ENTRY(msr_onfault) |
|
Line 257 ENTRY(msr_onfault) |
|
ret |
ret |
END(msr_onfault) |
END(msr_onfault) |
|
|
ENTRY(cpu_counter) |
|
xorl %eax, %eax |
|
rdtsc |
|
shlq $32, %rdx |
|
orq %rdx, %rax |
|
addq CPUVAR(CC_SKEW), %rax |
|
KMSAN_INIT_RET(8) |
|
ret |
|
END(cpu_counter) |
|
|
|
ENTRY(cpu_counter32) |
|
rdtsc |
|
addl CPUVAR(CC_SKEW), %eax |
|
KMSAN_INIT_RET(4) |
|
ret |
|
END(cpu_counter32) |
|
|
|
ENTRY(breakpoint) |
ENTRY(breakpoint) |
pushq %rbp |
pushq %rbp |
movq %rsp, %rbp |
movq %rsp, %rbp |