render / rpms / qemu

Forked from rpms/qemu 10 months ago
Clone
Glauber Costa f10cad
From 2ced1d80f01645885ac2e28107f724886eb1cd5a Mon Sep 17 00:00:00 2001
Glauber Costa f10cad
From: Jochen Roth <jroth@linux.vnet.ibm.com>
Glauber Costa f10cad
Date: Thu, 12 Mar 2009 14:19:19 +0100
Glauber Costa f10cad
Subject: [PATCH] kvm: testsuite: compile fix - avoid raw string literal
Glauber Costa f10cad
Glauber Costa f10cad
This patch fixes compilation problems of kvm-userspace on current gcc
Glauber Costa f10cad
4.4 compilers which implement the following standard:
Glauber Costa f10cad
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2442.htm
Glauber Costa f10cad
Glauber Costa f10cad
Signed-off-by: Jochen Roth <jroth@linux.vnet.ibm.com>
Glauber Costa f10cad
Signed-off-by: Avi Kivity <avi@redhat.com>
Glauber Costa f10cad
---
Glauber Costa f10cad
 user/test/x86/apic.c   |   32 ++++++++++++++++----------------
Glauber Costa f10cad
 user/test/x86/vmexit.c |    2 +-
Glauber Costa f10cad
 2 files changed, 17 insertions(+), 17 deletions(-)
Glauber Costa f10cad
Glauber Costa f10cad
Index: qemu-kvm-0.10/user/test/x86/apic.c
Glauber Costa f10cad
===================================================================
Glauber Costa f10cad
--- qemu-kvm-0.10.orig/user/test/x86/apic.c
Glauber Costa f10cad
+++ qemu-kvm-0.10/user/test/x86/apic.c
Glauber Costa f10cad
@@ -54,14 +54,14 @@ asm (
Glauber Costa f10cad
     "push %r9  \n\t"
Glauber Costa f10cad
     "push %r8  \n\t"
Glauber Costa f10cad
 #endif
Glauber Costa f10cad
-    "push %"R"di \n\t"
Glauber Costa f10cad
-    "push %"R"si \n\t"
Glauber Costa f10cad
-    "push %"R"bp \n\t"
Glauber Costa f10cad
-    "push %"R"sp \n\t"
Glauber Costa f10cad
-    "push %"R"bx \n\t"
Glauber Costa f10cad
-    "push %"R"dx \n\t"
Glauber Costa f10cad
-    "push %"R"cx \n\t"
Glauber Costa f10cad
-    "push %"R"ax \n\t"
Glauber Costa f10cad
+    "push %"R "di \n\t"
Glauber Costa f10cad
+    "push %"R "si \n\t"
Glauber Costa f10cad
+    "push %"R "bp \n\t"
Glauber Costa f10cad
+    "push %"R "sp \n\t"
Glauber Costa f10cad
+    "push %"R "bx \n\t"
Glauber Costa f10cad
+    "push %"R "dx \n\t"
Glauber Costa f10cad
+    "push %"R "cx \n\t"
Glauber Costa f10cad
+    "push %"R "ax \n\t"
Glauber Costa f10cad
 #ifdef __x86_64__
Glauber Costa f10cad
     "mov %rsp, %rdi \n\t"
Glauber Costa f10cad
     "callq *8*16(%rsp) \n\t"
Glauber Costa f10cad
@@ -70,14 +70,14 @@ asm (
Glauber Costa f10cad
     "calll *4+4*8(%esp) \n\t"
Glauber Costa f10cad
     "add $4, %esp \n\t"
Glauber Costa f10cad
 #endif
Glauber Costa f10cad
-    "pop %"R"ax \n\t"
Glauber Costa f10cad
-    "pop %"R"cx \n\t"
Glauber Costa f10cad
-    "pop %"R"dx \n\t"
Glauber Costa f10cad
-    "pop %"R"bx \n\t"
Glauber Costa f10cad
-    "pop %"R"bp \n\t"
Glauber Costa f10cad
-    "pop %"R"bp \n\t"
Glauber Costa f10cad
-    "pop %"R"si \n\t"
Glauber Costa f10cad
-    "pop %"R"di \n\t"
Glauber Costa f10cad
+    "pop %"R "ax \n\t"
Glauber Costa f10cad
+    "pop %"R "cx \n\t"
Glauber Costa f10cad
+    "pop %"R "dx \n\t"
Glauber Costa f10cad
+    "pop %"R "bx \n\t"
Glauber Costa f10cad
+    "pop %"R "bp \n\t"
Glauber Costa f10cad
+    "pop %"R "bp \n\t"
Glauber Costa f10cad
+    "pop %"R "si \n\t"
Glauber Costa f10cad
+    "pop %"R "di \n\t"
Glauber Costa f10cad
 #ifdef __x86_64__
Glauber Costa f10cad
     "pop %r8  \n\t"
Glauber Costa f10cad
     "pop %r9  \n\t"
Glauber Costa f10cad
Index: qemu-kvm-0.10/user/test/x86/vmexit.c
Glauber Costa f10cad
===================================================================
Glauber Costa f10cad
--- qemu-kvm-0.10.orig/user/test/x86/vmexit.c
Glauber Costa f10cad
+++ qemu-kvm-0.10/user/test/x86/vmexit.c
Glauber Costa f10cad
@@ -31,7 +31,7 @@ int main()
Glauber Costa f10cad
 
Glauber Costa f10cad
 	t1 = rdtsc();
Glauber Costa f10cad
 	for (i = 0; i < N; ++i)
Glauber Costa f10cad
-		asm volatile ("push %%"R"bx; cpuid; pop %%"R"bx"
Glauber Costa f10cad
+		asm volatile ("push %%"R "bx; cpuid; pop %%"R "bx"
Glauber Costa f10cad
 			      : : : "eax", "ecx", "edx");
Glauber Costa f10cad
 	t2 = rdtsc();
Glauber Costa f10cad
 	printf("vmexit latency: %d\n", (int)((t2 - t1) / N));