diff options
author | Tao Guo <glorioustao@gmail.com> | 2012-09-26 04:28:22 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2012-09-26 07:35:32 -0400 |
commit | 1b2b23d8573076a587ed2081e0d2b69691079e0e (patch) | |
tree | 664d3b567fe4b8f75529c4ab64755961d3d68343 /arch/x86/kernel/entry_64.S | |
parent | e26a44a2d618a491d5c6a2a8aaf66ee03a94739f (diff) |
x86_64: Work around old GAS bug
GAS in binutils(2.16.91) could not parse parentheses within
macro parameters unless fully parenthesized, and this is a
workaround to make old gas work without generating below errors:
arch/x86/kernel/entry_64.S: Assembler messages:
arch/x86/kernel/entry_64.S:387: Error: too many positional arguments
arch/x86/kernel/entry_64.S:389: Error: too many positional arguments
[...]
Signed-off-by: Tao Guo <glorioustao@gmail.com>
Reluctantly-Acked-by: Jan Beulich <jbeulich@novell.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Link: http://lkml.kernel.org/r/1348648102-12653-1-git-send-email-glorioustao@gmail.com
[ Jan argues that these old GAS versions are fragile - which is so, but lets give them a chance. ]
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/kernel/entry_64.S')
-rw-r--r-- | arch/x86/kernel/entry_64.S | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S index b1dac12dc5e6..2c6706167c8d 100644 --- a/arch/x86/kernel/entry_64.S +++ b/arch/x86/kernel/entry_64.S | |||
@@ -342,15 +342,15 @@ ENDPROC(native_usergs_sysret64) | |||
342 | .macro SAVE_ARGS_IRQ | 342 | .macro SAVE_ARGS_IRQ |
343 | cld | 343 | cld |
344 | /* start from rbp in pt_regs and jump over */ | 344 | /* start from rbp in pt_regs and jump over */ |
345 | movq_cfi rdi, RDI-RBP | 345 | movq_cfi rdi, (RDI-RBP) |
346 | movq_cfi rsi, RSI-RBP | 346 | movq_cfi rsi, (RSI-RBP) |
347 | movq_cfi rdx, RDX-RBP | 347 | movq_cfi rdx, (RDX-RBP) |
348 | movq_cfi rcx, RCX-RBP | 348 | movq_cfi rcx, (RCX-RBP) |
349 | movq_cfi rax, RAX-RBP | 349 | movq_cfi rax, (RAX-RBP) |
350 | movq_cfi r8, R8-RBP | 350 | movq_cfi r8, (R8-RBP) |
351 | movq_cfi r9, R9-RBP | 351 | movq_cfi r9, (R9-RBP) |
352 | movq_cfi r10, R10-RBP | 352 | movq_cfi r10, (R10-RBP) |
353 | movq_cfi r11, R11-RBP | 353 | movq_cfi r11, (R11-RBP) |
354 | 354 | ||
355 | /* Save rbp so that we can unwind from get_irq_regs() */ | 355 | /* Save rbp so that we can unwind from get_irq_regs() */ |
356 | movq_cfi rbp, 0 | 356 | movq_cfi rbp, 0 |
@@ -384,7 +384,7 @@ ENDPROC(native_usergs_sysret64) | |||
384 | .endm | 384 | .endm |
385 | 385 | ||
386 | ENTRY(save_rest) | 386 | ENTRY(save_rest) |
387 | PARTIAL_FRAME 1 REST_SKIP+8 | 387 | PARTIAL_FRAME 1 (REST_SKIP+8) |
388 | movq 5*8+16(%rsp), %r11 /* save return address */ | 388 | movq 5*8+16(%rsp), %r11 /* save return address */ |
389 | movq_cfi rbx, RBX+16 | 389 | movq_cfi rbx, RBX+16 |
390 | movq_cfi rbp, RBP+16 | 390 | movq_cfi rbp, RBP+16 |