mirror of
https://github.com/torvalds/linux.git
synced 2026-06-06 21:45:45 +02:00
x86/asm: Fix register order
commit a92ede2d58 upstream.
Ensure the register order is correct; this allows for easy translation
between register number and trampoline and vice-versa.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Borislav Petkov <bp@suse.de>
Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>
Tested-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/r/20211026120309.978573921@infradead.org
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
ccb8fc65a3
commit
8ef808b3f4
|
|
@ -1,11 +1,16 @@
|
||||||
|
/* SPDX-License-Identifier: GPL-2.0 */
|
||||||
|
/*
|
||||||
|
* These are in machine order; things rely on that.
|
||||||
|
*/
|
||||||
#ifdef CONFIG_64BIT
|
#ifdef CONFIG_64BIT
|
||||||
GEN(rax)
|
GEN(rax)
|
||||||
GEN(rbx)
|
|
||||||
GEN(rcx)
|
GEN(rcx)
|
||||||
GEN(rdx)
|
GEN(rdx)
|
||||||
|
GEN(rbx)
|
||||||
|
GEN(rsp)
|
||||||
|
GEN(rbp)
|
||||||
GEN(rsi)
|
GEN(rsi)
|
||||||
GEN(rdi)
|
GEN(rdi)
|
||||||
GEN(rbp)
|
|
||||||
GEN(r8)
|
GEN(r8)
|
||||||
GEN(r9)
|
GEN(r9)
|
||||||
GEN(r10)
|
GEN(r10)
|
||||||
|
|
@ -16,10 +21,11 @@ GEN(r14)
|
||||||
GEN(r15)
|
GEN(r15)
|
||||||
#else
|
#else
|
||||||
GEN(eax)
|
GEN(eax)
|
||||||
GEN(ebx)
|
|
||||||
GEN(ecx)
|
GEN(ecx)
|
||||||
GEN(edx)
|
GEN(edx)
|
||||||
|
GEN(ebx)
|
||||||
|
GEN(esp)
|
||||||
|
GEN(ebp)
|
||||||
GEN(esi)
|
GEN(esi)
|
||||||
GEN(edi)
|
GEN(edi)
|
||||||
GEN(ebp)
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user