Issue 146152
Summary [AArch64] reference to _fltused not generated for floating point code on aarch64-pc-windows-msvc target
Labels new issue
Assignees
Reporter AdamGlass
    
There has been some confusion about whether a reference to _fltused should be generated on windows-msvc targets on architectures other than x86/x64 when compiling code with float types/values. I've talked to the MSVC team and have confirmed that the _fltused reference is generated on all architectures to trigger the initialization of some parts of the CRT.

Using this sample code:

float square(float num) {
 return num * num;
}

I've verified these scenarios 

MSVC x64 v19 latest - EXTRN   _fltused:DWORD
MSVC x64 v192.0 VS16 - EXTRN   _fltused:DWORD
MSVC x86 v19 latest - EXTRN   __fltused:DWORD
MSVC ARM64 v19.latest - IMPORT |_fltused|
MSVC ARM v19 something -IMPORT  |_fltused|
Clang 20.1.0 -target -target x86_64-pc-windows-msvc  -  .globl  _fltused
Clang Trunk -target -target x86_64-pc-windows-msvc  -  .globl  _fltused
Clang Trunk -target aarch64-pc-windows-msvc - <NOTHING>

The net is that Clang does the wrong thing on the aarch64-pc-windows-msvc target.
This was a question raised in this PR but not resolved: https://github.com/llvm/llvm-project/pull/100368

Intend to bring a PR to fix this issue.



_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to