Commit cbde93e1 authored by Dmitry Safonov's avatar Dmitry Safonov Committed by Andrei Vagin

compel/x86: clang-3.4 isn't a friend to numbers in macro

It's a workaround to clang-3.4, which doesn't handle numbers
in asm macros rightly:
https://llvm.org/bugs/show_bug.cgi?id=21500

Which resulted in:
  CC       compel/arch/x86/plugins/std/parasite-head.o
<instantiation>:3:2: error: too few operands for instruction
 pushq
 ^
compel/arch/x86/plugins/std/parasite-head.S:26:2: note: while in macro instantiation
 PARASITE_ENTRY
 ^

Fixes: https://travis-ci.org/0x7f454c46/criu/jobs/186099057

travis-ci: success for 32-bit tests fixes
Signed-off-by: 's avatarDmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent be783a37
...@@ -6,10 +6,10 @@ ...@@ -6,10 +6,10 @@
# error 64-bit parasite should compile with CONFIG_X86_64 # error 64-bit parasite should compile with CONFIG_X86_64
#endif #endif
.macro PARASITE_ENTRY .macro PARASITE_ENTRY num
subq $16, %rsp subq $16, %rsp
andq $~15, %rsp andq $~15, %rsp
pushq $0 pushq $\num
movq %rsp, %rbp movq %rsp, %rbp
movl __export_parasite_cmd(%rip), %edi movl __export_parasite_cmd(%rip), %edi
leaq __export_parasite_args(%rip), %rsi leaq __export_parasite_args(%rip), %rsi
...@@ -23,7 +23,7 @@ ENTRY(__export_parasite_head_start_compat) ...@@ -23,7 +23,7 @@ ENTRY(__export_parasite_head_start_compat)
jmp $__USER_CS,$1f jmp $__USER_CS,$1f
1: 1:
.code64 .code64
PARASITE_ENTRY PARASITE_ENTRY 0
pushq $__USER32_CS pushq $__USER32_CS
pushq $2f pushq $2f
lretq lretq
...@@ -43,7 +43,7 @@ END(__export_parasite_head_start_compat) ...@@ -43,7 +43,7 @@ END(__export_parasite_head_start_compat)
#endif #endif
ENTRY(__export_parasite_head_start) ENTRY(__export_parasite_head_start)
PARASITE_ENTRY PARASITE_ENTRY 0
int $0x03 int $0x03
END(__export_parasite_head_start) END(__export_parasite_head_start)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment