diff mbox series

[kvm-unit-tests] x86: emulator: use "q" operand modifier

Message ID CAGG=3QV-0hPrWx8dFptjqbKMNfne+iTfq2e-KL89ebecO8Ta1w@mail.gmail.com (mailing list archive)
State New, archived
Headers show
Series [kvm-unit-tests] x86: emulator: use "q" operand modifier | expand

Commit Message

Bill Wendling Sept. 9, 2019, 9:28 p.m. UTC
The extended assembly documentation list only "q" as an operand modifier
for DImode registers. The "d" seems to be an AMD-ism, which appears to
be only begrudgingly supported by gcc.

Signed-off-by: Bill Wendling <morbo@google.com>
---
 x86/emulator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jim Mattson Sept. 10, 2019, 4:44 p.m. UTC | #1
On Mon, Sep 9, 2019 at 2:28 PM Bill Wendling <morbo@google.com> wrote:
>
> The extended assembly documentation list only "q" as an operand modifier
> for DImode registers. The "d" seems to be an AMD-ism, which appears to
> be only begrudgingly supported by gcc.
>
> Signed-off-by: Bill Wendling <morbo@google.com>
Reviewed-by: Jim Mattson <jmattson@google.com>
Sean Christopherson Sept. 11, 2019, 7:11 p.m. UTC | #2
On Mon, Sep 09, 2019 at 02:28:22PM -0700, Bill Wendling wrote:
> The extended assembly documentation list only "q" as an operand modifier
> for DImode registers. The "d" seems to be an AMD-ism, which appears to
> be only begrudgingly supported by gcc.
> 
> Signed-off-by: Bill Wendling <morbo@google.com>
> ---

Reviewed-by: Sean Christopherson <sean.j.christopherson@intel.com>
Bill Wendling Sept. 24, 2019, 7:35 p.m. UTC | #3
Plain text now. Sorry for spam.


On Tue, Sep 24, 2019 at 12:33 PM Bill Wendling <morbo@google.com> wrote:
>
> +Paolo Bonzini, Radim Krčmář
>
> On Wed, Sep 11, 2019 at 12:11 PM Sean Christopherson <sean.j.christopherson@intel.com> wrote:
>>
>> On Mon, Sep 09, 2019 at 02:28:22PM -0700, Bill Wendling wrote:
>> > The extended assembly documentation list only "q" as an operand modifier
>> > for DImode registers. The "d" seems to be an AMD-ism, which appears to
>> > be only begrudgingly supported by gcc.
>> >
>> > Signed-off-by: Bill Wendling <morbo@google.com>
>> > ---
>>
>> Reviewed-by: Sean Christopherson <sean.j.christopherson@intel.com>
Paolo Bonzini Sept. 25, 2019, 1:44 p.m. UTC | #4
On 09/09/19 23:28, Bill Wendling wrote:
> The extended assembly documentation list only "q" as an operand modifier
> for DImode registers. The "d" seems to be an AMD-ism, which appears to
> be only begrudgingly supported by gcc.
> 
> Signed-off-by: Bill Wendling <morbo@google.com>
> ---
>  x86/emulator.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/x86/emulator.c b/x86/emulator.c
> index b132b90..621caf9 100644
> --- a/x86/emulator.c
> +++ b/x86/emulator.c
> @@ -799,7 +799,7 @@ static void test_smsw_reg(uint64_t *mem)
>   asm(KVM_FEP "smswl %k0\n\t" : "=a" (rax) : "0" (in_rax));
>   report("32-bit smsw reg", rax == (u32)cr0);
> 
> - asm(KVM_FEP "smswq %d0\n\t" : "=a" (rax) : "0" (in_rax));
> + asm(KVM_FEP "smswq %q0\n\t" : "=a" (rax) : "0" (in_rax));
>   report("64-bit smsw reg", rax == cr0);
>  }
> 

Queued, thanks.

However, note that the patch mangled tabs into spaces.

Paolo
diff mbox series

Patch

diff --git a/x86/emulator.c b/x86/emulator.c
index b132b90..621caf9 100644
--- a/x86/emulator.c
+++ b/x86/emulator.c
@@ -799,7 +799,7 @@  static void test_smsw_reg(uint64_t *mem)
  asm(KVM_FEP "smswl %k0\n\t" : "=a" (rax) : "0" (in_rax));
  report("32-bit smsw reg", rax == (u32)cr0);

- asm(KVM_FEP "smswq %d0\n\t" : "=a" (rax) : "0" (in_rax));
+ asm(KVM_FEP "smswq %q0\n\t" : "=a" (rax) : "0" (in_rax));
  report("64-bit smsw reg", rax == cr0);
 }