arch/x86: (Intel64) move RAX to volatile register set
This used to be part of the "restore always" set of registers because __swap was expected to return a value. No longer required, so RAX is moved to the volatile registers and we save a few cycles occasionally. Signed-off-by: Charles E. Youse <charles.youse@intel.com>
This commit is contained in:
parent
074ce889fb
commit
66a2ed2360
4 changed files with 4 additions and 4 deletions
|
@ -222,12 +222,12 @@ __resume:
|
|||
movq _thread_offset_to_r13(%rdi), %r13
|
||||
movq _thread_offset_to_r14(%rdi), %r14
|
||||
movq _thread_offset_to_r15(%rdi), %r15
|
||||
movq _thread_offset_to_rax(%rdi), %rax
|
||||
|
||||
testb $X86_THREAD_FLAG_ALL, _thread_offset_to_flags(%rdi)
|
||||
jz 1f
|
||||
|
||||
fxrstor _thread_offset_to_sse(%rdi)
|
||||
movq _thread_offset_to_rax(%rdi), %rax
|
||||
movq _thread_offset_to_rcx(%rdi), %rcx
|
||||
movq _thread_offset_to_rdx(%rdi), %rdx
|
||||
movq _thread_offset_to_rsi(%rdi), %rsi
|
||||
|
|
|
@ -16,8 +16,8 @@ GEN_OFFSET_SYM(_callee_saved_t, r14);
|
|||
GEN_OFFSET_SYM(_callee_saved_t, r15);
|
||||
GEN_OFFSET_SYM(_callee_saved_t, rip);
|
||||
GEN_OFFSET_SYM(_callee_saved_t, rflags);
|
||||
GEN_OFFSET_SYM(_callee_saved_t, rax);
|
||||
|
||||
GEN_OFFSET_SYM(_thread_arch_t, rax);
|
||||
GEN_OFFSET_SYM(_thread_arch_t, rcx);
|
||||
GEN_OFFSET_SYM(_thread_arch_t, rdx);
|
||||
GEN_OFFSET_SYM(_thread_arch_t, rsi);
|
||||
|
|
|
@ -30,7 +30,6 @@ struct _callee_saved {
|
|||
u64_t r15;
|
||||
u64_t rip;
|
||||
u64_t rflags;
|
||||
u64_t rax;
|
||||
};
|
||||
|
||||
typedef struct _callee_saved _callee_saved_t;
|
||||
|
@ -38,6 +37,7 @@ typedef struct _callee_saved _callee_saved_t;
|
|||
struct _thread_arch {
|
||||
u8_t flags;
|
||||
|
||||
u64_t rax;
|
||||
u64_t rcx;
|
||||
u64_t rdx;
|
||||
u64_t rsi;
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
(___thread_t_callee_saved_OFFSET + ___callee_saved_t_rflags_OFFSET)
|
||||
|
||||
#define _thread_offset_to_rax \
|
||||
(___thread_t_callee_saved_OFFSET + ___callee_saved_t_rax_OFFSET)
|
||||
(___thread_t_arch_OFFSET + ___thread_arch_t_rax_OFFSET)
|
||||
|
||||
#define _thread_offset_to_rcx \
|
||||
(___thread_t_arch_OFFSET + ___thread_arch_t_rcx_OFFSET)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue