Skip to content

Commit a92ede2

Browse files
author
Peter Zijlstra
committed
x86/asm: Fix register order
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) <[email protected]> Reviewed-by: Borislav Petkov <[email protected]> Acked-by: Josh Poimboeuf <[email protected]> Tested-by: Alexei Starovoitov <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 4fe79e7 commit a92ede2

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed
Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
2+
/*
3+
* These are in machine order; things rely on that.
4+
*/
15
#ifdef CONFIG_64BIT
26
GEN(rax)
3-
GEN(rbx)
47
GEN(rcx)
58
GEN(rdx)
9+
GEN(rbx)
10+
GEN(rsp)
11+
GEN(rbp)
612
GEN(rsi)
713
GEN(rdi)
8-
GEN(rbp)
914
GEN(r8)
1015
GEN(r9)
1116
GEN(r10)
@@ -16,10 +21,11 @@ GEN(r14)
1621
GEN(r15)
1722
#else
1823
GEN(eax)
19-
GEN(ebx)
2024
GEN(ecx)
2125
GEN(edx)
26+
GEN(ebx)
27+
GEN(esp)
28+
GEN(ebp)
2229
GEN(esi)
2330
GEN(edi)
24-
GEN(ebp)
2531
#endif

0 commit comments

Comments
 (0)