public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* Why is specified -mno-sse on clang x64?
@ 2019-04-04 17:13 Gary Zibrat
  2019-04-04 20:00 ` [edk2-devel] " Andrew Fish
  0 siblings, 1 reply; 5+ messages in thread
From: Gary Zibrat @ 2019-04-04 17:13 UTC (permalink / raw)
  To: devel

[-- Attachment #1: Type: text/plain, Size: 320 bytes --]

Does anyone know why -mno-sse is specified on Clang x64?
https://github.com/tianocore/edk2/commit/6f756db5ea057ff10dd168c7627163cec046a3d9
There doesn't seem to be a corresponding flag for other compilers.

I ask because a commit in LLVM breaks compilation of EDK2:
https://reviews.llvm.org/rL357317#change-QSW9B7DqCGUI

[-- Attachment #2: Type: text/html, Size: 576 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [edk2-devel] Why is specified -mno-sse on clang x64?
  2019-04-04 17:13 Why is specified -mno-sse on clang x64? Gary Zibrat
@ 2019-04-04 20:00 ` Andrew Fish
  2019-04-04 20:09   ` Gary Zibrat
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Fish @ 2019-04-04 20:00 UTC (permalink / raw)
  To: devel, gzibrat

[-- Attachment #1: Type: text/plain, Size: 842 bytes --]

Gary,

The edk2 is freestanding UEFI firmware and the runtime does not support floating point exceptions. 

I think a long time ago there was an optimization bug and the -mno-sse fixed it. 

The UEFI x64 ABI is Windows like and not Sys V like. 

Thanks,

Andrew Fish

> On Apr 4, 2019, at 10:13 AM, Gary Zibrat via Groups.Io <gzibrat=google.com@groups.io> wrote:
> 
> Does anyone know why -mno-sse is specified on Clang x64?
> https://github.com/tianocore/edk2/commit/6f756db5ea057ff10dd168c7627163cec046a3d9 <https://github.com/tianocore/edk2/commit/6f756db5ea057ff10dd168c7627163cec046a3d9>
> There doesn't seem to be a corresponding flag for other compilers.
> 
> I ask because a commit in LLVM breaks compilation of EDK2:
> https://reviews.llvm.org/rL357317#change-QSW9B7DqCGUI <https://reviews.llvm.org/rL357317#change-QSW9B7DqCGUI>
> 


[-- Attachment #2: Type: text/html, Size: 1774 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [edk2-devel] Why is specified -mno-sse on clang x64?
  2019-04-04 20:00 ` [edk2-devel] " Andrew Fish
@ 2019-04-04 20:09   ` Gary Zibrat
  2019-04-04 20:12     ` Andrew Fish
  0 siblings, 1 reply; 5+ messages in thread
From: Gary Zibrat @ 2019-04-04 20:09 UTC (permalink / raw)
  To: Andrew Fish; +Cc: devel

[-- Attachment #1: Type: text/plain, Size: 1136 bytes --]

It seems like the "-mno-mmx -msoft-float -mno-implicit-float" part of the
flags should be enough to handle that now.
Is it ok to take -mno-sse out (in my local branch) for new versions of
clang without having to worry about silent failures?
Since EFIAPI uses the windows ABI, it should be ok to use XMM registers for
integer operations.

On Thu, Apr 4, 2019 at 1:00 PM Andrew Fish <afish@apple.com> wrote:

> Gary,
>
> The edk2 is freestanding UEFI firmware and the runtime does not support
> floating point exceptions.
>
> I think a long time ago there was an optimization bug and the -mno-sse
> fixed it.
>
> The UEFI x64 ABI is Windows like and not Sys V like.
>
> Thanks,
>
> Andrew Fish
>
> On Apr 4, 2019, at 10:13 AM, Gary Zibrat via Groups.Io <
> gzibrat=google.com@groups.io> wrote:
>
> Does anyone know why -mno-sse is specified on Clang x64?
>
> https://github.com/tianocore/edk2/commit/6f756db5ea057ff10dd168c7627163cec046a3d9
> There doesn't seem to be a corresponding flag for other compilers.
>
> I ask because a commit in LLVM breaks compilation of EDK2:
> https://reviews.llvm.org/rL357317#change-QSW9B7DqCGUI
> 
>
>
>

[-- Attachment #2: Type: text/html, Size: 2099 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [edk2-devel] Why is specified -mno-sse on clang x64?
  2019-04-04 20:09   ` Gary Zibrat
@ 2019-04-04 20:12     ` Andrew Fish
  2019-04-08 21:12       ` Gary Zibrat
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Fish @ 2019-04-04 20:12 UTC (permalink / raw)
  To: devel, gzibrat

[-- Attachment #1: Type: text/plain, Size: 1558 bytes --]



> On Apr 4, 2019, at 1:09 PM, Gary Zibrat via Groups.Io <gzibrat=google.com@groups.io> wrote:
> 
> It seems like the "-mno-mmx -msoft-float -mno-implicit-float" part of the flags should be enough to handle that now.
> Is it ok to take -mno-sse out (in my local branch) for new versions of clang without having to worry about silent failures?
> Since EFIAPI uses the windows ABI, it should be ok to use XMM registers for integer operations.
> '

Gary,

Conceptually it should be OK. But obviously no one has tested it :). 

Thanks,

Andrew Fish


> On Thu, Apr 4, 2019 at 1:00 PM Andrew Fish <afish@apple.com <mailto:afish@apple.com>> wrote:
> Gary,
> 
> The edk2 is freestanding UEFI firmware and the runtime does not support floating point exceptions. 
> 
> I think a long time ago there was an optimization bug and the -mno-sse fixed it. 
> 
> The UEFI x64 ABI is Windows like and not Sys V like. 
> 
> Thanks,
> 
> Andrew Fish
> 
>> On Apr 4, 2019, at 10:13 AM, Gary Zibrat via Groups.Io <gzibrat=google.com@groups.io <mailto:gzibrat=google.com@groups.io>> wrote:
>> 
>> Does anyone know why -mno-sse is specified on Clang x64?
>> https://github.com/tianocore/edk2/commit/6f756db5ea057ff10dd168c7627163cec046a3d9 <https://github.com/tianocore/edk2/commit/6f756db5ea057ff10dd168c7627163cec046a3d9>
>> There doesn't seem to be a corresponding flag for other compilers.
>> 
>> I ask because a commit in LLVM breaks compilation of EDK2:
>> https://reviews.llvm.org/rL357317#change-QSW9B7DqCGUI <https://reviews.llvm.org/rL357317#change-QSW9B7DqCGUI>
> 
> 


[-- Attachment #2: Type: text/html, Size: 4391 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [edk2-devel] Why is specified -mno-sse on clang x64?
  2019-04-04 20:12     ` Andrew Fish
@ 2019-04-08 21:12       ` Gary Zibrat
  0 siblings, 0 replies; 5+ messages in thread
From: Gary Zibrat @ 2019-04-08 21:12 UTC (permalink / raw)
  To: Andrew Fish; +Cc: devel

[-- Attachment #1: Type: text/plain, Size: 1635 bytes --]

I've messed around with it locally and nothing seemed to stop working.
Would there be any interest in adding a newer clang configuration with
-mno-sse removed?

On Thu, Apr 4, 2019 at 1:12 PM Andrew Fish <afish@apple.com> wrote:

>
>
> On Apr 4, 2019, at 1:09 PM, Gary Zibrat via Groups.Io <
> gzibrat=google.com@groups.io> wrote:
>
> It seems like the "-mno-mmx -msoft-float -mno-implicit-float" part of the
> flags should be enough to handle that now.
> Is it ok to take -mno-sse out (in my local branch) for new versions of
> clang without having to worry about silent failures?
> Since EFIAPI uses the windows ABI, it should be ok to use XMM registers
> for integer operations.
> '
>
>
> Gary,
>
> Conceptually it should be OK. But obviously no one has tested it :).
>
> Thanks,
>
> Andrew Fish
>
>
> On Thu, Apr 4, 2019 at 1:00 PM Andrew Fish <afish@apple.com> wrote:
>
>> Gary,
>>
>> The edk2 is freestanding UEFI firmware and the runtime does not support
>> floating point exceptions.
>>
>> I think a long time ago there was an optimization bug and the -mno-sse
>> fixed it.
>>
>> The UEFI x64 ABI is Windows like and not Sys V like.
>>
>> Thanks,
>>
>> Andrew Fish
>>
>> On Apr 4, 2019, at 10:13 AM, Gary Zibrat via Groups.Io <
>> gzibrat=google.com@groups.io> wrote:
>>
>> Does anyone know why -mno-sse is specified on Clang x64?
>>
>> https://github.com/tianocore/edk2/commit/6f756db5ea057ff10dd168c7627163cec046a3d9
>> There doesn't seem to be a corresponding flag for other compilers.
>>
>> I ask because a commit in LLVM breaks compilation of EDK2:
>> https://reviews.llvm.org/rL357317#change-QSW9B7DqCGUI
>>
>>
>> 
>
>
>

[-- Attachment #2: Type: text/html, Size: 3958 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-04-08 21:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-04 17:13 Why is specified -mno-sse on clang x64? Gary Zibrat
2019-04-04 20:00 ` [edk2-devel] " Andrew Fish
2019-04-04 20:09   ` Gary Zibrat
2019-04-04 20:12     ` Andrew Fish
2019-04-08 21:12       ` Gary Zibrat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox