I converted the CryptoPkg IA32 GNU assembly to NASM. I tested the build and the resulting .obj files appear to have identical code.
I have not tested the code running in firmware. This should not impact MSVC or INTEL toolchains since they use MSVC based inline assembly. These patches are available in git: git://github.com/jljusten/edk2 nasm-crypto or https://github.com/jljusten/edk2.git nasm-crypto Or, view the branch in a web browser: https://github.com/jljusten/edk2/tree/nasm-crypto Jordan Justen (5): CryptoPkg BaseCryptLib: Convert Ia32/MathMultS64x64.S to NASM CryptoPkg BaseCryptLib: Convert Ia32/MathDivU64x64.S to NASM CryptoPkg BaseCryptLib: Convert Ia32/MathReminderU64x64.S to NASM CryptoPkg BaseCryptLib: Convert Ia32/MathLShiftS64.S to NASM CryptoPkg BaseCryptLib: Convert Ia32/MathRShiftU64.S to NASM CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf | 10 +-- CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf | 10 +-- CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf | 10 +-- CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf | 10 +-- .../BaseCryptLib/SysCall/Ia32/MathDivU64x64.S | 83 -------------------- .../BaseCryptLib/SysCall/Ia32/MathDivU64x64.nasm | 77 +++++++++++++++++++ .../BaseCryptLib/SysCall/Ia32/MathLShiftS64.S | 62 --------------- .../BaseCryptLib/SysCall/Ia32/MathLShiftS64.nasm | 54 +++++++++++++ .../BaseCryptLib/SysCall/Ia32/MathMultS64x64.S | 77 ------------------- .../BaseCryptLib/SysCall/Ia32/MathMultS64x64.nasm | 71 +++++++++++++++++ .../BaseCryptLib/SysCall/Ia32/MathRShiftU64.S | 66 ---------------- .../BaseCryptLib/SysCall/Ia32/MathRShiftU64.nasm | 57 ++++++++++++++ .../SysCall/Ia32/MathRemainderU64x64.nasm | 83 ++++++++++++++++++++ .../BaseCryptLib/SysCall/Ia32/MathReminderU64x64.S | 89 ---------------------- 14 files changed, 362 insertions(+), 397 deletions(-) delete mode 100644 CryptoPkg/Library/BaseCryptLib/SysCall/Ia32/MathDivU64x64.S create mode 100644 CryptoPkg/Library/BaseCryptLib/SysCall/Ia32/MathDivU64x64.nasm delete mode 100644 CryptoPkg/Library/BaseCryptLib/SysCall/Ia32/MathLShiftS64.S create mode 100644 CryptoPkg/Library/BaseCryptLib/SysCall/Ia32/MathLShiftS64.nasm delete mode 100644 CryptoPkg/Library/BaseCryptLib/SysCall/Ia32/MathMultS64x64.S create mode 100644 CryptoPkg/Library/BaseCryptLib/SysCall/Ia32/MathMultS64x64.nasm delete mode 100644 CryptoPkg/Library/BaseCryptLib/SysCall/Ia32/MathRShiftU64.S create mode 100644 CryptoPkg/Library/BaseCryptLib/SysCall/Ia32/MathRShiftU64.nasm create mode 100644 CryptoPkg/Library/BaseCryptLib/SysCall/Ia32/MathRemainderU64x64.nasm delete mode 100644 CryptoPkg/Library/BaseCryptLib/SysCall/Ia32/MathReminderU64x64.S -- 2.1.1 ------------------------------------------------------------------------------ _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel