Lines Matching +full:ecx +full:- +full:2000

1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Compatibility mode system call entry point for x86-64.
5 * Copyright 2000-2002 Andi Kleen, SuSE Labs.
7 #include <asm/asm-offsets.h>
16 #include <asm/nospec-branch.h>
25 * 32-bit SYSENTER entry.
27 * 32-bit system calls through the vDSO's __kernel_vsyscall enter here
28 * on 64-bit kernels running on Intel CPUs.
33 * never happened in any of Google's Bionic versions -- it only happened
34 * in a narrow range of Intel-provided versions.
44 * ecx arg2
64 pushq $__USER_DS /* pt_regs->ss */
65 pushq $0 /* pt_regs->sp = 0 (placeholder) */
69 * off, but we need pt_regs->flags to have IF set. Second, if TS
73 pushfq /* pt_regs->flags (except IF = 0) */
74 pushq $__USER32_CS /* pt_regs->cs */
75 pushq $0 /* pt_regs->ip = 0 (placeholder) */
80 * the saved RAX contains a 32-bit number when we're invoking a 32-bit
81 * syscall. Just in case the high bits are nonzero, zero-extend
87 pushq %rax /* pt_regs->orig_ax */
88 PUSH_AND_CLEAR_REGS rax=$-ENOSYS
100 * If TF is set, we will single-step all the way to here -- do_debug
102 * single-stepping in general. This allows us to avoid having
104 * forces us to single-step through the SYSENTER entry code.)
107 * out-of-line as an optimization: NT is unlikely to be set in the
110 * not-taken and therefore its instructions won't be fetched.
119 * single-step is ignored only for instructions inside the
141 * 32-bit SYSCALL entry.
143 * 32-bit system calls through the vDSO's __kernel_vsyscall enter here
144 * on 64-bit kernels running on AMD CPUs.
150 * - The calling convention for SYSCALL has changed several times without
153 * - Prior to the in-kernel X86_BUG_SYSRET_SS_ATTRS fixup, anything
157 * - Most programmers do not directly target AMD CPUs, and the 32-bit
159 * CPUs, Linux disables the SYSCALL instruction on 32-bit kernels
160 * because the SYSCALL instruction in legacy/native 32-bit mode (as
164 * 32-bit SYSCALL saves RIP to RCX, clears RFLAGS.RF, then saves
170 * Note: RFLAGS saving+masking-with-MSR happens only in Long mode
171 * (in legacy 32-bit mode, IF, RF and VM bits are cleared and that's it).
178 * ecx return address
206 pushq $__USER_DS /* pt_regs->ss */
207 pushq %r8 /* pt_regs->sp */
208 pushq %r11 /* pt_regs->flags */
209 pushq $__USER32_CS /* pt_regs->cs */
210 pushq %rcx /* pt_regs->ip */
213 pushq %rax /* pt_regs->orig_ax */
214 PUSH_AND_CLEAR_REGS rcx=%rbp rax=$-ENOSYS
237 movq RBX(%rsp), %rbx /* pt_regs->rbx */
238 movq RBP(%rsp), %rbp /* pt_regs->rbp */
239 movq EFLAGS(%rsp), %r11 /* pt_regs->flags (in r11) */
240 movq RIP(%rsp), %rcx /* pt_regs->ip (in rcx) */
241 addq $RAX, %rsp /* Skip r8-r15 */
242 popq %rax /* pt_regs->rax */
243 popq %rdx /* Skip pt_regs->cx */
244 popq %rdx /* pt_regs->dx */
245 popq %rsi /* pt_regs->si */
246 popq %rdi /* pt_regs->di */
251 * EIP = ECX
256 * ECX will not match pt_regs->cx, but we're returning to a vDSO
259 * R12-R15 are callee-saved, so they contain whatever was in them
261 * code. We zero R8-R10 to avoid info leaks.
263 movq RSP-ORIG_RAX(%rsp), %rsp
268 * The original userspace %rsp (RSP-ORIG_RAX(%rsp)) is stored