Hi, Andrew,

You are right. The current IA32 assembly codes (SysCall/IA32/) in CryptoPkg is 
dead, and no real symbol link for final module. The original check-in is to 
resolve some link issues for mathematic operations in OpenSSL codes. But these 
linking issues was removed when we applied more OpenSSL flags to disable 
something (e.g. algorithm or feature supports) during some follow-up check-in.
The reason why we didn't remove these codes is just to keep the capability to 
re-enable some features / algorithms in the future. :)

Will check the calling convention and stack issues you mentioned later.


Best Regards & Thanks,
LONG, Qin

From: Andrew Fish [mailto:[email protected]]
Sent: Wednesday, July 23, 2014 9:29 AM
To: [email protected]
Subject: [edk2] [CryptoPkg][StdLib] Ia32 calling convention question

CryptoPkg & StdLib maintainers,

It looks to me like some of the IA32 *.S files are using __stdcall (Pascal 
calling convention) and this will not work correctly with EFI? It seems like 
this will mess up the stack?

If it is dead code what is the point of checking it in?


~/work/src/edk2(master)>git grep ret --  *.S | grep '\$'
CryptoPkg/Library/BaseCryptLib/SysCall/Ia32/MathDivU64x64.S:83:    ret     $16
CryptoPkg/Library/BaseCryptLib/SysCall/Ia32/MathMultS64x64.S:77:    ret     $16
CryptoPkg/Library/BaseCryptLib/SysCall/Ia32/MathReminderU64x64.S:89:    ret     
$16
...
StdLib/LibC/CRT/Ia32/mulll.S:77:    ret     $16
StdLib/LibC/CRT/Ia32/udivdi3.S:83:    ret     $16
StdLib/LibC/CRT/Ia32/umoddi3.S:89:    ret     $16


Thanks,

Andrew Fish

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to