From patchwork Wed Feb 11 16:46:46 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 6696 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n1BGl8E9014006 for ; Wed, 11 Feb 2009 16:47:08 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755648AbZBKQrG (ORCPT ); Wed, 11 Feb 2009 11:47:06 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755746AbZBKQrG (ORCPT ); Wed, 11 Feb 2009 11:47:06 -0500 Received: from mx2.redhat.com ([66.187.237.31]:50536 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755648AbZBKQrF (ORCPT ); Wed, 11 Feb 2009 11:47:05 -0500 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n1BGl4lP021592 for ; Wed, 11 Feb 2009 11:47:04 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n1BGl4i8008496; Wed, 11 Feb 2009 11:47:04 -0500 Received: from blackpad.localdomain (vpn-10-61.bos.redhat.com [10.16.10.61]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n1BGl3O5000404; Wed, 11 Feb 2009 11:47:04 -0500 Received: by blackpad.localdomain (Postfix, from userid 500) id 49ADB67F003; Wed, 11 Feb 2009 14:46:46 -0200 (BRST) From: Eduardo Habkost To: Avi Kivity Cc: kvm@vger.kernel.org Subject: [PATCH] kvm: user/test compile fixes for gcc 4.4.0 Date: Wed, 11 Feb 2009 14:46:46 -0200 Message-Id: <1234370806-24338-1-git-send-email-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org 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 --- user/test/x86/apic.c | 32 ++++++++++++++++---------------- user/test/x86/vmexit.c | 2 +- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/user/test/x86/apic.c b/user/test/x86/apic.c index 9c6205b..2d963dc 100644 --- a/user/test/x86/apic.c +++ b/user/test/x86/apic.c @@ -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" diff --git a/user/test/x86/vmexit.c b/user/test/x86/vmexit.c index bd57bfa..7339e2b 100644 --- a/user/test/x86/vmexit.c +++ b/user/test/x86/vmexit.c @@ -31,7 +31,7 @@ int main() t1 = rdtsc(); for (i = 0; i < N; ++i) - asm volatile ("push %%"R"bx; cpuid; pop %%"R"bx" + asm volatile ("push %%" R "bx; cpuid; pop %%" R "bx" : : : "eax", "ecx", "edx"); t2 = rdtsc(); printf("vmexit latency: %d\n", (int)((t2 - t1) / N));