render / rpms / qemu

Forked from rpms/qemu 9 months ago
Clone

Blame kvm-fix-strayR.patch

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