kvm: user/test compile fixes for gcc 4.4.0
PATCH 1/1 kvm: user/test compile fixes for gcc 4.4.0
Newer gcc versions support a R"..." construct, so we can't use "abc"R"def" constructs without any space between R and the quotes, when using -std=gnu99 (that is used by the user/test code).
This fixes this error:
test/x86/vmexit.c:34:26: error: invalid character ' ' in raw string delimiter
test/x86/vmexit.c: In function ‘main’:
test/x86/vmexit.c:34: error: stray ‘R’ in program test/x86/vmexit.c:34:46: error: invalid character '
' in raw string delimiter
test/x86/vmexit.c:34: error: expected ‘:’ or ‘)’ before string constant test/x86/vmexit.c:34: error: stray ‘R’ in program
Signed-off-by Eduardo Habkost <[email protected]>
--- user/test/x86/apic.c | 32 ++++++++++++++++---------------- user/test/x86/vmexit.c | 2 +- 2 files changed, 17 insertions(+), 17 deletions(-)
user/test/x86/apic.c +16 -16
@@ -54,14 +54,14 @@ asm ("push %r9 \n\t" "push %r8 \n\t"#endif -"push %" R "di \n\t" -"push %" R "si \n\t" -"push %" R "bp \n\t" -"push %" R "sp \n\t" -"push %" R "bx \n\t" -"push %" R "dx \n\t" -"push %" R "cx \n\t" -"push %" R "ax \n\t" +"push %" R "di \n\t" +"push %" R "si \n\t" +"push %" R "bp \n\t" +"push %" R "sp \n\t" +"push %" R "bx \n\t" +"push %" R "dx \n\t" +"push %" R "cx \n\t" +"push %" R "ax \n\t" #ifdef __x86_64__"mov %rsp, %rdi \n\t" "callq *8*16(%rsp) \n\t"
@@ -70,14 +70,14 @@ asm ("calll *4+4*8(%esp) \n\t" "add $4, %esp \n\t"#endif -"pop %" R "ax \n\t" -"pop %" R "cx \n\t" -"pop %" R "dx \n\t" -"pop %" R "bx \n\t" -"pop %" R "bp \n\t" -"pop %" R "bp \n\t" -"pop %" R "si \n\t" -"pop %" R "di \n\t" +"pop %" R "ax \n\t" +"pop %" R "cx \n\t" +"pop %" R "dx \n\t" +"pop %" R "bx \n\t" +"pop %" R "bp \n\t" +"pop %" R "bp \n\t" +"pop %" R "si \n\t" +"pop %" R "di \n\t" #ifdef __x86_64__"pop %r8 \n\t" "pop %r9 \n\t"
user/test/x86/vmexit.c +1 -1
@@ -31,7 +31,7 @@ int main() t1 =rdtsc ();for (i =0 ; i <N ; ++i) - asmvolatile ("push %%" R "bx; cpuid; pop %%" R "bx" + asmvolatile ("push %%" R "bx; cpuid; pop %%" R "bx" : : :"eax" ,"ecx" ,"edx" ); t2 =rdtsc ();printf ("vmexit latency: %d\n" , (int )((t2 - t1) /N ));
Signature · 1 line
1.6.0.2.GIT