From: "Blower, Melanie" <melanie.blower@intel.com>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: "tglx@linutronix.de" <tglx@linutronix.de>,
"mingo@redhat.com" <mingo@redhat.com>,
"avi@redhat.com" <avi@redhat.com>,
"x86@kernel.org" <x86@kernel.org>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: PROBLEM: compilation issue, inline assembly arch/x86/kvm/emulate.c fails at -O0
Date: Wed, 21 Nov 2012 22:31:11 +0000 [thread overview]
Message-ID: <B3584E72CFEBED439A3ECA9BCE67A4EF1B17F909@FMSMSX107.amr.corp.intel.com> (raw)
In-Reply-To: <50AD4907.5040102@zytor.com>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1957 bytes --]
Thank you so much, this patch solves the compilation errors that I was seeing in the Intel compiler, and with gcc -O0
BTW, my charter is to compile the kernel with the Intel compiler, and my testing stops short of verifying that the kernel build actually works.
Best regards, Melanie Blower
-----Original Message-----
From: H. Peter Anvin [mailto:hpa@zytor.com]
Sent: Wednesday, November 21, 2012 4:35 PM
To: Blower, Melanie
Cc: tglx@linutronix.de; mingo@redhat.com; avi@redhat.com; x86@kernel.org; kvm@vger.kernel.org; linux-kernel@vger.kernel.org
Subject: Re: PROBLEM: compilation issue, inline assembly arch/x86/kvm/emulate.c fails at -O0
On 11/14/2012 11:45 AM, Blower, Melanie wrote:
> [1.] gcc -O0 assembly arch/x86/kvm/emulate.c gets compilation failure
> -- incorrect register restrictions [2.] Full description of the problem/report:
> I'm trying to compile this file at -O0, but gcc chokes in register allocation at the inline assembly.
>
> In the ordinary Linux build, this file compiles with gcc at -O2, without compilation errors.
>
> At -O0, gcc chokes with this message:
> gcc -w -c ./emulateE.c // (using preprocessed file)
> ./emulateE.c: In function `em_mul_ex':
> ./emulateE.c:1918:5: error: can't find a register in class `AREG' while reloading `asm'
> ./emulateE.c:1918:5: error: `asm' operand has impossible constraints
>
> Explanation:
> The file contains an inline asm of a kind:
>
> __asm__ __volatile__ ( " ..... " :
>
> "=m" ((ctxt)->eflags), "=&r" (_tmp), "+a" (*rax), "+d" (*rdx), "+qm"(ex) :
> "i" (11), "m" ((ctxt)->src . val), "a" (*rax), "d" (*rdx));
>
> Note that "+a" in inputs already means that eax is the return value. An then "a" is used as an output constraint too.
>
Hi Melanie,
Can you test the attached patch?
-hpa
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
next prev parent reply other threads:[~2012-11-22 18:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-14 19:45 PROBLEM: compilation issue, inline assembly arch/x86/kvm/emulate.c fails at -O0 Blower, Melanie
2012-11-15 0:14 ` H. Peter Anvin
2012-11-15 15:09 ` Blower, Melanie
2012-11-21 21:35 ` H. Peter Anvin
2012-11-21 22:31 ` Blower, Melanie [this message]
2012-11-21 22:41 ` [PATCH] x86, kvm: Remove incorrect redundant assembly constraint H. Peter Anvin
2012-11-26 7:22 ` Paolo Bonzini
2012-11-26 22:48 ` H. Peter Anvin
2012-11-26 23:48 ` Marcelo Tosatti
2012-11-26 23:49 ` H. Peter Anvin
2012-11-27 0:53 ` Marcelo Tosatti
2012-11-27 0:01 ` [tip:x86/urgent] " tip-bot for H. Peter Anvin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=B3584E72CFEBED439A3ECA9BCE67A4EF1B17F909@FMSMSX107.amr.corp.intel.com \
--to=melanie.blower@intel.com \
--cc=avi@redhat.com \
--cc=hpa@zytor.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).