diff options
author | Andi Kleen <ak@suse.de> | 2005-07-29 00:15:48 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-29 00:46:02 -0400 |
commit | 3829ee6b1be03d5aa3005fe7d19f30088b539836 (patch) | |
tree | be7a9f93c38662905509f1033ef935436d8b02a3 /arch/x86_64/kernel/entry.S | |
parent | 3ba80e7595f3e308e5e7135445b513779fc0ba3b (diff) |
[PATCH] x86_64: Small assembly improvements
Save a byte here and there. Ultimatively useless, but these things always
catch my eyes when reading the code so just fix them for now.
Also I got at least one patch fixing of them already, which gives a good
excuse.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64/kernel/entry.S')
-rw-r--r-- | arch/x86_64/kernel/entry.S | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/x86_64/kernel/entry.S b/arch/x86_64/kernel/entry.S index 28817490fdc6..0696e025dce5 100644 --- a/arch/x86_64/kernel/entry.S +++ b/arch/x86_64/kernel/entry.S | |||
@@ -76,7 +76,7 @@ | |||
76 | 76 | ||
77 | .macro FAKE_STACK_FRAME child_rip | 77 | .macro FAKE_STACK_FRAME child_rip |
78 | /* push in order ss, rsp, eflags, cs, rip */ | 78 | /* push in order ss, rsp, eflags, cs, rip */ |
79 | xorq %rax, %rax | 79 | xorl %eax, %eax |
80 | pushq %rax /* ss */ | 80 | pushq %rax /* ss */ |
81 | CFI_ADJUST_CFA_OFFSET 8 | 81 | CFI_ADJUST_CFA_OFFSET 8 |
82 | pushq %rax /* rsp */ | 82 | pushq %rax /* rsp */ |
@@ -423,7 +423,7 @@ ENTRY(stub_rt_sigreturn) | |||
423 | testl $3,CS(%rdi) | 423 | testl $3,CS(%rdi) |
424 | je 1f | 424 | je 1f |
425 | swapgs | 425 | swapgs |
426 | 1: addl $1,%gs:pda_irqcount # RED-PEN should check preempt count | 426 | 1: incl %gs:pda_irqcount # RED-PEN should check preempt count |
427 | movq %gs:pda_irqstackptr,%rax | 427 | movq %gs:pda_irqstackptr,%rax |
428 | cmoveq %rax,%rsp | 428 | cmoveq %rax,%rsp |
429 | pushq %rdi # save old stack | 429 | pushq %rdi # save old stack |
@@ -436,7 +436,7 @@ ENTRY(common_interrupt) | |||
436 | ret_from_intr: | 436 | ret_from_intr: |
437 | popq %rdi | 437 | popq %rdi |
438 | cli | 438 | cli |
439 | subl $1,%gs:pda_irqcount | 439 | decl %gs:pda_irqcount |
440 | #ifdef CONFIG_DEBUG_INFO | 440 | #ifdef CONFIG_DEBUG_INFO |
441 | movq RBP(%rdi),%rbp | 441 | movq RBP(%rdi),%rbp |
442 | #endif | 442 | #endif |
@@ -494,7 +494,7 @@ retint_signal: | |||
494 | sti | 494 | sti |
495 | SAVE_REST | 495 | SAVE_REST |
496 | movq $-1,ORIG_RAX(%rsp) | 496 | movq $-1,ORIG_RAX(%rsp) |
497 | xorq %rsi,%rsi # oldset | 497 | xorl %esi,%esi # oldset |
498 | movq %rsp,%rdi # &pt_regs | 498 | movq %rsp,%rdi # &pt_regs |
499 | call do_notify_resume | 499 | call do_notify_resume |
500 | RESTORE_REST | 500 | RESTORE_REST |
@@ -752,7 +752,7 @@ child_rip: | |||
752 | movq %rsi, %rdi | 752 | movq %rsi, %rdi |
753 | call *%rax | 753 | call *%rax |
754 | # exit | 754 | # exit |
755 | xorq %rdi, %rdi | 755 | xorl %edi, %edi |
756 | call do_exit | 756 | call do_exit |
757 | 757 | ||
758 | /* | 758 | /* |