Building AppPkg for IA32 using VS2013 fails with unresolved external symbol 
__dtoui3.
__dtoui3 is a helper function called by the generated code. It is analogous to 
the
__ftol2 helper function call generated by older Microsoft compilers. VS2013 
calls
__dtoui3 instead of __ftol2. Apparently the new function converts double to 
integer
with reduced use of the x87 fpu.

The call to __ftol2 generated by older Microsoft compilers is resolved by binary
file StdLib\LibC\Main\Ia32\ftol2.obj, an object extracted from Microsoft libs. 
The
same approach could be used for VS2013's __dtoui3 by extracting ftol3.obj and 
adding
it to EDK2. But doing so causes unresolved external symbol __except1. This can 
be
fixed by extracting fpexcept.obj from VS2013 libs and adding it to EDK2. But 
once
that is done, 12 more unresolved externals are created.

Another approach is to use /arch:SSE when building LibGdtoa for IA32 with VS2013
(default is /arch:SSE2). This causes VS2013 to generate a call to __ftol2 
instead
of __dtoui3 and resolves the build failure. I suppose this is the route to take.
Concerns are:
1) Is it OK to combine modules compiled with /arch:SSE2 and /arch:SSE?
2) Is the current EDK2 ftol2.obj binary compatible with all supported Microsoft
   compilers, including VS2013?
I will do some testing and submit a patch if it looks OK.
Thanks,
Scott




------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to