diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2018-04-26 14:09:06 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2018-04-26 14:09:06 +0000 |
commit | d8d7c5e8de3ef6f6275cb2515b7088d50c1651d7 (patch) | |
tree | c2fce8ce8ca62d314670a0e3a3b86b5c7ed0263f /sys | |
parent | 26ff1728512187fa657ee2ac375972f977e799b7 (diff) |
Prefer leaq+%rip-relative over movabsq
xrstor_resume must not have profile prologue, so use NENTRY
Don't use _C_LABEL() with some pure-ASM labels
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/amd64/amd64/locore.S | 8 | ||||
-rw-r--r-- | sys/arch/amd64/amd64/vector.S | 10 |
2 files changed, 9 insertions, 9 deletions
diff --git a/sys/arch/amd64/amd64/locore.S b/sys/arch/amd64/amd64/locore.S index 282a25310c6..1e665019b57 100644 --- a/sys/arch/amd64/amd64/locore.S +++ b/sys/arch/amd64/amd64/locore.S @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.S,v 1.94 2018/02/21 19:24:15 guenther Exp $ */ +/* $OpenBSD: locore.S,v 1.95 2018/04/26 14:09:05 guenther Exp $ */ /* $NetBSD: locore.S,v 1.13 2004/03/25 18:33:17 drochner Exp $ */ /* @@ -496,7 +496,7 @@ ENTRY(cpu_idle_leave) #ifdef DIAGNOSTIC NENTRY(switch_pmcpu_set) - movabsq $switch_active,%rdi + leaq switch_active(%rip),%rdi call _C_LABEL(panic) /* NOTREACHED */ @@ -644,7 +644,7 @@ KUENTRY(syscall_trampback) #ifdef DIAGNOSTIC .Lsyscall_spl_not_lowered: - movabsq $spl_lowered, %rdi + leaq spl_lowered(%rip), %rdi movl TF_RAX(%rsp),%esi movl TF_RDI(%rsp),%edx movl %ebx,%ecx @@ -845,7 +845,7 @@ xrstor_fault: xrstor (%rdi) xorl %eax, %eax ret -ENTRY(xrstor_resume) +NENTRY(xrstor_resume) movl $1, %eax ret diff --git a/sys/arch/amd64/amd64/vector.S b/sys/arch/amd64/amd64/vector.S index 286f8203d82..0b42ba07b7b 100644 --- a/sys/arch/amd64/amd64/vector.S +++ b/sys/arch/amd64/amd64/vector.S @@ -1,4 +1,4 @@ -/* $OpenBSD: vector.S,v 1.55 2018/04/25 17:35:04 guenther Exp $ */ +/* $OpenBSD: vector.S,v 1.56 2018/04/26 14:09:05 guenther Exp $ */ /* $NetBSD: vector.S,v 1.5 2004/06/28 09:13:11 fvdl Exp $ */ /* @@ -218,10 +218,10 @@ IDTVEC(trap0d) pushq %rdx pushq %rcx movq 24(%rsp),%rdx /* over %r[cd]x and err to %rip */ - leaq _C_LABEL(doreti_iret)(%rip),%rcx + leaq doreti_iret(%rip),%rcx cmpq %rcx,%rdx je .Lhandle_doreti - leaq _C_LABEL(xrstor_fault)(%rip),%rcx + leaq xrstor_fault(%rip),%rcx cmpq %rcx,%rdx je .Lhandle_xrstor popq %rcx @@ -230,7 +230,7 @@ IDTVEC(trap0d) .Lhandle_xrstor: /* xrstor faulted; just resume in xrstor_resume */ - leaq _C_LABEL(xrstor_resume)(%rip),%rcx + leaq xrstor_resume(%rip),%rcx jmp 1f .Lhandle_doreti: @@ -342,7 +342,7 @@ calltrap: jne 3f INTRFASTEXIT 3: sti - movabsq $spl_lowered,%rdi + leaq spl_lowered(%rip),%rdi movl CPUVAR(ILEVEL),%esi movl %ebx,%edx xorq %rax,%rax |