Re: [kvm-unit-tests PATCH] x86: prevent GCC from using sse2 instructions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/03/2018 14:37, Radim Krčmář wrote:
>>>  x86/Makefile.x86_64 | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/x86/Makefile.x86_64 b/x86/Makefile.x86_64
>>> index 623fc5b37726..6caa3a8863f1 100644
>>> --- a/x86/Makefile.x86_64
>>> +++ b/x86/Makefile.x86_64
>>> @@ -1,7 +1,7 @@
>>>  cstart.o = $(TEST_DIR)/cstart64.o
>>>  bits = 64
>>>  ldarch = elf64-x86-64
>>> -COMMON_CFLAGS += -mno-red-zone
>>> +COMMON_CFLAGS += -mno-red-zone -mno-sse2
>>
>> Why not -mno-sse?
> 
> We have asm some code with the "x" constraint and it wouldn't compile
> without -msse.  Should I rewrite that to be explicit?

You can wrap that code in x86/emulator.c with

#pragma GCC push_options
#pragma GCC target("sse")
...
#pragma GCC pop_options

Paolo



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux