From 13688930ae9ad5101f10d28f650382058e449616 Mon Sep 17 00:00:00 2001 From: Liming Gao Date: Mon, 4 Jun 2018 13:26:22 +0800 Subject: [PATCH 1/1] MdePkg: Remove X86 ASM and S files NASM has replaced ASM and S files. 1. Remove ASM from all modules. 2. Remove S files from the drivers only. 3. https://bugzilla.tianocore.org/show_bug.cgi?id=881 After NASM is updated, S files can be removed from Library. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao Reviewed-by: Michael Kinney --- MdePkg/Library/BaseCpuLib/BaseCpuLib.inf | 4 - .../Library/BaseCpuLib/Ia32/CpuFlushTlb.asm | 40 --- MdePkg/Library/BaseCpuLib/Ia32/CpuSleep.asm | 39 --- MdePkg/Library/BaseCpuLib/X64/CpuFlushTlb.asm | 38 --- MdePkg/Library/BaseCpuLib/X64/CpuSleep.asm | 37 -- .../BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf | 4 +- .../BaseIoLibIntrinsic/Ia32/IoFifo.asm | 141 -------- .../Library/BaseIoLibIntrinsic/X64/IoFifo.asm | 127 ------- MdePkg/Library/BaseLib/BaseLib.inf | 248 +------------- MdePkg/Library/BaseLib/Ia32/ARShiftU64.asm | 48 --- MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.asm | 40 --- MdePkg/Library/BaseLib/Ia32/CpuId.asm | 66 ---- MdePkg/Library/BaseLib/Ia32/CpuIdEx.asm | 68 ---- MdePkg/Library/BaseLib/Ia32/CpuPause.asm | 40 --- MdePkg/Library/BaseLib/Ia32/DisableCache.asm | 45 --- .../BaseLib/Ia32/DisableInterrupts.asm | 40 --- .../Library/BaseLib/Ia32/DisablePaging32.asm | 57 ---- MdePkg/Library/BaseLib/Ia32/DivU64x32.asm | 46 --- .../BaseLib/Ia32/DivU64x32Remainder.asm | 51 --- .../BaseLib/Ia32/DivU64x64Remainder.asm | 92 ----- MdePkg/Library/BaseLib/Ia32/EnableCache.asm | 45 --- .../BaseLib/Ia32/EnableDisableInterrupts.asm | 41 --- .../Library/BaseLib/Ia32/EnableInterrupts.asm | 40 --- .../Library/BaseLib/Ia32/EnablePaging32.asm | 57 ---- .../Library/BaseLib/Ia32/EnablePaging64.asm | 68 ---- .../Library/BaseLib/Ia32/FlushCacheLine.asm | 55 --- MdePkg/Library/BaseLib/Ia32/FxRestore.asm | 42 --- MdePkg/Library/BaseLib/Ia32/FxSave.asm | 42 --- MdePkg/Library/BaseLib/Ia32/Invd.asm | 40 --- MdePkg/Library/BaseLib/Ia32/LRotU64.asm | 51 --- MdePkg/Library/BaseLib/Ia32/LShiftU64.asm | 48 --- MdePkg/Library/BaseLib/Ia32/LongJump.asm | 46 --- MdePkg/Library/BaseLib/Ia32/ModU64x32.asm | 45 --- MdePkg/Library/BaseLib/Ia32/Monitor.asm | 45 --- MdePkg/Library/BaseLib/Ia32/MultU64x32.asm | 43 --- MdePkg/Library/BaseLib/Ia32/MultU64x64.asm | 47 --- MdePkg/Library/BaseLib/Ia32/Mwait.asm | 43 --- MdePkg/Library/BaseLib/Ia32/RRotU64.asm | 51 --- MdePkg/Library/BaseLib/Ia32/RShiftU64.asm | 48 --- MdePkg/Library/BaseLib/Ia32/RdRand.asm | 94 ------ MdePkg/Library/BaseLib/Ia32/ReadCr0.asm | 40 --- MdePkg/Library/BaseLib/Ia32/ReadCr2.asm | 40 --- MdePkg/Library/BaseLib/Ia32/ReadCr3.asm | 40 --- MdePkg/Library/BaseLib/Ia32/ReadCr4.asm | 40 --- MdePkg/Library/BaseLib/Ia32/ReadCs.asm | 40 --- MdePkg/Library/BaseLib/Ia32/ReadDr0.asm | 40 --- MdePkg/Library/BaseLib/Ia32/ReadDr1.asm | 40 --- MdePkg/Library/BaseLib/Ia32/ReadDr2.asm | 40 --- MdePkg/Library/BaseLib/Ia32/ReadDr3.asm | 40 --- MdePkg/Library/BaseLib/Ia32/ReadDr4.asm | 47 --- MdePkg/Library/BaseLib/Ia32/ReadDr5.asm | 47 --- MdePkg/Library/BaseLib/Ia32/ReadDr6.asm | 40 --- MdePkg/Library/BaseLib/Ia32/ReadDr7.asm | 40 --- MdePkg/Library/BaseLib/Ia32/ReadDs.asm | 40 --- MdePkg/Library/BaseLib/Ia32/ReadEflags.asm | 41 --- MdePkg/Library/BaseLib/Ia32/ReadEs.asm | 40 --- MdePkg/Library/BaseLib/Ia32/ReadFs.asm | 40 --- MdePkg/Library/BaseLib/Ia32/ReadGdtr.asm | 41 --- MdePkg/Library/BaseLib/Ia32/ReadGs.asm | 40 --- MdePkg/Library/BaseLib/Ia32/ReadIdtr.asm | 41 --- MdePkg/Library/BaseLib/Ia32/ReadLdtr.asm | 40 --- MdePkg/Library/BaseLib/Ia32/ReadMm0.asm | 45 --- MdePkg/Library/BaseLib/Ia32/ReadMm1.asm | 45 --- MdePkg/Library/BaseLib/Ia32/ReadMm2.asm | 45 --- MdePkg/Library/BaseLib/Ia32/ReadMm3.asm | 45 --- MdePkg/Library/BaseLib/Ia32/ReadMm4.asm | 45 --- MdePkg/Library/BaseLib/Ia32/ReadMm5.asm | 45 --- MdePkg/Library/BaseLib/Ia32/ReadMm6.asm | 45 --- MdePkg/Library/BaseLib/Ia32/ReadMm7.asm | 45 --- MdePkg/Library/BaseLib/Ia32/ReadMsr64.asm | 41 --- MdePkg/Library/BaseLib/Ia32/ReadPmc.asm | 41 --- MdePkg/Library/BaseLib/Ia32/ReadSs.asm | 40 --- MdePkg/Library/BaseLib/Ia32/ReadTr.asm | 40 --- MdePkg/Library/BaseLib/Ia32/ReadTsc.asm | 40 --- MdePkg/Library/BaseLib/Ia32/SetJump.asm | 51 --- MdePkg/Library/BaseLib/Ia32/SwapBytes64.asm | 43 --- MdePkg/Library/BaseLib/Ia32/Thunk16.asm | 260 --------------- MdePkg/Library/BaseLib/Ia32/Wbinvd.asm | 40 --- MdePkg/Library/BaseLib/Ia32/WriteCr0.asm | 41 --- MdePkg/Library/BaseLib/Ia32/WriteCr2.asm | 41 --- MdePkg/Library/BaseLib/Ia32/WriteCr3.asm | 41 --- MdePkg/Library/BaseLib/Ia32/WriteCr4.asm | 41 --- MdePkg/Library/BaseLib/Ia32/WriteDr0.asm | 41 --- MdePkg/Library/BaseLib/Ia32/WriteDr1.asm | 41 --- MdePkg/Library/BaseLib/Ia32/WriteDr2.asm | 41 --- MdePkg/Library/BaseLib/Ia32/WriteDr3.asm | 41 --- MdePkg/Library/BaseLib/Ia32/WriteDr4.asm | 48 --- MdePkg/Library/BaseLib/Ia32/WriteDr5.asm | 48 --- MdePkg/Library/BaseLib/Ia32/WriteDr6.asm | 41 --- MdePkg/Library/BaseLib/Ia32/WriteDr7.asm | 41 --- MdePkg/Library/BaseLib/Ia32/WriteGdtr.asm | 41 --- MdePkg/Library/BaseLib/Ia32/WriteIdtr.asm | 44 --- MdePkg/Library/BaseLib/Ia32/WriteLdtr.asm | 41 --- MdePkg/Library/BaseLib/Ia32/WriteMm0.asm | 41 --- MdePkg/Library/BaseLib/Ia32/WriteMm1.asm | 41 --- MdePkg/Library/BaseLib/Ia32/WriteMm2.asm | 41 --- MdePkg/Library/BaseLib/Ia32/WriteMm3.asm | 41 --- MdePkg/Library/BaseLib/Ia32/WriteMm4.asm | 41 --- MdePkg/Library/BaseLib/Ia32/WriteMm5.asm | 41 --- MdePkg/Library/BaseLib/Ia32/WriteMm6.asm | 41 --- MdePkg/Library/BaseLib/Ia32/WriteMm7.asm | 41 --- MdePkg/Library/BaseLib/Ia32/WriteMsr64.asm | 44 --- MdePkg/Library/BaseLib/X64/CpuBreakpoint.asm | 37 -- MdePkg/Library/BaseLib/X64/CpuId.asm | 62 ---- MdePkg/Library/BaseLib/X64/CpuIdEx.asm | 64 ---- MdePkg/Library/BaseLib/X64/CpuPause.asm | 37 -- MdePkg/Library/BaseLib/X64/DisableCache.asm | 43 --- .../Library/BaseLib/X64/DisableInterrupts.asm | 38 --- .../Library/BaseLib/X64/DisablePaging64.asm | 84 ----- MdePkg/Library/BaseLib/X64/EnableCache.asm | 43 --- .../BaseLib/X64/EnableDisableInterrupts.asm | 39 --- .../Library/BaseLib/X64/EnableInterrupts.asm | 38 --- MdePkg/Library/BaseLib/X64/FlushCacheLine.asm | 39 --- MdePkg/Library/BaseLib/X64/FxRestore.asm | 38 --- MdePkg/Library/BaseLib/X64/FxSave.asm | 38 --- MdePkg/Library/BaseLib/X64/Invd.asm | 38 --- MdePkg/Library/BaseLib/X64/LongJump.asm | 58 ---- MdePkg/Library/BaseLib/X64/Monitor.asm | 43 --- MdePkg/Library/BaseLib/X64/Mwait.asm | 41 --- MdePkg/Library/BaseLib/X64/RdRand.asm | 83 ----- MdePkg/Library/BaseLib/X64/ReadCr0.asm | 38 --- MdePkg/Library/BaseLib/X64/ReadCr2.asm | 38 --- MdePkg/Library/BaseLib/X64/ReadCr3.asm | 38 --- MdePkg/Library/BaseLib/X64/ReadCr4.asm | 38 --- MdePkg/Library/BaseLib/X64/ReadCs.asm | 38 --- MdePkg/Library/BaseLib/X64/ReadDr0.asm | 38 --- MdePkg/Library/BaseLib/X64/ReadDr1.asm | 38 --- MdePkg/Library/BaseLib/X64/ReadDr2.asm | 38 --- MdePkg/Library/BaseLib/X64/ReadDr3.asm | 38 --- MdePkg/Library/BaseLib/X64/ReadDr4.asm | 42 --- MdePkg/Library/BaseLib/X64/ReadDr5.asm | 42 --- MdePkg/Library/BaseLib/X64/ReadDr6.asm | 38 --- MdePkg/Library/BaseLib/X64/ReadDr7.asm | 38 --- MdePkg/Library/BaseLib/X64/ReadDs.asm | 38 --- MdePkg/Library/BaseLib/X64/ReadEflags.asm | 39 --- MdePkg/Library/BaseLib/X64/ReadEs.asm | 38 --- MdePkg/Library/BaseLib/X64/ReadFs.asm | 38 --- MdePkg/Library/BaseLib/X64/ReadGdtr.asm | 38 --- MdePkg/Library/BaseLib/X64/ReadGs.asm | 38 --- MdePkg/Library/BaseLib/X64/ReadIdtr.asm | 38 --- MdePkg/Library/BaseLib/X64/ReadLdtr.asm | 38 --- MdePkg/Library/BaseLib/X64/ReadMm0.asm | 41 --- MdePkg/Library/BaseLib/X64/ReadMm1.asm | 41 --- MdePkg/Library/BaseLib/X64/ReadMm2.asm | 41 --- MdePkg/Library/BaseLib/X64/ReadMm3.asm | 41 --- MdePkg/Library/BaseLib/X64/ReadMm4.asm | 41 --- MdePkg/Library/BaseLib/X64/ReadMm5.asm | 41 --- MdePkg/Library/BaseLib/X64/ReadMm6.asm | 41 --- MdePkg/Library/BaseLib/X64/ReadMm7.asm | 41 --- MdePkg/Library/BaseLib/X64/ReadMsr64.asm | 40 --- MdePkg/Library/BaseLib/X64/ReadPmc.asm | 40 --- MdePkg/Library/BaseLib/X64/ReadSs.asm | 38 --- MdePkg/Library/BaseLib/X64/ReadTr.asm | 38 --- MdePkg/Library/BaseLib/X64/ReadTsc.asm | 40 --- MdePkg/Library/BaseLib/X64/SetJump.asm | 66 ---- MdePkg/Library/BaseLib/X64/SwitchStack.asm | 51 --- MdePkg/Library/BaseLib/X64/Thunk16.asm | 315 ------------------ MdePkg/Library/BaseLib/X64/Wbinvd.asm | 38 --- MdePkg/Library/BaseLib/X64/WriteCr0.asm | 39 --- MdePkg/Library/BaseLib/X64/WriteCr2.asm | 39 --- MdePkg/Library/BaseLib/X64/WriteCr3.asm | 39 --- MdePkg/Library/BaseLib/X64/WriteCr4.asm | 39 --- MdePkg/Library/BaseLib/X64/WriteDr0.asm | 39 --- MdePkg/Library/BaseLib/X64/WriteDr1.asm | 39 --- MdePkg/Library/BaseLib/X64/WriteDr2.asm | 39 --- MdePkg/Library/BaseLib/X64/WriteDr3.asm | 39 --- MdePkg/Library/BaseLib/X64/WriteDr4.asm | 43 --- MdePkg/Library/BaseLib/X64/WriteDr5.asm | 43 --- MdePkg/Library/BaseLib/X64/WriteDr6.asm | 39 --- MdePkg/Library/BaseLib/X64/WriteDr7.asm | 39 --- MdePkg/Library/BaseLib/X64/WriteGdtr.asm | 38 --- MdePkg/Library/BaseLib/X64/WriteIdtr.asm | 41 --- MdePkg/Library/BaseLib/X64/WriteLdtr.asm | 38 --- MdePkg/Library/BaseLib/X64/WriteMm0.asm | 41 --- MdePkg/Library/BaseLib/X64/WriteMm1.asm | 41 --- MdePkg/Library/BaseLib/X64/WriteMm2.asm | 41 --- MdePkg/Library/BaseLib/X64/WriteMm3.asm | 41 --- MdePkg/Library/BaseLib/X64/WriteMm4.asm | 41 --- MdePkg/Library/BaseLib/X64/WriteMm5.asm | 41 --- MdePkg/Library/BaseLib/X64/WriteMm6.asm | 41 --- MdePkg/Library/BaseLib/X64/WriteMm7.asm | 41 --- MdePkg/Library/BaseLib/X64/WriteMsr64.asm | 41 --- .../BaseMemoryLibMmx/BaseMemoryLibMmx.inf | 24 +- .../BaseMemoryLibMmx/Ia32/CompareMem.asm | 56 ---- .../Library/BaseMemoryLibMmx/Ia32/CopyMem.asm | 77 ----- .../BaseMemoryLibMmx/Ia32/ScanMem16.asm | 55 --- .../BaseMemoryLibMmx/Ia32/ScanMem32.asm | 55 --- .../BaseMemoryLibMmx/Ia32/ScanMem64.asm | 64 ---- .../BaseMemoryLibMmx/Ia32/ScanMem8.asm | 55 --- .../Library/BaseMemoryLibMmx/Ia32/SetMem.asm | 70 ---- .../BaseMemoryLibMmx/Ia32/SetMem16.asm | 63 ---- .../BaseMemoryLibMmx/Ia32/SetMem32.asm | 59 ---- .../BaseMemoryLibMmx/Ia32/SetMem64.asm | 50 --- .../Library/BaseMemoryLibMmx/Ia32/ZeroMem.asm | 56 ---- .../BaseMemoryLibMmx/X64/CompareMem.asm | 54 --- .../Library/BaseMemoryLibMmx/X64/CopyMem.asm | 70 ---- .../BaseMemoryLibMmx/X64/ScanMem16.asm | 53 --- .../BaseMemoryLibMmx/X64/ScanMem32.asm | 53 --- .../BaseMemoryLibMmx/X64/ScanMem64.asm | 53 --- .../Library/BaseMemoryLibMmx/X64/ScanMem8.asm | 53 --- .../Library/BaseMemoryLibMmx/X64/SetMem.asm | 58 ---- .../Library/BaseMemoryLibMmx/X64/SetMem16.asm | 57 ---- .../Library/BaseMemoryLibMmx/X64/SetMem32.asm | 53 --- .../Library/BaseMemoryLibMmx/X64/SetMem64.asm | 46 --- .../Library/BaseMemoryLibMmx/X64/ZeroMem.asm | 54 --- .../BaseMemoryLibOptDxe.inf | 24 +- .../BaseMemoryLibOptDxe/Ia32/CompareMem.asm | 56 ---- .../BaseMemoryLibOptDxe/Ia32/CopyMem.asm | 84 ----- .../BaseMemoryLibOptDxe/Ia32/ScanMem16.asm | 55 --- .../BaseMemoryLibOptDxe/Ia32/ScanMem32.asm | 55 --- .../BaseMemoryLibOptDxe/Ia32/ScanMem64.asm | 64 ---- .../BaseMemoryLibOptDxe/Ia32/ScanMem8.asm | 55 --- .../BaseMemoryLibOptDxe/Ia32/SetMem.asm | 53 --- .../BaseMemoryLibOptDxe/Ia32/SetMem16.asm | 45 --- .../BaseMemoryLibOptDxe/Ia32/SetMem32.asm | 45 --- .../BaseMemoryLibOptDxe/Ia32/SetMem64.asm | 49 --- .../BaseMemoryLibOptDxe/Ia32/ZeroMem.asm | 50 --- .../BaseMemoryLibOptDxe/X64/CompareMem.asm | 54 --- .../BaseMemoryLibOptDxe/X64/CopyMem.asm | 79 ----- .../BaseMemoryLibOptDxe/X64/ScanMem16.asm | 53 --- .../BaseMemoryLibOptDxe/X64/ScanMem32.asm | 53 --- .../BaseMemoryLibOptDxe/X64/ScanMem64.asm | 53 --- .../BaseMemoryLibOptDxe/X64/ScanMem8.asm | 53 --- .../BaseMemoryLibOptDxe/X64/SetMem.asm | 58 ---- .../BaseMemoryLibOptDxe/X64/SetMem16.asm | 45 --- .../BaseMemoryLibOptDxe/X64/SetMem32.asm | 45 --- .../BaseMemoryLibOptDxe/X64/SetMem64.asm | 44 --- .../BaseMemoryLibOptDxe/X64/ZeroMem.asm | 48 --- .../BaseMemoryLibOptPei.inf | 24 +- .../BaseMemoryLibOptPei/Ia32/CompareMem.asm | 56 ---- .../BaseMemoryLibOptPei/Ia32/CopyMem.asm | 61 ---- .../BaseMemoryLibOptPei/Ia32/ScanMem16.asm | 55 --- .../BaseMemoryLibOptPei/Ia32/ScanMem32.asm | 55 --- .../BaseMemoryLibOptPei/Ia32/ScanMem64.asm | 64 ---- .../BaseMemoryLibOptPei/Ia32/ScanMem8.asm | 55 --- .../BaseMemoryLibOptPei/Ia32/SetMem.asm | 53 --- .../BaseMemoryLibOptPei/Ia32/SetMem16.asm | 45 --- .../BaseMemoryLibOptPei/Ia32/SetMem32.asm | 45 --- .../BaseMemoryLibOptPei/Ia32/SetMem64.asm | 49 --- .../BaseMemoryLibOptPei/Ia32/ZeroMem.asm | 50 --- .../BaseMemoryLibOptPei/X64/CompareMem.asm | 54 --- .../BaseMemoryLibOptPei/X64/CopyMem.asm | 61 ---- .../BaseMemoryLibOptPei/X64/ScanMem16.asm | 53 --- .../BaseMemoryLibOptPei/X64/ScanMem32.asm | 53 --- .../BaseMemoryLibOptPei/X64/ScanMem64.asm | 53 --- .../BaseMemoryLibOptPei/X64/ScanMem8.asm | 53 --- .../BaseMemoryLibOptPei/X64/SetMem.asm | 45 --- .../BaseMemoryLibOptPei/X64/SetMem16.asm | 44 --- .../BaseMemoryLibOptPei/X64/SetMem32.asm | 44 --- .../BaseMemoryLibOptPei/X64/SetMem64.asm | 43 --- .../BaseMemoryLibOptPei/X64/ZeroMem.asm | 47 --- .../BaseMemoryLibRepStr.inf | 24 +- .../BaseMemoryLibRepStr/Ia32/CompareMem.asm | 56 ---- .../BaseMemoryLibRepStr/Ia32/CopyMem.asm | 63 ---- .../BaseMemoryLibRepStr/Ia32/ScanMem16.asm | 57 ---- .../BaseMemoryLibRepStr/Ia32/ScanMem32.asm | 57 ---- .../BaseMemoryLibRepStr/Ia32/ScanMem64.asm | 66 ---- .../BaseMemoryLibRepStr/Ia32/ScanMem8.asm | 57 ---- .../BaseMemoryLibRepStr/Ia32/SetMem.asm | 45 --- .../BaseMemoryLibRepStr/Ia32/SetMem16.asm | 45 --- .../BaseMemoryLibRepStr/Ia32/SetMem32.asm | 45 --- .../BaseMemoryLibRepStr/Ia32/SetMem64.asm | 49 --- .../BaseMemoryLibRepStr/Ia32/ZeroMem.asm | 50 --- .../BaseMemoryLibRepStr/X64/CompareMem.asm | 54 --- .../BaseMemoryLibRepStr/X64/CopyMem.asm | 61 ---- .../BaseMemoryLibRepStr/X64/ScanMem16.asm | 53 --- .../BaseMemoryLibRepStr/X64/ScanMem32.asm | 53 --- .../BaseMemoryLibRepStr/X64/ScanMem64.asm | 53 --- .../BaseMemoryLibRepStr/X64/ScanMem8.asm | 53 --- .../BaseMemoryLibRepStr/X64/SetMem.asm | 44 --- .../BaseMemoryLibRepStr/X64/SetMem16.asm | 44 --- .../BaseMemoryLibRepStr/X64/SetMem32.asm | 44 --- .../BaseMemoryLibRepStr/X64/SetMem64.asm | 43 --- .../BaseMemoryLibRepStr/X64/ZeroMem.asm | 47 --- .../BaseMemoryLibSse2/BaseMemoryLibSse2.inf | 24 +- .../BaseMemoryLibSse2/Ia32/CompareMem.asm | 56 ---- .../BaseMemoryLibSse2/Ia32/CopyMem.asm | 84 ----- .../BaseMemoryLibSse2/Ia32/ScanMem16.asm | 55 --- .../BaseMemoryLibSse2/Ia32/ScanMem32.asm | 55 --- .../BaseMemoryLibSse2/Ia32/ScanMem64.asm | 64 ---- .../BaseMemoryLibSse2/Ia32/ScanMem8.asm | 55 --- .../Library/BaseMemoryLibSse2/Ia32/SetMem.asm | 75 ----- .../BaseMemoryLibSse2/Ia32/SetMem16.asm | 71 ---- .../BaseMemoryLibSse2/Ia32/SetMem32.asm | 70 ---- .../BaseMemoryLibSse2/Ia32/SetMem64.asm | 64 ---- .../BaseMemoryLibSse2/Ia32/ZeroMem.asm | 67 ---- .../BaseMemoryLibSse2/X64/CompareMem.asm | 54 --- .../Library/BaseMemoryLibSse2/X64/CopyMem.asm | 79 ----- .../BaseMemoryLibSse2/X64/ScanMem16.asm | 53 --- .../BaseMemoryLibSse2/X64/ScanMem32.asm | 53 --- .../BaseMemoryLibSse2/X64/ScanMem64.asm | 53 --- .../BaseMemoryLibSse2/X64/ScanMem8.asm | 53 --- .../Library/BaseMemoryLibSse2/X64/SetMem.asm | 69 ---- .../BaseMemoryLibSse2/X64/SetMem16.asm | 67 ---- .../BaseMemoryLibSse2/X64/SetMem32.asm | 66 ---- .../BaseMemoryLibSse2/X64/SetMem64.asm | 59 ---- .../Library/BaseMemoryLibSse2/X64/ZeroMem.asm | 63 ---- .../BaseSynchronizationLib.inf | 12 +- .../Ia32/InterlockedCompareExchange16.asm | 46 --- .../Ia32/InterlockedCompareExchange32.asm | 45 --- .../Ia32/InterlockedCompareExchange64.asm | 47 --- .../Ia32/InterlockedDecrement.asm | 42 --- .../Ia32/InterlockedIncrement.asm | 42 --- .../X64/InterlockedCompareExchange16.asm | 42 --- .../X64/InterlockedCompareExchange32.asm | 41 --- .../X64/InterlockedCompareExchange64.asm | 41 --- .../X64/InterlockedDecrement.asm | 39 --- .../X64/InterlockedIncrement.asm | 39 --- 308 files changed, 8 insertions(+), 15375 deletions(-) delete mode 100644 MdePkg/Library/BaseCpuLib/Ia32/CpuFlushTlb.asm delete mode 100644 MdePkg/Library/BaseCpuLib/Ia32/CpuSleep.asm delete mode 100644 MdePkg/Library/BaseCpuLib/X64/CpuFlushTlb.asm delete mode 100644 MdePkg/Library/BaseCpuLib/X64/CpuSleep.asm delete mode 100644 MdePkg/Library/BaseIoLibIntrinsic/Ia32/IoFifo.asm delete mode 100644 MdePkg/Library/BaseIoLibIntrinsic/X64/IoFifo.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/ARShiftU64.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/CpuId.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/CpuIdEx.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/CpuPause.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/DisableCache.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/DisableInterrupts.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/DisablePaging32.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/DivU64x32.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/DivU64x64Remainder.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/EnableCache.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/EnableDisableInterrupts.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/EnableInterrupts.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/EnablePaging32.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/EnablePaging64.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/FlushCacheLine.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/FxRestore.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/FxSave.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/Invd.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/LRotU64.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/LShiftU64.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/LongJump.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/ModU64x32.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/Monitor.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/MultU64x32.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/MultU64x64.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/Mwait.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/RRotU64.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/RShiftU64.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/RdRand.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/ReadCr0.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/ReadCr2.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/ReadCr3.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/ReadCr4.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/ReadCs.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/ReadDr0.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/ReadDr1.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/ReadDr2.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/ReadDr3.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/ReadDr4.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/ReadDr5.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/ReadDr6.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/ReadDr7.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/ReadDs.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/ReadEflags.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/ReadEs.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/ReadFs.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/ReadGdtr.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/ReadGs.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/ReadIdtr.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/ReadLdtr.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/ReadMm0.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/ReadMm1.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/ReadMm2.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/ReadMm3.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/ReadMm4.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/ReadMm5.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/ReadMm6.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/ReadMm7.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/ReadMsr64.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/ReadPmc.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/ReadSs.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/ReadTr.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/ReadTsc.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/SetJump.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/SwapBytes64.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/Thunk16.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/Wbinvd.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/WriteCr0.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/WriteCr2.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/WriteCr3.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/WriteCr4.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/WriteDr0.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/WriteDr1.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/WriteDr2.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/WriteDr3.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/WriteDr4.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/WriteDr5.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/WriteDr6.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/WriteDr7.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/WriteGdtr.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/WriteIdtr.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/WriteLdtr.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/WriteMm0.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/WriteMm1.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/WriteMm2.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/WriteMm3.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/WriteMm4.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/WriteMm5.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/WriteMm6.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/WriteMm7.asm delete mode 100644 MdePkg/Library/BaseLib/Ia32/WriteMsr64.asm delete mode 100644 MdePkg/Library/BaseLib/X64/CpuBreakpoint.asm delete mode 100644 MdePkg/Library/BaseLib/X64/CpuId.asm delete mode 100644 MdePkg/Library/BaseLib/X64/CpuIdEx.asm delete mode 100644 MdePkg/Library/BaseLib/X64/CpuPause.asm delete mode 100644 MdePkg/Library/BaseLib/X64/DisableCache.asm delete mode 100644 MdePkg/Library/BaseLib/X64/DisableInterrupts.asm delete mode 100644 MdePkg/Library/BaseLib/X64/DisablePaging64.asm delete mode 100644 MdePkg/Library/BaseLib/X64/EnableCache.asm delete mode 100644 MdePkg/Library/BaseLib/X64/EnableDisableInterrupts.asm delete mode 100644 MdePkg/Library/BaseLib/X64/EnableInterrupts.asm delete mode 100644 MdePkg/Library/BaseLib/X64/FlushCacheLine.asm delete mode 100644 MdePkg/Library/BaseLib/X64/FxRestore.asm delete mode 100644 MdePkg/Library/BaseLib/X64/FxSave.asm delete mode 100644 MdePkg/Library/BaseLib/X64/Invd.asm delete mode 100644 MdePkg/Library/BaseLib/X64/LongJump.asm delete mode 100644 MdePkg/Library/BaseLib/X64/Monitor.asm delete mode 100644 MdePkg/Library/BaseLib/X64/Mwait.asm delete mode 100644 MdePkg/Library/BaseLib/X64/RdRand.asm delete mode 100644 MdePkg/Library/BaseLib/X64/ReadCr0.asm delete mode 100644 MdePkg/Library/BaseLib/X64/ReadCr2.asm delete mode 100644 MdePkg/Library/BaseLib/X64/ReadCr3.asm delete mode 100644 MdePkg/Library/BaseLib/X64/ReadCr4.asm delete mode 100644 MdePkg/Library/BaseLib/X64/ReadCs.asm delete mode 100644 MdePkg/Library/BaseLib/X64/ReadDr0.asm delete mode 100644 MdePkg/Library/BaseLib/X64/ReadDr1.asm delete mode 100644 MdePkg/Library/BaseLib/X64/ReadDr2.asm delete mode 100644 MdePkg/Library/BaseLib/X64/ReadDr3.asm delete mode 100644 MdePkg/Library/BaseLib/X64/ReadDr4.asm delete mode 100644 MdePkg/Library/BaseLib/X64/ReadDr5.asm delete mode 100644 MdePkg/Library/BaseLib/X64/ReadDr6.asm delete mode 100644 MdePkg/Library/BaseLib/X64/ReadDr7.asm delete mode 100644 MdePkg/Library/BaseLib/X64/ReadDs.asm delete mode 100644 MdePkg/Library/BaseLib/X64/ReadEflags.asm delete mode 100644 MdePkg/Library/BaseLib/X64/ReadEs.asm delete mode 100644 MdePkg/Library/BaseLib/X64/ReadFs.asm delete mode 100644 MdePkg/Library/BaseLib/X64/ReadGdtr.asm delete mode 100644 MdePkg/Library/BaseLib/X64/ReadGs.asm delete mode 100644 MdePkg/Library/BaseLib/X64/ReadIdtr.asm delete mode 100644 MdePkg/Library/BaseLib/X64/ReadLdtr.asm delete mode 100644 MdePkg/Library/BaseLib/X64/ReadMm0.asm delete mode 100644 MdePkg/Library/BaseLib/X64/ReadMm1.asm delete mode 100644 MdePkg/Library/BaseLib/X64/ReadMm2.asm delete mode 100644 MdePkg/Library/BaseLib/X64/ReadMm3.asm delete mode 100644 MdePkg/Library/BaseLib/X64/ReadMm4.asm delete mode 100644 MdePkg/Library/BaseLib/X64/ReadMm5.asm delete mode 100644 MdePkg/Library/BaseLib/X64/ReadMm6.asm delete mode 100644 MdePkg/Library/BaseLib/X64/ReadMm7.asm delete mode 100644 MdePkg/Library/BaseLib/X64/ReadMsr64.asm delete mode 100644 MdePkg/Library/BaseLib/X64/ReadPmc.asm delete mode 100644 MdePkg/Library/BaseLib/X64/ReadSs.asm delete mode 100644 MdePkg/Library/BaseLib/X64/ReadTr.asm delete mode 100644 MdePkg/Library/BaseLib/X64/ReadTsc.asm delete mode 100644 MdePkg/Library/BaseLib/X64/SetJump.asm delete mode 100644 MdePkg/Library/BaseLib/X64/SwitchStack.asm delete mode 100644 MdePkg/Library/BaseLib/X64/Thunk16.asm delete mode 100644 MdePkg/Library/BaseLib/X64/Wbinvd.asm delete mode 100644 MdePkg/Library/BaseLib/X64/WriteCr0.asm delete mode 100644 MdePkg/Library/BaseLib/X64/WriteCr2.asm delete mode 100644 MdePkg/Library/BaseLib/X64/WriteCr3.asm delete mode 100644 MdePkg/Library/BaseLib/X64/WriteCr4.asm delete mode 100644 MdePkg/Library/BaseLib/X64/WriteDr0.asm delete mode 100644 MdePkg/Library/BaseLib/X64/WriteDr1.asm delete mode 100644 MdePkg/Library/BaseLib/X64/WriteDr2.asm delete mode 100644 MdePkg/Library/BaseLib/X64/WriteDr3.asm delete mode 100644 MdePkg/Library/BaseLib/X64/WriteDr4.asm delete mode 100644 MdePkg/Library/BaseLib/X64/WriteDr5.asm delete mode 100644 MdePkg/Library/BaseLib/X64/WriteDr6.asm delete mode 100644 MdePkg/Library/BaseLib/X64/WriteDr7.asm delete mode 100644 MdePkg/Library/BaseLib/X64/WriteGdtr.asm delete mode 100644 MdePkg/Library/BaseLib/X64/WriteIdtr.asm delete mode 100644 MdePkg/Library/BaseLib/X64/WriteLdtr.asm delete mode 100644 MdePkg/Library/BaseLib/X64/WriteMm0.asm delete mode 100644 MdePkg/Library/BaseLib/X64/WriteMm1.asm delete mode 100644 MdePkg/Library/BaseLib/X64/WriteMm2.asm delete mode 100644 MdePkg/Library/BaseLib/X64/WriteMm3.asm delete mode 100644 MdePkg/Library/BaseLib/X64/WriteMm4.asm delete mode 100644 MdePkg/Library/BaseLib/X64/WriteMm5.asm delete mode 100644 MdePkg/Library/BaseLib/X64/WriteMm6.asm delete mode 100644 MdePkg/Library/BaseLib/X64/WriteMm7.asm delete mode 100644 MdePkg/Library/BaseLib/X64/WriteMsr64.asm delete mode 100644 MdePkg/Library/BaseMemoryLibMmx/Ia32/CompareMem.asm delete mode 100644 MdePkg/Library/BaseMemoryLibMmx/Ia32/CopyMem.asm delete mode 100644 MdePkg/Library/BaseMemoryLibMmx/Ia32/ScanMem16.asm delete mode 100644 MdePkg/Library/BaseMemoryLibMmx/Ia32/ScanMem32.asm delete mode 100644 MdePkg/Library/BaseMemoryLibMmx/Ia32/ScanMem64.asm delete mode 100644 MdePkg/Library/BaseMemoryLibMmx/Ia32/ScanMem8.asm delete mode 100644 MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem.asm delete mode 100644 MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem16.asm delete mode 100644 MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem32.asm delete mode 100644 MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem64.asm delete mode 100644 MdePkg/Library/BaseMemoryLibMmx/Ia32/ZeroMem.asm delete mode 100644 MdePkg/Library/BaseMemoryLibMmx/X64/CompareMem.asm delete mode 100644 MdePkg/Library/BaseMemoryLibMmx/X64/CopyMem.asm delete mode 100644 MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem16.asm delete mode 100644 MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem32.asm delete mode 100644 MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem64.asm delete mode 100644 MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem8.asm delete mode 100644 MdePkg/Library/BaseMemoryLibMmx/X64/SetMem.asm delete mode 100644 MdePkg/Library/BaseMemoryLibMmx/X64/SetMem16.asm delete mode 100644 MdePkg/Library/BaseMemoryLibMmx/X64/SetMem32.asm delete mode 100644 MdePkg/Library/BaseMemoryLibMmx/X64/SetMem64.asm delete mode 100644 MdePkg/Library/BaseMemoryLibMmx/X64/ZeroMem.asm delete mode 100644 MdePkg/Library/BaseMemoryLibOptDxe/Ia32/CompareMem.asm delete mode 100644 MdePkg/Library/BaseMemoryLibOptDxe/Ia32/CopyMem.asm delete mode 100644 MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ScanMem16.asm delete mode 100644 MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ScanMem32.asm delete mode 100644 MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ScanMem64.asm delete mode 100644 MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ScanMem8.asm delete mode 100644 MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem.asm delete mode 100644 MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem16.asm delete mode 100644 MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem32.asm delete mode 100644 MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem64.asm delete mode 100644 MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ZeroMem.asm delete mode 100644 MdePkg/Library/BaseMemoryLibOptDxe/X64/CompareMem.asm delete mode 100644 MdePkg/Library/BaseMemoryLibOptDxe/X64/CopyMem.asm delete mode 100644 MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem16.asm delete mode 100644 MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem32.asm delete mode 100644 MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem64.asm delete mode 100644 MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem8.asm delete mode 100644 MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem.asm delete mode 100644 MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem16.asm delete mode 100644 MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem32.asm delete mode 100644 MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem64.asm delete mode 100644 MdePkg/Library/BaseMemoryLibOptDxe/X64/ZeroMem.asm delete mode 100644 MdePkg/Library/BaseMemoryLibOptPei/Ia32/CompareMem.asm delete mode 100644 MdePkg/Library/BaseMemoryLibOptPei/Ia32/CopyMem.asm delete mode 100644 MdePkg/Library/BaseMemoryLibOptPei/Ia32/ScanMem16.asm delete mode 100644 MdePkg/Library/BaseMemoryLibOptPei/Ia32/ScanMem32.asm delete mode 100644 MdePkg/Library/BaseMemoryLibOptPei/Ia32/ScanMem64.asm delete mode 100644 MdePkg/Library/BaseMemoryLibOptPei/Ia32/ScanMem8.asm delete mode 100644 MdePkg/Library/BaseMemoryLibOptPei/Ia32/SetMem.asm delete mode 100644 MdePkg/Library/BaseMemoryLibOptPei/Ia32/SetMem16.asm delete mode 100644 MdePkg/Library/BaseMemoryLibOptPei/Ia32/SetMem32.asm delete mode 100644 MdePkg/Library/BaseMemoryLibOptPei/Ia32/SetMem64.asm delete mode 100644 MdePkg/Library/BaseMemoryLibOptPei/Ia32/ZeroMem.asm delete mode 100644 MdePkg/Library/BaseMemoryLibOptPei/X64/CompareMem.asm delete mode 100644 MdePkg/Library/BaseMemoryLibOptPei/X64/CopyMem.asm delete mode 100644 MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem16.asm delete mode 100644 MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem32.asm delete mode 100644 MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem64.asm delete mode 100644 MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem8.asm delete mode 100644 MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem.asm delete mode 100644 MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem16.asm delete mode 100644 MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem32.asm delete mode 100644 MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem64.asm delete mode 100644 MdePkg/Library/BaseMemoryLibOptPei/X64/ZeroMem.asm delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/Ia32/CompareMem.asm delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/Ia32/CopyMem.asm delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem16.asm delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem32.asm delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem64.asm delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem8.asm delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem.asm delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem16.asm delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem32.asm delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem64.asm delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/Ia32/ZeroMem.asm delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/X64/CompareMem.asm delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/X64/CopyMem.asm delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem16.asm delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem32.asm delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem64.asm delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem8.asm delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem.asm delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem16.asm delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem32.asm delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem64.asm delete mode 100644 MdePkg/Library/BaseMemoryLibRepStr/X64/ZeroMem.asm delete mode 100644 MdePkg/Library/BaseMemoryLibSse2/Ia32/CompareMem.asm delete mode 100644 MdePkg/Library/BaseMemoryLibSse2/Ia32/CopyMem.asm delete mode 100644 MdePkg/Library/BaseMemoryLibSse2/Ia32/ScanMem16.asm delete mode 100644 MdePkg/Library/BaseMemoryLibSse2/Ia32/ScanMem32.asm delete mode 100644 MdePkg/Library/BaseMemoryLibSse2/Ia32/ScanMem64.asm delete mode 100644 MdePkg/Library/BaseMemoryLibSse2/Ia32/ScanMem8.asm delete mode 100644 MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem.asm delete mode 100644 MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem16.asm delete mode 100644 MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem32.asm delete mode 100644 MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem64.asm delete mode 100644 MdePkg/Library/BaseMemoryLibSse2/Ia32/ZeroMem.asm delete mode 100644 MdePkg/Library/BaseMemoryLibSse2/X64/CompareMem.asm delete mode 100644 MdePkg/Library/BaseMemoryLibSse2/X64/CopyMem.asm delete mode 100644 MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem16.asm delete mode 100644 MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem32.asm delete mode 100644 MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem64.asm delete mode 100644 MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem8.asm delete mode 100644 MdePkg/Library/BaseMemoryLibSse2/X64/SetMem.asm delete mode 100644 MdePkg/Library/BaseMemoryLibSse2/X64/SetMem16.asm delete mode 100644 MdePkg/Library/BaseMemoryLibSse2/X64/SetMem32.asm delete mode 100644 MdePkg/Library/BaseMemoryLibSse2/X64/SetMem64.asm delete mode 100644 MdePkg/Library/BaseMemoryLibSse2/X64/ZeroMem.asm delete mode 100644 MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange16.asm delete mode 100644 MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange32.asm delete mode 100644 MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange64.asm delete mode 100644 MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedDecrement.asm delete mode 100644 MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedIncrement.asm delete mode 100644 MdePkg/Library/BaseSynchronizationLib/X64/InterlockedCompareExchange16.asm delete mode 100644 MdePkg/Library/BaseSynchronizationLib/X64/InterlockedCompareExchange32.asm delete mode 100644 MdePkg/Library/BaseSynchronizationLib/X64/InterlockedCompareExchange64.asm delete mode 100644 MdePkg/Library/BaseSynchronizationLib/X64/InterlockedDecrement.asm delete mode 100644 MdePkg/Library/BaseSynchronizationLib/X64/InterlockedIncrement.asm diff --git a/MdePkg/Library/BaseCpuLib/BaseCpuLib.inf b/MdePkg/Library/BaseCpuLib/BaseCpuLib.inf index dad08dfe7f..84564e00d7 100644 --- a/MdePkg/Library/BaseCpuLib/BaseCpuLib.inf +++ b/MdePkg/Library/BaseCpuLib/BaseCpuLib.inf @@ -37,18 +37,14 @@ Ia32/CpuFlushTlb.c | MSFT Ia32/CpuSleep.nasm| INTEL - Ia32/CpuSleep.asm | INTEL Ia32/CpuFlushTlb.nasm| INTEL - Ia32/CpuFlushTlb.asm | INTEL Ia32/CpuSleepGcc.c | GCC Ia32/CpuFlushTlbGcc.c | GCC [Sources.X64] X64/CpuFlushTlb.nasm - X64/CpuFlushTlb.asm X64/CpuSleep.nasm - X64/CpuSleep.asm X64/CpuSleep.nasm| GCC X64/CpuSleep.S | GCC diff --git a/MdePkg/Library/BaseCpuLib/Ia32/CpuFlushTlb.asm b/MdePkg/Library/BaseCpuLib/Ia32/CpuFlushTlb.asm deleted file mode 100644 index 271690d5d4..0000000000 --- a/MdePkg/Library/BaseCpuLib/Ia32/CpuFlushTlb.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ ; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; CpuFlushTlb.Asm -; -; Abstract: -; -; CpuFlushTlb function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; CpuFlushTlb ( -; VOID -; ); -;------------------------------------------------------------------------------ -CpuFlushTlb PROC - mov eax, cr3 - mov cr3, eax ; moving to CR3 flushes TLB - ret -CpuFlushTlb ENDP - - END diff --git a/MdePkg/Library/BaseCpuLib/Ia32/CpuSleep.asm b/MdePkg/Library/BaseCpuLib/Ia32/CpuSleep.asm deleted file mode 100644 index 5bfd7b2813..0000000000 --- a/MdePkg/Library/BaseCpuLib/Ia32/CpuSleep.asm +++ /dev/null @@ -1,39 +0,0 @@ -;------------------------------------------------------------------------------ ; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; CpuSleep.Asm -; -; Abstract: -; -; CpuSleep function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; CpuSleep ( -; VOID -; ); -;------------------------------------------------------------------------------ -CpuSleep PROC - hlt - ret -CpuSleep ENDP - - END diff --git a/MdePkg/Library/BaseCpuLib/X64/CpuFlushTlb.asm b/MdePkg/Library/BaseCpuLib/X64/CpuFlushTlb.asm deleted file mode 100644 index 6a752877ee..0000000000 --- a/MdePkg/Library/BaseCpuLib/X64/CpuFlushTlb.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ ; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; CpuFlushTlb.Asm -; -; Abstract: -; -; CpuFlushTlb function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; CpuFlushTlb ( -; VOID -; ); -;------------------------------------------------------------------------------ -CpuFlushTlb PROC - mov rax, cr3 - mov cr3, rax - ret -CpuFlushTlb ENDP - - END diff --git a/MdePkg/Library/BaseCpuLib/X64/CpuSleep.asm b/MdePkg/Library/BaseCpuLib/X64/CpuSleep.asm deleted file mode 100644 index 196438f7b2..0000000000 --- a/MdePkg/Library/BaseCpuLib/X64/CpuSleep.asm +++ /dev/null @@ -1,37 +0,0 @@ -;------------------------------------------------------------------------------ ; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; CpuSleep.Asm -; -; Abstract: -; -; CpuSleep function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; CpuSleep ( -; VOID -; ); -;------------------------------------------------------------------------------ -CpuSleep PROC - hlt - ret -CpuSleep ENDP - - END diff --git a/MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf b/MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf index 8844b1ce4c..6c4d7ccfb7 100644 --- a/MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf +++ b/MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf @@ -6,7 +6,7 @@ # MMIO requests are forwarded directly to memory. For EBC, I/O port requests # ASSERT(). # -# Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.
+# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
# Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
# Copyright (c) 2017, AMD Incorporated. All rights reserved.
# @@ -44,7 +44,6 @@ IoLibIcc.c | INTEL IoLib.c Ia32/IoFifo.nasm - Ia32/IoFifo.asm [Sources.X64] IoLibGcc.c | GCC @@ -52,7 +51,6 @@ IoLibIcc.c | INTEL IoLib.c X64/IoFifo.nasm - X64/IoFifo.asm [Sources.EBC] IoLibEbc.c diff --git a/MdePkg/Library/BaseIoLibIntrinsic/Ia32/IoFifo.asm b/MdePkg/Library/BaseIoLibIntrinsic/Ia32/IoFifo.asm deleted file mode 100644 index da767d10bb..0000000000 --- a/MdePkg/Library/BaseIoLibIntrinsic/Ia32/IoFifo.asm +++ /dev/null @@ -1,141 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.
-; Copyright (c) 2017, AMD Incorporated. All rights reserved.
-; -; This program and the accompanying materials are licensed and made available -; under the terms and conditions of the BSD License which accompanies this -; distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -;------------------------------------------------------------------------------ - - .586P - .model flat,C - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; IoReadFifo8 ( -; IN UINTN Port, -; IN UINTN Size, -; OUT VOID *Buffer -; ); -;------------------------------------------------------------------------------ -IoReadFifo8 PROC - push edi - cld - mov dx, [esp + 8] - mov ecx, [esp + 12] - mov edi, [esp + 16] -rep insb - pop edi - ret -IoReadFifo8 ENDP - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; IoReadFifo16 ( -; IN UINTN Port, -; IN UINTN Size, -; OUT VOID *Buffer -; ); -;------------------------------------------------------------------------------ -IoReadFifo16 PROC - push edi - cld - mov dx, [esp + 8] - mov ecx, [esp + 12] - mov edi, [esp + 16] -rep insw - pop edi - ret -IoReadFifo16 ENDP - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; IoReadFifo32 ( -; IN UINTN Port, -; IN UINTN Size, -; OUT VOID *Buffer -; ); -;------------------------------------------------------------------------------ -IoReadFifo32 PROC - push edi - cld - mov dx, [esp + 8] - mov ecx, [esp + 12] - mov edi, [esp + 16] -rep insd - pop edi - ret -IoReadFifo32 ENDP - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; IoWriteFifo8 ( -; IN UINTN Port, -; IN UINTN Size, -; IN VOID *Buffer -; ); -;------------------------------------------------------------------------------ -IoWriteFifo8 PROC - push esi - cld - mov dx, [esp + 8] - mov ecx, [esp + 12] - mov esi, [esp + 16] -rep outsb - pop esi - ret -IoWriteFifo8 ENDP - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; IoWriteFifo16 ( -; IN UINTN Port, -; IN UINTN Size, -; IN VOID *Buffer -; ); -;------------------------------------------------------------------------------ -IoWriteFifo16 PROC - push esi - cld - mov dx, [esp + 8] - mov ecx, [esp + 12] - mov esi, [esp + 16] -rep outsw - pop esi - ret -IoWriteFifo16 ENDP - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; IoWriteFifo32 ( -; IN UINTN Port, -; IN UINTN Size, -; IN VOID *Buffer -; ); -;------------------------------------------------------------------------------ -IoWriteFifo32 PROC - push esi - cld - mov dx, [esp + 8] - mov ecx, [esp + 12] - mov esi, [esp + 16] -rep outsd - pop esi - ret -IoWriteFifo32 ENDP - - END - diff --git a/MdePkg/Library/BaseIoLibIntrinsic/X64/IoFifo.asm b/MdePkg/Library/BaseIoLibIntrinsic/X64/IoFifo.asm deleted file mode 100644 index 87c61071ce..0000000000 --- a/MdePkg/Library/BaseIoLibIntrinsic/X64/IoFifo.asm +++ /dev/null @@ -1,127 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.
-; Copyright (c) 2017, AMD Incorporated. All rights reserved.
-; -; This program and the accompanying materials are licensed and made available -; under the terms and conditions of the BSD License which accompanies this -; distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; IoReadFifo8 ( -; IN UINTN Port, // rcx -; IN UINTN Size, // rdx -; OUT VOID *Buffer // r8 -; ); -;------------------------------------------------------------------------------ -IoReadFifo8 PROC - cld - xchg rcx, rdx - xchg rdi, r8 ; rdi: buffer address; r8: save rdi -rep insb - mov rdi, r8 ; restore rdi - ret -IoReadFifo8 ENDP - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; IoReadFifo16 ( -; IN UINTN Port, // rcx -; IN UINTN Size, // rdx -; OUT VOID *Buffer // r8 -; ); -;------------------------------------------------------------------------------ -IoReadFifo16 PROC - cld - xchg rcx, rdx - xchg rdi, r8 ; rdi: buffer address; r8: save rdi -rep insw - mov rdi, r8 ; restore rdi - ret -IoReadFifo16 ENDP - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; IoReadFifo32 ( -; IN UINTN Port, // rcx -; IN UINTN Size, // rdx -; OUT VOID *Buffer // r8 -; ); -;------------------------------------------------------------------------------ -IoReadFifo32 PROC - cld - xchg rcx, rdx - xchg rdi, r8 ; rdi: buffer address; r8: save rdi -rep insd - mov rdi, r8 ; restore rdi - ret -IoReadFifo32 ENDP - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; IoWriteFifo8 ( -; IN UINTN Port, // rcx -; IN UINTN Size, // rdx -; IN VOID *Buffer // r8 -; ); -;------------------------------------------------------------------------------ -IoWriteFifo8 PROC - cld - xchg rcx, rdx - xchg rsi, r8 ; rsi: buffer address; r8: save rsi -rep outsb - mov rsi, r8 ; restore rsi - ret -IoWriteFifo8 ENDP - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; IoWriteFifo16 ( -; IN UINTN Port, // rcx -; IN UINTN Size, // rdx -; IN VOID *Buffer // r8 -; ); -;------------------------------------------------------------------------------ -IoWriteFifo16 PROC - cld - xchg rcx, rdx - xchg rsi, r8 ; rsi: buffer address; r8: save rsi -rep outsw - mov rsi, r8 ; restore rsi - ret -IoWriteFifo16 ENDP - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; IoWriteFifo32 ( -; IN UINTN Port, // rcx -; IN UINTN Size, // rdx -; IN VOID *Buffer // r8 -; ); -;------------------------------------------------------------------------------ -IoWriteFifo32 PROC - cld - xchg rcx, rdx - xchg rsi, r8 ; rsi: buffer address; r8: save rsi -rep outsd - mov rsi, r8 ; restore rsi - ret -IoWriteFifo32 ENDP - - END - diff --git a/MdePkg/Library/BaseLib/BaseLib.inf b/MdePkg/Library/BaseLib/BaseLib.inf index 5fbbd02a94..12e883cbb8 100644 --- a/MdePkg/Library/BaseLib/BaseLib.inf +++ b/MdePkg/Library/BaseLib/BaseLib.inf @@ -1,7 +1,7 @@ ## @file # Base Library implementation. # -# Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.
+# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
# Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
# Portions copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.
# @@ -148,7 +148,6 @@ Ia32/EnableInterrupts.c | MSFT Ia32/EnableDisableInterrupts.c | MSFT Ia32/DivU64x64Remainder.nasm| MSFT - Ia32/DivU64x64Remainder.asm | MSFT Ia32/DivU64x32Remainder.c | MSFT Ia32/DivU64x32.c | MSFT Ia32/DisablePaging32.c | MSFT @@ -159,200 +158,104 @@ Ia32/CpuBreakpoint.c | MSFT Ia32/ARShiftU64.c | MSFT Ia32/Thunk16.nasm | MSFT - Ia32/Thunk16.asm | MSFT Ia32/EnablePaging64.nasm| MSFT - Ia32/EnablePaging64.asm | MSFT Ia32/EnableCache.c | MSFT Ia32/DisableCache.c | MSFT Ia32/RdRand.nasm| MSFT - Ia32/RdRand.asm | MSFT Ia32/Wbinvd.nasm| INTEL - Ia32/Wbinvd.asm | INTEL Ia32/WriteMm7.nasm| INTEL - Ia32/WriteMm7.asm | INTEL Ia32/WriteMm6.nasm| INTEL - Ia32/WriteMm6.asm | INTEL Ia32/WriteMm5.nasm| INTEL - Ia32/WriteMm5.asm | INTEL Ia32/WriteMm4.nasm| INTEL - Ia32/WriteMm4.asm | INTEL Ia32/WriteMm3.nasm| INTEL - Ia32/WriteMm3.asm | INTEL Ia32/WriteMm2.nasm| INTEL - Ia32/WriteMm2.asm | INTEL Ia32/WriteMm1.nasm| INTEL - Ia32/WriteMm1.asm | INTEL Ia32/WriteMm0.nasm| INTEL - Ia32/WriteMm0.asm | INTEL Ia32/WriteLdtr.nasm| INTEL - Ia32/WriteLdtr.asm | INTEL Ia32/WriteIdtr.nasm| INTEL - Ia32/WriteIdtr.asm | INTEL Ia32/WriteGdtr.nasm| INTEL - Ia32/WriteGdtr.asm | INTEL Ia32/WriteDr7.nasm| INTEL - Ia32/WriteDr7.asm | INTEL Ia32/WriteDr6.nasm| INTEL - Ia32/WriteDr6.asm | INTEL Ia32/WriteDr5.nasm| INTEL - Ia32/WriteDr5.asm | INTEL Ia32/WriteDr4.nasm| INTEL - Ia32/WriteDr4.asm | INTEL Ia32/WriteDr3.nasm| INTEL - Ia32/WriteDr3.asm | INTEL Ia32/WriteDr2.nasm| INTEL - Ia32/WriteDr2.asm | INTEL Ia32/WriteDr1.nasm| INTEL - Ia32/WriteDr1.asm | INTEL Ia32/WriteDr0.nasm| INTEL - Ia32/WriteDr0.asm | INTEL Ia32/WriteCr4.nasm| INTEL - Ia32/WriteCr4.asm | INTEL Ia32/WriteCr3.nasm| INTEL - Ia32/WriteCr3.asm | INTEL Ia32/WriteCr2.nasm| INTEL - Ia32/WriteCr2.asm | INTEL Ia32/WriteCr0.nasm| INTEL - Ia32/WriteCr0.asm | INTEL Ia32/WriteMsr64.nasm| INTEL - Ia32/WriteMsr64.asm | INTEL Ia32/SwapBytes64.nasm| INTEL - Ia32/SwapBytes64.asm | INTEL Ia32/SetJump.nasm| INTEL - Ia32/SetJump.asm | INTEL Ia32/RRotU64.nasm| INTEL - Ia32/RRotU64.asm | INTEL Ia32/RShiftU64.nasm| INTEL - Ia32/RShiftU64.asm | INTEL Ia32/ReadPmc.nasm| INTEL - Ia32/ReadPmc.asm | INTEL Ia32/ReadTsc.nasm| INTEL - Ia32/ReadTsc.asm | INTEL Ia32/ReadLdtr.nasm| INTEL - Ia32/ReadLdtr.asm | INTEL Ia32/ReadIdtr.nasm| INTEL - Ia32/ReadIdtr.asm | INTEL Ia32/ReadGdtr.nasm| INTEL - Ia32/ReadGdtr.asm | INTEL Ia32/ReadTr.nasm| INTEL - Ia32/ReadTr.asm | INTEL Ia32/ReadSs.nasm| INTEL - Ia32/ReadSs.asm | INTEL Ia32/ReadGs.nasm| INTEL - Ia32/ReadGs.asm | INTEL Ia32/ReadFs.nasm| INTEL - Ia32/ReadFs.asm | INTEL Ia32/ReadEs.nasm| INTEL - Ia32/ReadEs.asm | INTEL Ia32/ReadDs.nasm| INTEL - Ia32/ReadDs.asm | INTEL Ia32/ReadCs.nasm| INTEL - Ia32/ReadCs.asm | INTEL Ia32/ReadMsr64.nasm| INTEL - Ia32/ReadMsr64.asm | INTEL Ia32/ReadMm7.nasm| INTEL - Ia32/ReadMm7.asm | INTEL Ia32/ReadMm6.nasm| INTEL - Ia32/ReadMm6.asm | INTEL Ia32/ReadMm5.nasm| INTEL - Ia32/ReadMm5.asm | INTEL Ia32/ReadMm4.nasm| INTEL - Ia32/ReadMm4.asm | INTEL Ia32/ReadMm3.nasm| INTEL - Ia32/ReadMm3.asm | INTEL Ia32/ReadMm2.nasm| INTEL - Ia32/ReadMm2.asm | INTEL Ia32/ReadMm1.nasm| INTEL - Ia32/ReadMm1.asm | INTEL Ia32/ReadMm0.nasm| INTEL - Ia32/ReadMm0.asm | INTEL Ia32/ReadEflags.nasm| INTEL - Ia32/ReadEflags.asm | INTEL Ia32/ReadDr7.nasm| INTEL - Ia32/ReadDr7.asm | INTEL Ia32/ReadDr6.nasm| INTEL - Ia32/ReadDr6.asm | INTEL Ia32/ReadDr5.nasm| INTEL - Ia32/ReadDr5.asm | INTEL Ia32/ReadDr4.nasm| INTEL - Ia32/ReadDr4.asm | INTEL Ia32/ReadDr3.nasm| INTEL - Ia32/ReadDr3.asm | INTEL Ia32/ReadDr2.nasm| INTEL - Ia32/ReadDr2.asm | INTEL Ia32/ReadDr1.nasm| INTEL - Ia32/ReadDr1.asm | INTEL Ia32/ReadDr0.nasm| INTEL - Ia32/ReadDr0.asm | INTEL Ia32/ReadCr4.nasm| INTEL - Ia32/ReadCr4.asm | INTEL Ia32/ReadCr3.nasm| INTEL - Ia32/ReadCr3.asm | INTEL Ia32/ReadCr2.nasm| INTEL - Ia32/ReadCr2.asm | INTEL Ia32/ReadCr0.nasm| INTEL - Ia32/ReadCr0.asm | INTEL Ia32/Mwait.nasm| INTEL - Ia32/Mwait.asm | INTEL Ia32/Monitor.nasm| INTEL - Ia32/Monitor.asm | INTEL Ia32/ModU64x32.nasm| INTEL - Ia32/ModU64x32.asm | INTEL Ia32/MultU64x64.nasm| INTEL - Ia32/MultU64x64.asm | INTEL Ia32/MultU64x32.nasm| INTEL - Ia32/MultU64x32.asm | INTEL Ia32/LShiftU64.nasm| INTEL - Ia32/LShiftU64.asm | INTEL Ia32/LRotU64.nasm| INTEL - Ia32/LRotU64.asm | INTEL Ia32/LongJump.nasm| INTEL - Ia32/LongJump.asm | INTEL Ia32/Invd.nasm| INTEL - Ia32/Invd.asm | INTEL Ia32/FxRestore.nasm| INTEL - Ia32/FxRestore.asm | INTEL Ia32/FxSave.nasm| INTEL - Ia32/FxSave.asm | INTEL Ia32/FlushCacheLine.nasm| INTEL - Ia32/FlushCacheLine.asm | INTEL Ia32/EnablePaging32.nasm| INTEL - Ia32/EnablePaging32.asm | INTEL Ia32/EnableInterrupts.nasm| INTEL - Ia32/EnableInterrupts.asm | INTEL Ia32/EnableDisableInterrupts.nasm| INTEL - Ia32/EnableDisableInterrupts.asm | INTEL Ia32/DivU64x64Remainder.nasm| INTEL - Ia32/DivU64x64Remainder.asm | INTEL Ia32/DivU64x32Remainder.nasm| INTEL - Ia32/DivU64x32Remainder.asm | INTEL Ia32/DivU64x32.nasm| INTEL - Ia32/DivU64x32.asm | INTEL Ia32/DisablePaging32.nasm| INTEL - Ia32/DisablePaging32.asm | INTEL Ia32/DisableInterrupts.nasm| INTEL - Ia32/DisableInterrupts.asm | INTEL Ia32/CpuPause.nasm| INTEL - Ia32/CpuPause.asm | INTEL Ia32/CpuIdEx.nasm| INTEL - Ia32/CpuIdEx.asm | INTEL Ia32/CpuId.nasm| INTEL - Ia32/CpuId.asm | INTEL Ia32/CpuBreakpoint.nasm| INTEL - Ia32/CpuBreakpoint.asm | INTEL Ia32/ARShiftU64.nasm| INTEL - Ia32/ARShiftU64.asm | INTEL Ia32/Thunk16.nasm | INTEL - Ia32/Thunk16.asm | INTEL Ia32/EnablePaging64.nasm| INTEL - Ia32/EnablePaging64.asm | INTEL Ia32/EnableCache.nasm| INTEL - Ia32/EnableCache.asm | INTEL Ia32/DisableCache.nasm| INTEL - Ia32/DisableCache.asm | INTEL Ia32/RdRand.nasm| INTEL - Ia32/RdRand.asm | INTEL Ia32/GccInline.c | GCC Ia32/Thunk16.nasm | GCC @@ -435,309 +338,160 @@ [Sources.X64] X64/Thunk16.nasm - X64/Thunk16.asm X64/CpuIdEx.nasm - X64/CpuIdEx.asm X64/CpuId.nasm - X64/CpuId.asm X64/LongJump.nasm - X64/LongJump.asm X64/SetJump.nasm - X64/SetJump.asm X64/SwitchStack.nasm - X64/SwitchStack.asm X64/EnableCache.nasm - X64/EnableCache.asm X64/DisableCache.nasm - X64/DisableCache.asm X64/WriteTr.nasm X64/CpuBreakpoint.c | MSFT X64/WriteMsr64.c | MSFT X64/ReadMsr64.c | MSFT X64/RdRand.nasm| MSFT - X64/RdRand.asm | MSFT X64/CpuPause.nasm| MSFT - X64/CpuPause.asm | MSFT X64/EnableDisableInterrupts.nasm| MSFT - X64/EnableDisableInterrupts.asm | MSFT X64/DisableInterrupts.nasm| MSFT - X64/DisableInterrupts.asm | MSFT X64/EnableInterrupts.nasm| MSFT - X64/EnableInterrupts.asm | MSFT X64/FlushCacheLine.nasm| MSFT - X64/FlushCacheLine.asm | MSFT X64/Invd.nasm| MSFT - X64/Invd.asm | MSFT X64/Wbinvd.nasm| MSFT - X64/Wbinvd.asm | MSFT X64/DisablePaging64.nasm| MSFT - X64/DisablePaging64.asm | MSFT X64/Mwait.nasm| MSFT - X64/Mwait.asm | MSFT X64/Monitor.nasm| MSFT - X64/Monitor.asm | MSFT X64/ReadPmc.nasm| MSFT - X64/ReadPmc.asm | MSFT X64/ReadTsc.nasm| MSFT - X64/ReadTsc.asm | MSFT X64/WriteMm7.nasm| MSFT - X64/WriteMm7.asm | MSFT X64/WriteMm6.nasm| MSFT - X64/WriteMm6.asm | MSFT X64/WriteMm5.nasm| MSFT - X64/WriteMm5.asm | MSFT X64/WriteMm4.nasm| MSFT - X64/WriteMm4.asm | MSFT X64/WriteMm3.nasm| MSFT - X64/WriteMm3.asm | MSFT X64/WriteMm2.nasm| MSFT - X64/WriteMm2.asm | MSFT X64/WriteMm1.nasm| MSFT - X64/WriteMm1.asm | MSFT X64/WriteMm0.nasm| MSFT - X64/WriteMm0.asm | MSFT X64/ReadMm7.nasm| MSFT - X64/ReadMm7.asm | MSFT X64/ReadMm6.nasm| MSFT - X64/ReadMm6.asm | MSFT X64/ReadMm5.nasm| MSFT - X64/ReadMm5.asm | MSFT X64/ReadMm4.nasm| MSFT - X64/ReadMm4.asm | MSFT X64/ReadMm3.nasm| MSFT - X64/ReadMm3.asm | MSFT X64/ReadMm2.nasm| MSFT - X64/ReadMm2.asm | MSFT X64/ReadMm1.nasm| MSFT - X64/ReadMm1.asm | MSFT X64/ReadMm0.nasm| MSFT - X64/ReadMm0.asm | MSFT X64/FxRestore.nasm| MSFT - X64/FxRestore.asm | MSFT X64/FxSave.nasm| MSFT - X64/FxSave.asm | MSFT X64/WriteLdtr.nasm| MSFT - X64/WriteLdtr.asm | MSFT X64/ReadLdtr.nasm| MSFT - X64/ReadLdtr.asm | MSFT X64/WriteIdtr.nasm| MSFT - X64/WriteIdtr.asm | MSFT X64/ReadIdtr.nasm| MSFT - X64/ReadIdtr.asm | MSFT X64/WriteGdtr.nasm| MSFT - X64/WriteGdtr.asm | MSFT X64/ReadGdtr.nasm| MSFT - X64/ReadGdtr.asm | MSFT X64/ReadTr.nasm| MSFT - X64/ReadTr.asm | MSFT X64/ReadSs.nasm| MSFT - X64/ReadSs.asm | MSFT X64/ReadGs.nasm| MSFT - X64/ReadGs.asm | MSFT X64/ReadFs.nasm| MSFT - X64/ReadFs.asm | MSFT X64/ReadEs.nasm| MSFT - X64/ReadEs.asm | MSFT X64/ReadDs.nasm| MSFT - X64/ReadDs.asm | MSFT X64/ReadCs.nasm| MSFT - X64/ReadCs.asm | MSFT X64/WriteDr7.nasm| MSFT - X64/WriteDr7.asm | MSFT X64/WriteDr6.nasm| MSFT - X64/WriteDr6.asm | MSFT X64/WriteDr5.nasm| MSFT - X64/WriteDr5.asm | MSFT X64/WriteDr4.nasm| MSFT - X64/WriteDr4.asm | MSFT X64/WriteDr3.nasm| MSFT - X64/WriteDr3.asm | MSFT X64/WriteDr2.nasm| MSFT - X64/WriteDr2.asm | MSFT X64/WriteDr1.nasm| MSFT - X64/WriteDr1.asm | MSFT X64/WriteDr0.nasm| MSFT - X64/WriteDr0.asm | MSFT X64/ReadDr7.nasm| MSFT - X64/ReadDr7.asm | MSFT X64/ReadDr6.nasm| MSFT - X64/ReadDr6.asm | MSFT X64/ReadDr5.nasm| MSFT - X64/ReadDr5.asm | MSFT X64/ReadDr4.nasm| MSFT - X64/ReadDr4.asm | MSFT X64/ReadDr3.nasm| MSFT - X64/ReadDr3.asm | MSFT X64/ReadDr2.nasm| MSFT - X64/ReadDr2.asm | MSFT X64/ReadDr1.nasm| MSFT - X64/ReadDr1.asm | MSFT X64/ReadDr0.nasm| MSFT - X64/ReadDr0.asm | MSFT X64/WriteCr4.nasm| MSFT - X64/WriteCr4.asm | MSFT X64/WriteCr3.nasm| MSFT - X64/WriteCr3.asm | MSFT X64/WriteCr2.nasm| MSFT - X64/WriteCr2.asm | MSFT X64/WriteCr0.nasm| MSFT - X64/WriteCr0.asm | MSFT X64/ReadCr4.nasm| MSFT - X64/ReadCr4.asm | MSFT X64/ReadCr3.nasm| MSFT - X64/ReadCr3.asm | MSFT X64/ReadCr2.nasm| MSFT - X64/ReadCr2.asm | MSFT X64/ReadCr0.nasm| MSFT - X64/ReadCr0.asm | MSFT X64/ReadEflags.nasm| MSFT - X64/ReadEflags.asm | MSFT X64/CpuBreakpoint.nasm| INTEL - X64/CpuBreakpoint.asm | INTEL X64/WriteMsr64.nasm| INTEL - X64/WriteMsr64.asm | INTEL X64/ReadMsr64.nasm| INTEL - X64/ReadMsr64.asm | INTEL X64/RdRand.nasm| INTEL - X64/RdRand.asm | INTEL X64/CpuPause.nasm| INTEL - X64/CpuPause.asm | INTEL X64/EnableDisableInterrupts.nasm| INTEL - X64/EnableDisableInterrupts.asm | INTEL X64/DisableInterrupts.nasm| INTEL - X64/DisableInterrupts.asm | INTEL X64/EnableInterrupts.nasm| INTEL - X64/EnableInterrupts.asm | INTEL X64/FlushCacheLine.nasm| INTEL - X64/FlushCacheLine.asm | INTEL X64/Invd.nasm| INTEL - X64/Invd.asm | INTEL X64/Wbinvd.nasm| INTEL - X64/Wbinvd.asm | INTEL X64/DisablePaging64.nasm| INTEL - X64/DisablePaging64.asm | INTEL X64/Mwait.nasm| INTEL - X64/Mwait.asm | INTEL X64/Monitor.nasm| INTEL - X64/Monitor.asm | INTEL X64/ReadPmc.nasm| INTEL - X64/ReadPmc.asm | INTEL X64/ReadTsc.nasm| INTEL - X64/ReadTsc.asm | INTEL X64/WriteMm7.nasm| INTEL - X64/WriteMm7.asm | INTEL X64/WriteMm6.nasm| INTEL - X64/WriteMm6.asm | INTEL X64/WriteMm5.nasm| INTEL - X64/WriteMm5.asm | INTEL X64/WriteMm4.nasm| INTEL - X64/WriteMm4.asm | INTEL X64/WriteMm3.nasm| INTEL - X64/WriteMm3.asm | INTEL X64/WriteMm2.nasm| INTEL - X64/WriteMm2.asm | INTEL X64/WriteMm1.nasm| INTEL - X64/WriteMm1.asm | INTEL X64/WriteMm0.nasm| INTEL - X64/WriteMm0.asm | INTEL X64/ReadMm7.nasm| INTEL - X64/ReadMm7.asm | INTEL X64/ReadMm6.nasm| INTEL - X64/ReadMm6.asm | INTEL X64/ReadMm5.nasm| INTEL - X64/ReadMm5.asm | INTEL X64/ReadMm4.nasm| INTEL - X64/ReadMm4.asm | INTEL X64/ReadMm3.nasm| INTEL - X64/ReadMm3.asm | INTEL X64/ReadMm2.nasm| INTEL - X64/ReadMm2.asm | INTEL X64/ReadMm1.nasm| INTEL - X64/ReadMm1.asm | INTEL X64/ReadMm0.nasm| INTEL - X64/ReadMm0.asm | INTEL X64/FxRestore.nasm| INTEL - X64/FxRestore.asm | INTEL X64/FxSave.nasm| INTEL - X64/FxSave.asm | INTEL X64/WriteLdtr.nasm| INTEL - X64/WriteLdtr.asm | INTEL X64/ReadLdtr.nasm| INTEL - X64/ReadLdtr.asm | INTEL X64/WriteIdtr.nasm| INTEL - X64/WriteIdtr.asm | INTEL X64/ReadIdtr.nasm| INTEL - X64/ReadIdtr.asm | INTEL X64/WriteGdtr.nasm| INTEL - X64/WriteGdtr.asm | INTEL X64/ReadGdtr.nasm| INTEL - X64/ReadGdtr.asm | INTEL X64/ReadTr.nasm| INTEL - X64/ReadTr.asm | INTEL X64/ReadSs.nasm| INTEL - X64/ReadSs.asm | INTEL X64/ReadGs.nasm| INTEL - X64/ReadGs.asm | INTEL X64/ReadFs.nasm| INTEL - X64/ReadFs.asm | INTEL X64/ReadEs.nasm| INTEL - X64/ReadEs.asm | INTEL X64/ReadDs.nasm| INTEL - X64/ReadDs.asm | INTEL X64/ReadCs.nasm| INTEL - X64/ReadCs.asm | INTEL X64/WriteDr7.nasm| INTEL - X64/WriteDr7.asm | INTEL X64/WriteDr6.nasm| INTEL - X64/WriteDr6.asm | INTEL X64/WriteDr5.nasm| INTEL - X64/WriteDr5.asm | INTEL X64/WriteDr4.nasm| INTEL - X64/WriteDr4.asm | INTEL X64/WriteDr3.nasm| INTEL - X64/WriteDr3.asm | INTEL X64/WriteDr2.nasm| INTEL - X64/WriteDr2.asm | INTEL X64/WriteDr1.nasm| INTEL - X64/WriteDr1.asm | INTEL X64/WriteDr0.nasm| INTEL - X64/WriteDr0.asm | INTEL X64/ReadDr7.nasm| INTEL - X64/ReadDr7.asm | INTEL X64/ReadDr6.nasm| INTEL - X64/ReadDr6.asm | INTEL X64/ReadDr5.nasm| INTEL - X64/ReadDr5.asm | INTEL X64/ReadDr4.nasm| INTEL - X64/ReadDr4.asm | INTEL X64/ReadDr3.nasm| INTEL - X64/ReadDr3.asm | INTEL X64/ReadDr2.nasm| INTEL - X64/ReadDr2.asm | INTEL X64/ReadDr1.nasm| INTEL - X64/ReadDr1.asm | INTEL X64/ReadDr0.nasm| INTEL - X64/ReadDr0.asm | INTEL X64/WriteCr4.nasm| INTEL - X64/WriteCr4.asm | INTEL X64/WriteCr3.nasm| INTEL - X64/WriteCr3.asm | INTEL X64/WriteCr2.nasm| INTEL - X64/WriteCr2.asm | INTEL X64/WriteCr0.nasm| INTEL - X64/WriteCr0.asm | INTEL X64/ReadCr4.nasm| INTEL - X64/ReadCr4.asm | INTEL X64/ReadCr3.nasm| INTEL - X64/ReadCr3.asm | INTEL X64/ReadCr2.nasm| INTEL - X64/ReadCr2.asm | INTEL X64/ReadCr0.nasm| INTEL - X64/ReadCr0.asm | INTEL X64/ReadEflags.nasm| INTEL - X64/ReadEflags.asm | INTEL X64/Non-existing.c Math64.c diff --git a/MdePkg/Library/BaseLib/Ia32/ARShiftU64.asm b/MdePkg/Library/BaseLib/Ia32/ARShiftU64.asm deleted file mode 100644 index 10f04c3875..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/ARShiftU64.asm +++ /dev/null @@ -1,48 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ARShiftU64.asm -; -; Abstract: -; -; 64-bit arithmetic right shift function for IA-32 -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; InternalMathARShiftU64 ( -; IN UINT64 Operand, -; IN UINTN Count -; ); -;------------------------------------------------------------------------------ -InternalMathARShiftU64 PROC - mov cl, [esp + 12] - mov eax, [esp + 8] - cdq - test cl, 32 - jnz @F - mov edx, eax - mov eax, [esp + 4] -@@: - shrd eax, edx, cl - sar edx, cl - ret -InternalMathARShiftU64 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.asm b/MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.asm deleted file mode 100644 index ab7c2cf406..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ ; -; Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; CpuBreakpoint.Asm -; -; Abstract: -; -; CpuBreakpoint function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .686 - .model flat - .xmm - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; CpuBreakpoint ( -; VOID -; ); -;------------------------------------------------------------------------------ -CpuBreakpoint PROC - int 3 - ret -CpuBreakpoint ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/CpuId.asm b/MdePkg/Library/BaseLib/Ia32/CpuId.asm deleted file mode 100644 index a1a01c0600..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/CpuId.asm +++ /dev/null @@ -1,66 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; CpuId.Asm -; -; Abstract: -; -; AsmCpuid function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586P - .model flat,C - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmCpuid ( -; IN UINT32 RegisterInEax, -; OUT UINT32 *RegisterOutEax OPTIONAL, -; OUT UINT32 *RegisterOutEbx OPTIONAL, -; OUT UINT32 *RegisterOutEcx OPTIONAL, -; OUT UINT32 *RegisterOutEdx OPTIONAL -; ); -;------------------------------------------------------------------------------ -AsmCpuid PROC USES ebx - push ebp - mov ebp, esp - mov eax, [ebp + 12] - cpuid - push ecx - mov ecx, [ebp + 16] - jecxz @F - mov [ecx], eax -@@: - mov ecx, [ebp + 20] - jecxz @F - mov [ecx], ebx -@@: - mov ecx, [ebp + 24] - jecxz @F - pop DWORD [ecx] -@@: - mov ecx, [ebp + 28] - jecxz @F - mov [ecx], edx -@@: - mov eax, [ebp + 12] - leave - ret -AsmCpuid ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/CpuIdEx.asm b/MdePkg/Library/BaseLib/Ia32/CpuIdEx.asm deleted file mode 100644 index 9cca11b752..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/CpuIdEx.asm +++ /dev/null @@ -1,68 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; CpuIdEx.Asm -; -; Abstract: -; -; AsmCpuidEx function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINT32 -; EFIAPI -; AsmCpuidEx ( -; IN UINT32 RegisterInEax, -; IN UINT32 RegisterInEcx, -; OUT UINT32 *RegisterOutEax OPTIONAL, -; OUT UINT32 *RegisterOutEbx OPTIONAL, -; OUT UINT32 *RegisterOutEcx OPTIONAL, -; OUT UINT32 *RegisterOutEdx OPTIONAL -; ) -;------------------------------------------------------------------------------ -AsmCpuidEx PROC USES ebx - push ebp - mov ebp, esp - mov eax, [ebp + 12] - mov ecx, [ebp + 16] - cpuid - push ecx - mov ecx, [ebp + 20] - jecxz @F - mov [ecx], eax -@@: - mov ecx, [ebp + 24] - jecxz @F - mov [ecx], ebx -@@: - mov ecx, [ebp + 32] - jecxz @F - mov [ecx], edx -@@: - mov ecx, [ebp + 28] - jecxz @F - pop DWORD [ecx] -@@: - mov eax, [ebp + 12] - leave - ret -AsmCpuidEx ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/CpuPause.asm b/MdePkg/Library/BaseLib/Ia32/CpuPause.asm deleted file mode 100644 index 7a5aef59d5..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/CpuPause.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ ; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; CpuPause.Asm -; -; Abstract: -; -; CpuPause function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .xmm - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; CpuPause ( -; VOID -; ); -;------------------------------------------------------------------------------ -CpuPause PROC - pause - ret -CpuPause ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/DisableCache.asm b/MdePkg/Library/BaseLib/Ia32/DisableCache.asm deleted file mode 100644 index 1d1c9e0607..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/DisableCache.asm +++ /dev/null @@ -1,45 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; DisableCache.Asm -; -; Abstract: -; -; Set the CD bit of CR0 to 1, clear the NW bit of CR0 to 0, and flush all caches with a -; WBINVD instruction. -; -; Notes: -; -;------------------------------------------------------------------------------ - - .486p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmDisableCache ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmDisableCache PROC - mov eax, cr0 - bts eax, 30 - btr eax, 29 - mov cr0, eax - wbinvd - ret -AsmDisableCache ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/DisableInterrupts.asm b/MdePkg/Library/BaseLib/Ia32/DisableInterrupts.asm deleted file mode 100644 index 823d0dd016..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/DisableInterrupts.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; DisableInterrupts.Asm -; -; Abstract: -; -; DisableInterrupts function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; DisableInterrupts ( -; VOID -; ); -;------------------------------------------------------------------------------ -DisableInterrupts PROC - cli - ret -DisableInterrupts ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/DisablePaging32.asm b/MdePkg/Library/BaseLib/Ia32/DisablePaging32.asm deleted file mode 100644 index 5a3887e33a..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/DisablePaging32.asm +++ /dev/null @@ -1,57 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; DisablePaging32.Asm -; -; Abstract: -; -; AsmDisablePaging32 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; InternalX86DisablePaging32 ( -; IN SWITCH_STACK_ENTRY_POINT EntryPoint, -; IN VOID *Context1, OPTIONAL -; IN VOID *Context2, OPTIONAL -; IN VOID *NewStack -; ); -;------------------------------------------------------------------------------ -InternalX86DisablePaging32 PROC - mov ebx, [esp + 4] - mov ecx, [esp + 8] - mov edx, [esp + 12] - pushfd - pop edi ; save EFLAGS to edi - cli - mov eax, cr0 - btr eax, 31 - mov esp, [esp + 16] - mov cr0, eax - push edi - popfd ; restore EFLAGS from edi - push edx - push ecx - call ebx - jmp $ ; EntryPoint() should not return -InternalX86DisablePaging32 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/DivU64x32.asm b/MdePkg/Library/BaseLib/Ia32/DivU64x32.asm deleted file mode 100644 index b4793837a8..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/DivU64x32.asm +++ /dev/null @@ -1,46 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; DivU64x32.asm -; -; Abstract: -; -; Calculate the quotient of a 64-bit integer by a 32-bit integer -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; InternalMathDivU64x32 ( -; IN UINT64 Dividend, -; IN UINT32 Divisor -; ); -;------------------------------------------------------------------------------ -InternalMathDivU64x32 PROC - mov eax, [esp + 8] - mov ecx, [esp + 12] - xor edx, edx - div ecx - push eax ; save quotient on stack - mov eax, [esp + 8] - div ecx - pop edx ; restore high-order dword of the quotient - ret -InternalMathDivU64x32 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.asm b/MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.asm deleted file mode 100644 index 30b041763b..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.asm +++ /dev/null @@ -1,51 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; DivError.asm -; -; Abstract: -; -; Set error flag for all division functions -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; InternalMathDivRemU64x32 ( -; IN UINT64 Dividend, -; IN UINT32 Divisor, -; OUT UINT32 *Remainder -; ); -;------------------------------------------------------------------------------ -InternalMathDivRemU64x32 PROC - mov ecx, [esp + 12] ; ecx <- divisor - mov eax, [esp + 8] ; eax <- dividend[32..63] - xor edx, edx - div ecx ; eax <- quotient[32..63], edx <- remainder - push eax - mov eax, [esp + 8] ; eax <- dividend[0..31] - div ecx ; eax <- quotient[0..31] - mov ecx, [esp + 20] ; ecx <- Remainder - jecxz @F ; abandon remainder if Remainder == NULL - mov [ecx], edx -@@: - pop edx ; edx <- quotient[32..63] - ret -InternalMathDivRemU64x32 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/DivU64x64Remainder.asm b/MdePkg/Library/BaseLib/Ia32/DivU64x64Remainder.asm deleted file mode 100644 index 44e2271235..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/DivU64x64Remainder.asm +++ /dev/null @@ -1,92 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; DivU64x64Remainder.asm -; -; Abstract: -; -; Calculate the quotient of a 64-bit integer by a 64-bit integer and returns -; both the quotient and the remainder -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -EXTERN InternalMathDivRemU64x32:PROC - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; InternalMathDivRemU64x64 ( -; IN UINT64 Dividend, -; IN UINT64 Divisor, -; OUT UINT64 *Remainder OPTIONAL -; ); -;------------------------------------------------------------------------------ -InternalMathDivRemU64x64 PROC - mov ecx, [esp + 16] ; ecx <- divisor[32..63] - test ecx, ecx - jnz _@DivRemU64x64 ; call _@DivRemU64x64 if Divisor > 2^32 - mov ecx, [esp + 20] - jecxz @F - and dword ptr [ecx + 4], 0 ; zero high dword of remainder - mov [esp + 16], ecx ; set up stack frame to match DivRemU64x32 -@@: - jmp InternalMathDivRemU64x32 -InternalMathDivRemU64x64 ENDP - -_@DivRemU64x64 PROC PRIVATE USES ebx esi edi - mov edx, dword ptr [esp + 20] - mov eax, dword ptr [esp + 16] ; edx:eax <- dividend - mov edi, edx - mov esi, eax ; edi:esi <- dividend - mov ebx, dword ptr [esp + 24] ; ecx:ebx <- divisor -@@: - shr edx, 1 - rcr eax, 1 - shrd ebx, ecx, 1 - shr ecx, 1 - jnz @B - div ebx - mov ebx, eax ; ebx <- quotient - mov ecx, [esp + 28] ; ecx <- high dword of divisor - mul dword ptr [esp + 24] ; edx:eax <- quotient * divisor[0..31] - imul ecx, ebx ; ecx <- quotient * divisor[32..63] - add edx, ecx ; edx <- (quotient * divisor)[32..63] - mov ecx, dword ptr [esp + 32] ; ecx <- addr for Remainder - jc @TooLarge ; product > 2^64 - cmp edi, edx ; compare high 32 bits - ja @Correct - jb @TooLarge ; product > dividend - cmp esi, eax - jae @Correct ; product <= dividend -@TooLarge: - dec ebx ; adjust quotient by -1 - jecxz @Return ; return if Remainder == NULL - sub eax, dword ptr [esp + 24] - sbb edx, dword ptr [esp + 28] ; edx:eax <- (quotient - 1) * divisor -@Correct: - jecxz @Return - sub esi, eax - sbb edi, edx ; edi:esi <- remainder - mov [ecx], esi - mov [ecx + 4], edi -@Return: - mov eax, ebx ; eax <- quotient - xor edx, edx ; quotient is 32 bits long - ret -_@DivRemU64x64 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/EnableCache.asm b/MdePkg/Library/BaseLib/Ia32/EnableCache.asm deleted file mode 100644 index 238431c071..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/EnableCache.asm +++ /dev/null @@ -1,45 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; EnableCache.Asm -; -; Abstract: -; -; Flush all caches with a WBINVD instruction, clear the CD bit of CR0 to 0, and clear -; the NW bit of CR0 to 0 -; -; Notes: -; -;------------------------------------------------------------------------------ - - .486p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmEnableCache ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmEnableCache PROC - wbinvd - mov eax, cr0 - btr eax, 29 - btr eax, 30 - mov cr0, eax - ret -AsmEnableCache ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/EnableDisableInterrupts.asm b/MdePkg/Library/BaseLib/Ia32/EnableDisableInterrupts.asm deleted file mode 100644 index f10886490b..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/EnableDisableInterrupts.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; EnableDisableInterrupts.Asm -; -; Abstract: -; -; EnableDisableInterrupts function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386p - .model flat - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; EnableDisableInterrupts ( -; VOID -; ); -;------------------------------------------------------------------------------ -EnableDisableInterrupts PROC - sti - cli - ret -EnableDisableInterrupts ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/EnableInterrupts.asm b/MdePkg/Library/BaseLib/Ia32/EnableInterrupts.asm deleted file mode 100644 index b43d451a15..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/EnableInterrupts.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; EnableInterrupts.Asm -; -; Abstract: -; -; EnableInterrupts function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386p - .model flat - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; EnableInterrupts ( -; VOID -; ); -;------------------------------------------------------------------------------ -EnableInterrupts PROC - sti - ret -EnableInterrupts ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/EnablePaging32.asm b/MdePkg/Library/BaseLib/Ia32/EnablePaging32.asm deleted file mode 100644 index e8db4b241a..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/EnablePaging32.asm +++ /dev/null @@ -1,57 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; EnablePaging32.Asm -; -; Abstract: -; -; AsmEnablePaging32 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; InternalX86EnablePaging32 ( -; IN SWITCH_STACK_ENTRY_POINT EntryPoint, -; IN VOID *Context1, OPTIONAL -; IN VOID *Context2, OPTIONAL -; IN VOID *NewStack -; ); -;------------------------------------------------------------------------------ -InternalX86EnablePaging32 PROC - mov ebx, [esp + 4] - mov ecx, [esp + 8] - mov edx, [esp + 12] - pushfd - pop edi ; save flags in edi - cli - mov eax, cr0 - bts eax, 31 - mov esp, [esp + 16] - mov cr0, eax - push edi - popfd ; restore flags - push edx - push ecx - call ebx - jmp $ -InternalX86EnablePaging32 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/EnablePaging64.asm b/MdePkg/Library/BaseLib/Ia32/EnablePaging64.asm deleted file mode 100644 index 9ad3404945..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/EnablePaging64.asm +++ /dev/null @@ -1,68 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; EnablePaging64.Asm -; -; Abstract: -; -; AsmEnablePaging64 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .686p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; InternalX86EnablePaging64 ( -; IN UINT16 Cs, -; IN UINT64 EntryPoint, -; IN UINT64 Context1, OPTIONAL -; IN UINT64 Context2, OPTIONAL -; IN UINT64 NewStack -; ); -;------------------------------------------------------------------------------ -InternalX86EnablePaging64 PROC - cli - mov DWORD PTR [esp], @F ; offset for far retf, seg is the 1st arg - mov eax, cr4 - or al, (1 SHL 5) - mov cr4, eax ; enable PAE - mov ecx, 0c0000080h - rdmsr - or ah, 1 ; set LME - wrmsr - mov eax, cr0 - bts eax, 31 ; set PG - mov cr0, eax ; enable paging - retf ; topmost 2 dwords hold the address -@@: ; long mode starts here - DB 67h, 48h ; 32-bit address size, 64-bit operand size - mov ebx, [esp] ; mov rbx, [esp] - DB 67h, 48h - mov ecx, [esp + 8] ; mov rcx, [esp + 8] - DB 67h, 48h - mov edx, [esp + 10h] ; mov rdx, [esp + 10h] - DB 67h, 48h - mov esp, [esp + 18h] ; mov rsp, [esp + 18h] - DB 48h - add esp, -20h ; add rsp, -20h - call ebx ; call rbx - hlt ; no one should get here -InternalX86EnablePaging64 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/FlushCacheLine.asm b/MdePkg/Library/BaseLib/Ia32/FlushCacheLine.asm deleted file mode 100644 index 1979f6d9eb..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/FlushCacheLine.asm +++ /dev/null @@ -1,55 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; FlushCacheLine.Asm -; -; Abstract: -; -; AsmFlushCacheLine function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586P - .model flat,C - .xmm - .code - -;------------------------------------------------------------------------------ -; VOID * -; EFIAPI -; AsmFlushCacheLine ( -; IN VOID *LinearAddress -; ); -;------------------------------------------------------------------------------ -AsmFlushCacheLine PROC - ; - ; If the CPU does not support CLFLUSH instruction, - ; then promote flush range to flush entire cache. - ; - mov eax, 1 - push ebx - cpuid - pop ebx - mov eax, [esp + 4] - test edx, BIT19 - jz @F - clflush [eax] - ret -@@: - wbinvd - ret -AsmFlushCacheLine ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/FxRestore.asm b/MdePkg/Library/BaseLib/Ia32/FxRestore.asm deleted file mode 100644 index 5b773d6137..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/FxRestore.asm +++ /dev/null @@ -1,42 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; FxRestore.Asm -; -; Abstract: -; -; AsmFxRestore function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586 - .model flat,C - .xmm - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; InternalX86FxRestore ( -; IN CONST IA32_FX_BUFFER *Buffer -; ); -;------------------------------------------------------------------------------ -InternalX86FxRestore PROC - mov eax, [esp + 4] ; Buffer must be 16-byte aligned - fxrstor [eax] - ret -InternalX86FxRestore ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/FxSave.asm b/MdePkg/Library/BaseLib/Ia32/FxSave.asm deleted file mode 100644 index 417106a11c..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/FxSave.asm +++ /dev/null @@ -1,42 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; FxSave.Asm -; -; Abstract: -; -; AsmFxSave function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586 - .model flat,C - .xmm - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; InternalX86FxSave ( -; OUT IA32_FX_BUFFER *Buffer -; ); -;------------------------------------------------------------------------------ -InternalX86FxSave PROC - mov eax, [esp + 4] ; Buffer must be 16-byte aligned - fxsave [eax] - ret -InternalX86FxSave ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/Invd.asm b/MdePkg/Library/BaseLib/Ia32/Invd.asm deleted file mode 100644 index a34e217883..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/Invd.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; Invd.Asm -; -; Abstract: -; -; AsmInvd function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .486p - .model flat - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmInvd ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmInvd PROC - invd - ret -AsmInvd ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/LRotU64.asm b/MdePkg/Library/BaseLib/Ia32/LRotU64.asm deleted file mode 100644 index 9e6a94e792..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/LRotU64.asm +++ /dev/null @@ -1,51 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; LRotU64.asm -; -; Abstract: -; -; 64-bit left rotation for Ia32 -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; InternalMathLRotU64 ( -; IN UINT64 Operand, -; IN UINTN Count -; ); -;------------------------------------------------------------------------------ -InternalMathLRotU64 PROC USES ebx - mov cl, [esp + 16] - mov edx, [esp + 12] - mov eax, [esp + 8] - shld ebx, edx, cl - shld edx, eax, cl - ror ebx, cl - shld eax, ebx, cl - test cl, 32 ; Count >= 32? - jz @F - mov ecx, eax - mov eax, edx - mov edx, ecx -@@: - ret -InternalMathLRotU64 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/LShiftU64.asm b/MdePkg/Library/BaseLib/Ia32/LShiftU64.asm deleted file mode 100644 index 15b724270c..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/LShiftU64.asm +++ /dev/null @@ -1,48 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; LShiftU64.asm -; -; Abstract: -; -; 64-bit left shift function for IA-32 -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; InternalMathLShiftU64 ( -; IN UINT64 Operand, -; IN UINTN Count -; ); -;------------------------------------------------------------------------------ -InternalMathLShiftU64 PROC - mov cl, [esp + 12] - xor eax, eax - mov edx, [esp + 4] - test cl, 32 ; Count >= 32? - jnz @F - mov eax, edx - mov edx, [esp + 8] -@@: - shld edx, eax, cl - shl eax, cl - ret -InternalMathLShiftU64 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/LongJump.asm b/MdePkg/Library/BaseLib/Ia32/LongJump.asm deleted file mode 100644 index d1f1d775ff..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/LongJump.asm +++ /dev/null @@ -1,46 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; LongJump.Asm -; -; Abstract: -; -; Implementation of _LongJump() on IA-32. -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; InternalLongJump ( -; IN BASE_LIBRARY_JUMP_BUFFER *JumpBuffer, -; IN UINTN Value -; ); -;------------------------------------------------------------------------------ -InternalLongJump PROC - pop eax ; skip return address - pop edx ; edx <- JumpBuffer - pop eax ; eax <- Value - mov ebx, [edx] - mov esi, [edx + 4] - mov edi, [edx + 8] - mov ebp, [edx + 12] - mov esp, [edx + 16] - jmp dword ptr [edx + 20] ; restore "eip" -InternalLongJump ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ModU64x32.asm b/MdePkg/Library/BaseLib/Ia32/ModU64x32.asm deleted file mode 100644 index a910fd342a..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/ModU64x32.asm +++ /dev/null @@ -1,45 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; DivU64x32.asm -; -; Abstract: -; -; Calculate the remainder of a 64-bit integer by a 32-bit integer -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINT32 -; EFIAPI -; InternalMathModU64x32 ( -; IN UINT64 Dividend, -; IN UINT32 Divisor -; ); -;------------------------------------------------------------------------------ -InternalMathModU64x32 PROC - mov eax, [esp + 8] - mov ecx, [esp + 12] - xor edx, edx - div ecx - mov eax, [esp + 4] - div ecx - mov eax, edx - ret -InternalMathModU64x32 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/Monitor.asm b/MdePkg/Library/BaseLib/Ia32/Monitor.asm deleted file mode 100644 index a8f8612e6b..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/Monitor.asm +++ /dev/null @@ -1,45 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; Monitor.Asm -; -; Abstract: -; -; AsmMonitor function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmMonitor ( -; IN UINTN Eax, -; IN UINTN Ecx, -; IN UINTN Edx -; ); -;------------------------------------------------------------------------------ -AsmMonitor PROC - mov eax, [esp + 4] - mov ecx, [esp + 8] - mov edx, [esp + 12] - DB 0fh, 1, 0c8h ; monitor - ret -AsmMonitor ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/MultU64x32.asm b/MdePkg/Library/BaseLib/Ia32/MultU64x32.asm deleted file mode 100644 index 9648d659e0..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/MultU64x32.asm +++ /dev/null @@ -1,43 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; MultU64x32.asm -; -; Abstract: -; -; Calculate the product of a 64-bit integer and a 32-bit integer -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; InternalMathMultU64x32 ( -; IN UINT64 Multiplicand, -; IN UINT32 Multiplier -; ); -;------------------------------------------------------------------------------ -InternalMathMultU64x32 PROC - mov ecx, [esp + 12] - mov eax, ecx - imul ecx, [esp + 8] ; overflow not detectable - mul dword ptr [esp + 4] - add edx, ecx - ret -InternalMathMultU64x32 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/MultU64x64.asm b/MdePkg/Library/BaseLib/Ia32/MultU64x64.asm deleted file mode 100644 index 061301f559..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/MultU64x64.asm +++ /dev/null @@ -1,47 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; MultU64x64.asm -; -; Abstract: -; -; Calculate the product of a 64-bit integer and another 64-bit integer -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; InternalMathMultU64x64 ( -; IN UINT64 Multiplicand, -; IN UINT64 Multiplier -; ); -;------------------------------------------------------------------------------ -InternalMathMultU64x64 PROC USES ebx - mov ebx, [esp + 8] ; ebx <- M1[0..31] - mov edx, [esp + 16] ; edx <- M2[0..31] - mov ecx, ebx - mov eax, edx - imul ebx, [esp + 20] ; ebx <- M1[0..31] * M2[32..63] - imul edx, [esp + 12] ; edx <- M1[32..63] * M2[0..31] - add ebx, edx ; carries are abandoned - mul ecx ; edx:eax <- M1[0..31] * M2[0..31] - add edx, ebx ; carries are abandoned - ret -InternalMathMultU64x64 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/Mwait.asm b/MdePkg/Library/BaseLib/Ia32/Mwait.asm deleted file mode 100644 index 3ae30850ef..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/Mwait.asm +++ /dev/null @@ -1,43 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; Mwait.Asm -; -; Abstract: -; -; AsmMwait function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmMwait ( -; IN UINTN Eax, -; IN UINTN Ecx -; ); -;------------------------------------------------------------------------------ -AsmMwait PROC - mov eax, [esp + 4] - mov ecx, [esp + 8] - DB 0fh, 1, 0c9h ; mwait - ret -AsmMwait ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/RRotU64.asm b/MdePkg/Library/BaseLib/Ia32/RRotU64.asm deleted file mode 100644 index 6afb0cc0fc..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/RRotU64.asm +++ /dev/null @@ -1,51 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; RRotU64.asm -; -; Abstract: -; -; 64-bit right rotation for Ia32 -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; InternalMathRRotU64 ( -; IN UINT64 Operand, -; IN UINTN Count -; ); -;------------------------------------------------------------------------------ -InternalMathRRotU64 PROC USES ebx - mov cl, [esp + 16] - mov eax, [esp + 8] - mov edx, [esp + 12] - shrd ebx, eax, cl - shrd eax, edx, cl - rol ebx, cl - shrd edx, ebx, cl - test cl, 32 ; Count >= 32? - jz @F - mov ecx, eax ; switch eax & edx if Count >= 32 - mov eax, edx - mov edx, ecx -@@: - ret -InternalMathRRotU64 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/RShiftU64.asm b/MdePkg/Library/BaseLib/Ia32/RShiftU64.asm deleted file mode 100644 index 94f70466dd..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/RShiftU64.asm +++ /dev/null @@ -1,48 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; RShiftU64.asm -; -; Abstract: -; -; 64-bit logical right shift function for IA-32 -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; InternalMathRShiftU64 ( -; IN UINT64 Operand, -; IN UINTN Count -; ); -;------------------------------------------------------------------------------ -InternalMathRShiftU64 PROC - mov cl, [esp + 12] ; cl <- Count - xor edx, edx - mov eax, [esp + 8] - test cl, 32 ; Count >= 32? - jnz @F - mov edx, eax - mov eax, [esp + 4] -@@: - shrd eax, edx, cl - shr edx, cl - ret -InternalMathRShiftU64 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/RdRand.asm b/MdePkg/Library/BaseLib/Ia32/RdRand.asm deleted file mode 100644 index cb4e811098..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/RdRand.asm +++ /dev/null @@ -1,94 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; RdRand.asm -; -; Abstract: -; -; Generates random number through CPU RdRand instruction under 32-bit platform. -; -; Notes: -; -;------------------------------------------------------------------------------ - -.686P -.model flat, C - -.code - -;------------------------------------------------------------------------------ -; Generates a 16 bit random number through RDRAND instruction. -; Return TRUE if Rand generated successfully, or FALSE if not. -; -; BOOLEAN EFIAPI InternalX86RdRand16 (UINT16 *Rand); -;------------------------------------------------------------------------------ -InternalX86RdRand16 PROC - ; rdrand ax ; generate a 16 bit RN into ax - ; CF=1 if RN generated ok, otherwise CF=0 - db 0fh, 0c7h, 0f0h ; rdrand r16: "0f c7 /6 ModRM:r/m(w)" - jc rn16_ok ; jmp if CF=1 - xor eax, eax ; reg=0 if CF=0 - ret ; return with failure status -rn16_ok: - mov edx, dword ptr [esp + 4] - mov [edx], ax - mov eax, 1 - ret -InternalX86RdRand16 ENDP - -;------------------------------------------------------------------------------ -; Generates a 32 bit random number through RDRAND instruction. -; Return TRUE if Rand generated successfully, or FALSE if not. -; -; BOOLEAN EFIAPI InternalX86RdRand32 (UINT32 *Rand); -;------------------------------------------------------------------------------ -InternalX86RdRand32 PROC - ; rdrand eax ; generate a 32 bit RN into eax - ; CF=1 if RN generated ok, otherwise CF=0 - db 0fh, 0c7h, 0f0h ; rdrand r32: "0f c7 /6 ModRM:r/m(w)" - jc rn32_ok ; jmp if CF=1 - xor eax, eax ; reg=0 if CF=0 - ret ; return with failure status -rn32_ok: - mov edx, dword ptr [esp + 4] - mov [edx], eax - mov eax, 1 - ret -InternalX86RdRand32 ENDP - -;------------------------------------------------------------------------------ -; Generates a 64 bit random number through RDRAND instruction. -; Return TRUE if Rand generated successfully, or FALSE if not. -; -; BOOLEAN EFIAPI InternalX86RdRand64 (UINT64 *Rand); -;------------------------------------------------------------------------------ -InternalX86RdRand64 PROC - ; rdrand eax ; generate a 32 bit RN into eax - ; CF=1 if RN generated ok, otherwise CF=0 - db 0fh, 0c7h, 0f0h ; rdrand r32: "0f c7 /6 ModRM:r/m(w)" - jnc rn64_ret ; jmp if CF=0 - mov edx, dword ptr [esp + 4] - mov [edx], eax - - db 0fh, 0c7h, 0f0h ; generate another 32 bit RN - jnc rn64_ret ; jmp if CF=0 - mov [edx + 4], eax - - mov eax, 1 - ret -rn64_ret: - xor eax, eax - ret ; return with failure status -InternalX86RdRand64 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCr0.asm b/MdePkg/Library/BaseLib/Ia32/ReadCr0.asm deleted file mode 100644 index 13d09209e1..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadCr0.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadCr0.Asm -; -; Abstract: -; -; AsmReadCr0 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadCr0 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadCr0 PROC - mov eax, cr0 - ret -AsmReadCr0 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCr2.asm b/MdePkg/Library/BaseLib/Ia32/ReadCr2.asm deleted file mode 100644 index 7a267d4416..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadCr2.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadCr2.Asm -; -; Abstract: -; -; AsmReadCr2 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadCr2 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadCr2 PROC - mov eax, cr2 - ret -AsmReadCr2 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCr3.asm b/MdePkg/Library/BaseLib/Ia32/ReadCr3.asm deleted file mode 100644 index d4ba4124d9..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadCr3.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadCr3.Asm -; -; Abstract: -; -; AsmReadCr3 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadCr3 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadCr3 PROC - mov eax, cr3 - ret -AsmReadCr3 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCr4.asm b/MdePkg/Library/BaseLib/Ia32/ReadCr4.asm deleted file mode 100644 index 02f9072ead..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadCr4.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadCr4.Asm -; -; Abstract: -; -; AsmReadCr4 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadCr4 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadCr4 PROC - mov eax, cr4 - ret -AsmReadCr4 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCs.asm b/MdePkg/Library/BaseLib/Ia32/ReadCs.asm deleted file mode 100644 index f9f1eefcda..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadCs.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadCs.Asm -; -; Abstract: -; -; AsmReadCs function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINT16 -; EFIAPI -; AsmReadCs ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadCs PROC - mov eax, cs - ret -AsmReadCs ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr0.asm b/MdePkg/Library/BaseLib/Ia32/ReadDr0.asm deleted file mode 100644 index 8a8c4d2e08..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadDr0.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadDr0.Asm -; -; Abstract: -; -; AsmReadDr0 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadDr0 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadDr0 PROC - mov eax, dr0 - ret -AsmReadDr0 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr1.asm b/MdePkg/Library/BaseLib/Ia32/ReadDr1.asm deleted file mode 100644 index cb9808bdf7..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadDr1.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadDr1.Asm -; -; Abstract: -; -; AsmReadDr1 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadDr1 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadDr1 PROC - mov eax, dr1 - ret -AsmReadDr1 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr2.asm b/MdePkg/Library/BaseLib/Ia32/ReadDr2.asm deleted file mode 100644 index bbc77b6992..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadDr2.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadDr2.Asm -; -; Abstract: -; -; AsmReadDr2 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadDr2 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadDr2 PROC - mov eax, dr2 - ret -AsmReadDr2 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr3.asm b/MdePkg/Library/BaseLib/Ia32/ReadDr3.asm deleted file mode 100644 index a6dc4433dd..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadDr3.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadDr3.Asm -; -; Abstract: -; -; AsmReadDr3 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadDr3 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadDr3 PROC - mov eax, dr3 - ret -AsmReadDr3 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr4.asm b/MdePkg/Library/BaseLib/Ia32/ReadDr4.asm deleted file mode 100644 index 2d0c7a630a..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadDr4.asm +++ /dev/null @@ -1,47 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadDr4.Asm -; -; Abstract: -; -; AsmReadDr4 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadDr4 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadDr4 PROC - ; - ; DR4 is alias to DR6 only if DE (in CR4) is cleared. Otherwise, reading - ; this register will cause a #UD exception. - ; - ; MS assembler doesn't support this instruction since no one would use it - ; under normal circustances. Here opcode is used. - ; - DB 0fh, 21h, 0e0h - ret -AsmReadDr4 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr5.asm b/MdePkg/Library/BaseLib/Ia32/ReadDr5.asm deleted file mode 100644 index 58b4ac26da..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadDr5.asm +++ /dev/null @@ -1,47 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadDr5.Asm -; -; Abstract: -; -; AsmReadDr5 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadDr5 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadDr5 PROC - ; - ; DR5 is alias to DR7 only if DE (in CR4) is cleared. Otherwise, reading - ; this register will cause a #UD exception. - ; - ; MS assembler doesn't support this instruction since no one would use it - ; under normal circustances. Here opcode is used. - ; - DB 0fh, 21h, 0e8h - ret -AsmReadDr5 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr6.asm b/MdePkg/Library/BaseLib/Ia32/ReadDr6.asm deleted file mode 100644 index 6ecac10838..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadDr6.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadDr6.Asm -; -; Abstract: -; -; AsmReadDr6 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadDr6 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadDr6 PROC - mov eax, dr6 - ret -AsmReadDr6 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr7.asm b/MdePkg/Library/BaseLib/Ia32/ReadDr7.asm deleted file mode 100644 index 3869bb1722..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadDr7.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadDr7.Asm -; -; Abstract: -; -; AsmReadDr7 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadDr7 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadDr7 PROC - mov eax, dr7 - ret -AsmReadDr7 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDs.asm b/MdePkg/Library/BaseLib/Ia32/ReadDs.asm deleted file mode 100644 index d134926691..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadDs.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadDs.Asm -; -; Abstract: -; -; AsmReadDs function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINT16 -; EFIAPI -; AsmReadDs ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadDs PROC - mov eax, ds - ret -AsmReadDs ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadEflags.asm b/MdePkg/Library/BaseLib/Ia32/ReadEflags.asm deleted file mode 100644 index 4b210d11c0..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadEflags.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadEflags.Asm -; -; Abstract: -; -; AsmReadEflags function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadEflags ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadEflags PROC - pushfd - pop eax - ret -AsmReadEflags ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadEs.asm b/MdePkg/Library/BaseLib/Ia32/ReadEs.asm deleted file mode 100644 index 4c5d0ccb1e..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadEs.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadEs.Asm -; -; Abstract: -; -; AsmReadEs function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINT16 -; EFIAPI -; AsmReadEs ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadEs PROC - mov eax, es - ret -AsmReadEs ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadFs.asm b/MdePkg/Library/BaseLib/Ia32/ReadFs.asm deleted file mode 100644 index bdcb97f3ef..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadFs.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadFs.Asm -; -; Abstract: -; -; AsmReadFs function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINT16 -; EFIAPI -; AsmReadFs ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadFs PROC - mov eax, fs - ret -AsmReadFs ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadGdtr.asm b/MdePkg/Library/BaseLib/Ia32/ReadGdtr.asm deleted file mode 100644 index 68c125a6ac..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadGdtr.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadGdtr.Asm -; -; Abstract: -; -; AsmReadGdtr function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; InternalX86ReadGdtr ( -; OUT IA32_DESCRIPTOR *Gdtr -; ); -;------------------------------------------------------------------------------ -InternalX86ReadGdtr PROC - mov eax, [esp + 4] - sgdt fword ptr [eax] - ret -InternalX86ReadGdtr ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadGs.asm b/MdePkg/Library/BaseLib/Ia32/ReadGs.asm deleted file mode 100644 index db505de35b..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadGs.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadGs.Asm -; -; Abstract: -; -; AsmReadGs function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINT16 -; EFIAPI -; AsmReadGs ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadGs PROC - mov eax, gs - ret -AsmReadGs ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadIdtr.asm b/MdePkg/Library/BaseLib/Ia32/ReadIdtr.asm deleted file mode 100644 index 40b8bf8a49..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadIdtr.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadIdtr.Asm -; -; Abstract: -; -; AsmReadIdtr function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; InternalX86ReadIdtr ( -; OUT IA32_DESCRIPTOR *Idtr -; ); -;------------------------------------------------------------------------------ -InternalX86ReadIdtr PROC - mov eax, [esp + 4] - sidt fword ptr [eax] - ret -InternalX86ReadIdtr ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadLdtr.asm b/MdePkg/Library/BaseLib/Ia32/ReadLdtr.asm deleted file mode 100644 index f38ebbf320..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadLdtr.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadLdtr.Asm -; -; Abstract: -; -; AsmReadLdtr function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINT16 -; EFIAPI -; AsmReadLdtr ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadLdtr PROC - sldt ax - ret -AsmReadLdtr ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm0.asm b/MdePkg/Library/BaseLib/Ia32/ReadMm0.asm deleted file mode 100644 index 990b647e23..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadMm0.asm +++ /dev/null @@ -1,45 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadMm0.Asm -; -; Abstract: -; -; AsmReadMm0 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586 - .model flat,C - .mmx - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmReadMm0 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadMm0 PROC - push eax - push eax - movq [esp], mm0 - pop eax - pop edx - ret -AsmReadMm0 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm1.asm b/MdePkg/Library/BaseLib/Ia32/ReadMm1.asm deleted file mode 100644 index d241fac854..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadMm1.asm +++ /dev/null @@ -1,45 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadMm1.Asm -; -; Abstract: -; -; AsmReadMm1 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586 - .model flat,C - .mmx - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmReadMm1 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadMm1 PROC - push eax - push eax - movq [esp], mm1 - pop eax - pop edx - ret -AsmReadMm1 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm2.asm b/MdePkg/Library/BaseLib/Ia32/ReadMm2.asm deleted file mode 100644 index 07bf0ea732..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadMm2.asm +++ /dev/null @@ -1,45 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadMm2.Asm -; -; Abstract: -; -; AsmReadMm2 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586 - .model flat,C - .mmx - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmReadMm2 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadMm2 PROC - push eax - push eax - movq [esp], mm2 - pop eax - pop edx - ret -AsmReadMm2 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm3.asm b/MdePkg/Library/BaseLib/Ia32/ReadMm3.asm deleted file mode 100644 index d323188479..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadMm3.asm +++ /dev/null @@ -1,45 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadMm3.Asm -; -; Abstract: -; -; AsmReadMm3 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586 - .model flat,C - .mmx - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmReadMm3 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadMm3 PROC - push eax - push eax - movq [esp], mm3 - pop eax - pop edx - ret -AsmReadMm3 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm4.asm b/MdePkg/Library/BaseLib/Ia32/ReadMm4.asm deleted file mode 100644 index 3d63eaec2a..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadMm4.asm +++ /dev/null @@ -1,45 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadMm4.Asm -; -; Abstract: -; -; AsmReadMm4 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586 - .model flat,C - .mmx - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmReadMm4 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadMm4 PROC - push eax - push eax - movq [esp], mm4 - pop eax - pop edx - ret -AsmReadMm4 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm5.asm b/MdePkg/Library/BaseLib/Ia32/ReadMm5.asm deleted file mode 100644 index 39d0c7e119..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadMm5.asm +++ /dev/null @@ -1,45 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadMm5.Asm -; -; Abstract: -; -; AsmReadMm5 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586 - .model flat,C - .mmx - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmReadMm5 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadMm5 PROC - push eax - push eax - movq [esp], mm5 - pop eax - pop edx - ret -AsmReadMm5 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm6.asm b/MdePkg/Library/BaseLib/Ia32/ReadMm6.asm deleted file mode 100644 index 26737104c4..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadMm6.asm +++ /dev/null @@ -1,45 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadMm6.Asm -; -; Abstract: -; -; AsmReadMm6 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586 - .model flat,C - .mmx - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmReadMm6 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadMm6 PROC - push eax - push eax - movq [esp], mm6 - pop eax - pop edx - ret -AsmReadMm6 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm7.asm b/MdePkg/Library/BaseLib/Ia32/ReadMm7.asm deleted file mode 100644 index eadb1acd04..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadMm7.asm +++ /dev/null @@ -1,45 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadMm7.Asm -; -; Abstract: -; -; AsmReadMm7 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586 - .model flat,C - .mmx - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmReadMm7 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadMm7 PROC - push eax - push eax - movq [esp], mm7 - pop eax - pop edx - ret -AsmReadMm7 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMsr64.asm b/MdePkg/Library/BaseLib/Ia32/ReadMsr64.asm deleted file mode 100644 index da6f45f51d..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadMsr64.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadMsr64.Asm -; -; Abstract: -; -; AsmReadMsr64 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmReadMsr64 ( -; IN UINT64 Index -; ); -;------------------------------------------------------------------------------ -AsmReadMsr64 PROC - mov ecx, [esp + 4] - rdmsr - ret -AsmReadMsr64 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadPmc.asm b/MdePkg/Library/BaseLib/Ia32/ReadPmc.asm deleted file mode 100644 index 59ea36b3f4..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadPmc.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadPmc.Asm -; -; Abstract: -; -; AsmReadPmc function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmReadPmc ( -; IN UINT32 PmcIndex -; ); -;------------------------------------------------------------------------------ -AsmReadPmc PROC - mov ecx, [esp + 4] - rdpmc - ret -AsmReadPmc ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadSs.asm b/MdePkg/Library/BaseLib/Ia32/ReadSs.asm deleted file mode 100644 index bfba7c0ab9..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadSs.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadSs.Asm -; -; Abstract: -; -; AsmReadSs function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINT16 -; EFIAPI -; AsmReadSs ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadSs PROC - mov eax, ss - ret -AsmReadSs ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadTr.asm b/MdePkg/Library/BaseLib/Ia32/ReadTr.asm deleted file mode 100644 index 7fca070170..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadTr.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadTr.Asm -; -; Abstract: -; -; AsmReadTr function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINT16 -; EFIAPI -; AsmReadTr ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadTr PROC - str ax - ret -AsmReadTr ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/ReadTsc.asm b/MdePkg/Library/BaseLib/Ia32/ReadTsc.asm deleted file mode 100644 index ad02adbed9..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/ReadTsc.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadTsc.Asm -; -; Abstract: -; -; AsmReadTsc function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmReadTsc ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadTsc PROC - rdtsc - ret -AsmReadTsc ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/SetJump.asm b/MdePkg/Library/BaseLib/Ia32/SetJump.asm deleted file mode 100644 index 0bfa404cf4..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/SetJump.asm +++ /dev/null @@ -1,51 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; SetJump.Asm -; -; Abstract: -; -; Implementation of SetJump() on IA-32. -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -InternalAssertJumpBuffer PROTO C - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; SetJump ( -; OUT BASE_LIBRARY_JUMP_BUFFER *JumpBuffer -; ); -;------------------------------------------------------------------------------ -SetJump PROC - push DWORD [esp + 4] - call InternalAssertJumpBuffer ; To validate JumpBuffer - pop ecx - pop ecx ; ecx <- return address - mov edx, [esp] - mov [edx], ebx - mov [edx + 4], esi - mov [edx + 8], edi - mov [edx + 12], ebp - mov [edx + 16], esp - mov [edx + 20], ecx ; eip value to restore in LongJump - xor eax, eax - jmp ecx -SetJump ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/SwapBytes64.asm b/MdePkg/Library/BaseLib/Ia32/SwapBytes64.asm deleted file mode 100644 index 7020753721..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/SwapBytes64.asm +++ /dev/null @@ -1,43 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; CpuId.Asm -; -; Abstract: -; -; AsmCpuid function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; InternalMathSwapBytes64 ( -; IN UINT64 Operand -; ); -;------------------------------------------------------------------------------ -InternalMathSwapBytes64 PROC - mov eax, [esp + 8] ; eax <- upper 32 bits - mov edx, [esp + 4] ; edx <- lower 32 bits - bswap eax - bswap edx - ret -InternalMathSwapBytes64 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/Thunk16.asm b/MdePkg/Library/BaseLib/Ia32/Thunk16.asm deleted file mode 100644 index 08955d4e91..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/Thunk16.asm +++ /dev/null @@ -1,260 +0,0 @@ - -#include "BaseLibInternals.h" - -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; Thunk.asm -; -; Abstract: -; -; Real mode thunk -; -;------------------------------------------------------------------------------ - - .686p - .model flat,C - -EXTERNDEF C m16Start:BYTE -EXTERNDEF C m16Size:WORD -EXTERNDEF C mThunk16Attr:WORD -EXTERNDEF C m16Gdt:WORD -EXTERNDEF C m16GdtrBase:WORD -EXTERNDEF C mTransition:WORD - -; -; Here is the layout of the real mode stack. _ToUserCode() is responsible for -; loading all these registers from real mode stack. -; -IA32_REGS STRUC 4t -_EDI DD ? -_ESI DD ? -_EBP DD ? -_ESP DD ? -_EBX DD ? -_EDX DD ? -_ECX DD ? -_EAX DD ? -_DS DW ? -_ES DW ? -_FS DW ? -_GS DW ? -_EFLAGS DD ? -_EIP DD ? -_CS DW ? -_SS DW ? -IA32_REGS ENDS - - .const - -; -; These are global constant to convey information to C code. -; -m16Size DW InternalAsmThunk16 - m16Start -mThunk16Attr DW _ThunkAttr - m16Start -m16Gdt DW _NullSegDesc - m16Start -m16GdtrBase DW _16GdtrBase - m16Start -mTransition DW _EntryPoint - m16Start - - .code - -m16Start LABEL BYTE - -SavedGdt LABEL FWORD - DW ? - DD ? -;------------------------------------------------------------------------------ -; _BackFromUserCode() takes control in real mode after 'retf' has been executed -; by user code. It will be shadowed to somewhere in memory below 1MB. -;------------------------------------------------------------------------------ -_BackFromUserCode PROC - ; - ; The order of saved registers on the stack matches the order they appears - ; in IA32_REGS structure. This facilitates wrapper function to extract them - ; into that structure. - ; - push ss - push cs - DB 66h - call @Base ; push eip -@Base: - pushf ; pushfd actually - cli ; disable interrupts - push gs - push fs - push es - push ds - pushaw ; pushad actually - DB 66h, 0bah ; mov edx, imm32 -_ThunkAttr DD ? - test dl, THUNK_ATTRIBUTE_DISABLE_A20_MASK_INT_15 - jz @1 - mov eax, 15cd2401h ; mov ax, 2401h & int 15h - cli ; disable interrupts - jnc @2 -@1: - test dl, THUNK_ATTRIBUTE_DISABLE_A20_MASK_KBD_CTRL - jz @2 - in al, 92h - or al, 2 - out 92h, al ; deactivate A20M# -@2: - xor ax, ax ; xor eax, eax - mov eax, ss ; mov ax, ss - DB 67h - lea bp, [esp + sizeof (IA32_REGS)] - ; - ; esi's in the following 2 instructions are indeed bp in 16-bit code. Fact - ; is "esi" in 32-bit addressing mode has the same encoding of "bp" in 16- - ; bit addressing mode. - ; - mov word ptr (IA32_REGS ptr [esi - sizeof (IA32_REGS)])._ESP, bp - mov ebx, (IA32_REGS ptr [esi - sizeof (IA32_REGS)])._EIP - shl ax, 4 ; shl eax, 4 - add bp, ax ; add ebp, eax - DB 66h, 0b8h ; mov eax, imm32 -SavedCr4 DD ? - mov cr4, eax - DB 66h - lgdt fword ptr cs:[edi + (SavedGdt - @Base)] - DB 66h, 0b8h ; mov eax, imm32 -SavedCr0 DD ? - mov cr0, eax - DB 0b8h ; mov ax, imm16 -SavedSs DW ? - mov ss, eax - DB 66h, 0bch ; mov esp, imm32 -SavedEsp DD ? - DB 66h - retf ; return to protected mode -_BackFromUserCode ENDP - -_EntryPoint DD _ToUserCode - m16Start - DW 8h -_16Idtr FWORD (1 SHL 10) - 1 -_16Gdtr LABEL FWORD - DW GdtEnd - _NullSegDesc - 1 -_16GdtrBase DD _NullSegDesc - -;------------------------------------------------------------------------------ -; _ToUserCode() takes control in real mode before passing control to user code. -; It will be shadowed to somewhere in memory below 1MB. -;------------------------------------------------------------------------------ -_ToUserCode PROC - mov edx, ss - mov ss, ecx ; set new segment selectors - mov ds, ecx - mov es, ecx - mov fs, ecx - mov gs, ecx - mov cr0, eax ; real mode starts at next instruction - ; which (per SDM) *must* be a far JMP. - DB 0eah -_RealAddr DW 0,0 ; filled in by InternalAsmThunk16 - - mov cr4, ebp - mov ss, esi ; set up 16-bit stack segment - xchg sp, bx ; set up 16-bit stack pointer - -; mov bp, [esp + sizeof(IA32_REGS) - DB 67h - mov ebp, [esp + sizeof(IA32_REGS)] ; BackFromUserCode address from stack - -; mov cs:[bp + (SavedSs - _BackFromUserCode)], dx - mov cs:[esi + (SavedSs - _BackFromUserCode)], edx - -; mov cs:[bp + (SavedEsp - _BackFromUserCode)], ebx - DB 2eh, 66h, 89h, 9eh - DW SavedEsp - _BackFromUserCode - -; lidt cs:[bp + (_16Idtr - _BackFromUserCode)] - DB 2eh, 66h, 0fh, 01h, 9eh - DW _16Idtr - _BackFromUserCode - - popaw ; popad actually - pop ds - pop es - pop fs - pop gs - popf ; popfd - DB 66h ; Use 32-bit addressing for "retf" below - retf ; transfer control to user code -_ToUserCode ENDP - -_NullSegDesc DQ 0 -_16CsDesc LABEL QWORD - DW -1 - DW 0 - DB 0 - DB 9bh - DB 8fh ; 16-bit segment, 4GB limit - DB 0 -_16DsDesc LABEL QWORD - DW -1 - DW 0 - DB 0 - DB 93h - DB 8fh ; 16-bit segment, 4GB limit - DB 0 -GdtEnd LABEL QWORD - -;------------------------------------------------------------------------------ -; IA32_REGISTER_SET * -; EFIAPI -; InternalAsmThunk16 ( -; IN IA32_REGISTER_SET *RegisterSet, -; IN OUT VOID *Transition -; ); -;------------------------------------------------------------------------------ -InternalAsmThunk16 PROC USES ebp ebx esi edi ds es fs gs - mov esi, [esp + 36] ; esi <- RegSet, the 1st parameter - movzx edx, (IA32_REGS ptr [esi])._SS - mov edi, (IA32_REGS ptr [esi])._ESP - add edi, - (sizeof (IA32_REGS) + 4) ; reserve stack space - mov ebx, edi ; ebx <- stack offset - imul eax, edx, 16 ; eax <- edx * 16 - push sizeof (IA32_REGS) / 4 - add edi, eax ; edi <- linear address of 16-bit stack - pop ecx - rep movsd ; copy RegSet - mov eax, [esp + 40] ; eax <- address of transition code - mov esi, edx ; esi <- 16-bit stack segment - lea edx, [eax + (SavedCr0 - m16Start)] - mov ecx, eax - and ecx, 0fh - shl eax, 12 - lea ecx, [ecx + (_BackFromUserCode - m16Start)] - mov ax, cx - stosd ; [edi] <- return address of user code - add eax, _RealAddr + 4 - _BackFromUserCode - mov dword ptr [edx + (_RealAddr - SavedCr0)], eax - sgdt fword ptr [edx + (SavedGdt - SavedCr0)] - sidt fword ptr [esp + 36] ; save IDT stack in argument space - mov eax, cr0 - mov [edx], eax ; save CR0 in SavedCr0 - and eax, 7ffffffeh ; clear PE, PG bits - mov ebp, cr4 - mov [edx + (SavedCr4 - SavedCr0)], ebp - and ebp, NOT 30h ; clear PAE, PSE bits - push 10h - pop ecx ; ecx <- selector for data segments - lgdt fword ptr [edx + (_16Gdtr - SavedCr0)] - pushfd ; Save df/if indeed - call fword ptr [edx + (_EntryPoint - SavedCr0)] - popfd - lidt fword ptr [esp + 36] ; restore protected mode IDTR - lea eax, [ebp - sizeof (IA32_REGS)] ; eax <- the address of IA32_REGS - ret -InternalAsmThunk16 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/Wbinvd.asm b/MdePkg/Library/BaseLib/Ia32/Wbinvd.asm deleted file mode 100644 index 06db1c8b39..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/Wbinvd.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; Wbinvd.Asm -; -; Abstract: -; -; AsmWbinvd function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .486p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmWbinvd ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmWbinvd PROC - wbinvd - ret -AsmWbinvd ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteCr0.asm b/MdePkg/Library/BaseLib/Ia32/WriteCr0.asm deleted file mode 100644 index edcf71050d..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/WriteCr0.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteCr0.Asm -; -; Abstract: -; -; AsmWriteCr0 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteCr0 ( -; UINTN Cr0 -; ); -;------------------------------------------------------------------------------ -AsmWriteCr0 PROC - mov eax, [esp + 4] - mov cr0, eax - ret -AsmWriteCr0 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteCr2.asm b/MdePkg/Library/BaseLib/Ia32/WriteCr2.asm deleted file mode 100644 index 06c54b0ba3..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/WriteCr2.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteCr2.Asm -; -; Abstract: -; -; AsmWriteCr2 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteCr2 ( -; UINTN Cr2 -; ); -;------------------------------------------------------------------------------ -AsmWriteCr2 PROC - mov eax, [esp + 4] - mov cr2, eax - ret -AsmWriteCr2 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteCr3.asm b/MdePkg/Library/BaseLib/Ia32/WriteCr3.asm deleted file mode 100644 index 69e87bab10..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/WriteCr3.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteCr3.Asm -; -; Abstract: -; -; AsmWriteCr3 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteCr3 ( -; UINTN Cr3 -; ); -;------------------------------------------------------------------------------ -AsmWriteCr3 PROC - mov eax, [esp + 4] - mov cr3, eax - ret -AsmWriteCr3 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteCr4.asm b/MdePkg/Library/BaseLib/Ia32/WriteCr4.asm deleted file mode 100644 index ad453489b7..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/WriteCr4.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteCr4.Asm -; -; Abstract: -; -; AsmWriteCr4 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteCr4 ( -; UINTN Cr4 -; ); -;------------------------------------------------------------------------------ -AsmWriteCr4 PROC - mov eax, [esp + 4] - mov cr4, eax - ret -AsmWriteCr4 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr0.asm b/MdePkg/Library/BaseLib/Ia32/WriteDr0.asm deleted file mode 100644 index 5528134124..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/WriteDr0.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteDr0.Asm -; -; Abstract: -; -; AsmWriteDr0 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteDr0 ( -; IN UINTN Value -; ); -;------------------------------------------------------------------------------ -AsmWriteDr0 PROC - mov eax, [esp + 4] - mov dr0, eax - ret -AsmWriteDr0 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr1.asm b/MdePkg/Library/BaseLib/Ia32/WriteDr1.asm deleted file mode 100644 index ad9f8851f2..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/WriteDr1.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteDr1.Asm -; -; Abstract: -; -; AsmWriteDr1 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteDr1 ( -; IN UINTN Value -; ); -;------------------------------------------------------------------------------ -AsmWriteDr1 PROC - mov eax, [esp + 4] - mov dr1, eax - ret -AsmWriteDr1 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr2.asm b/MdePkg/Library/BaseLib/Ia32/WriteDr2.asm deleted file mode 100644 index 266ff7d709..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/WriteDr2.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteDr2.Asm -; -; Abstract: -; -; AsmWriteDr2 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteDr2 ( -; IN UINTN Value -; ); -;------------------------------------------------------------------------------ -AsmWriteDr2 PROC - mov eax, [esp + 4] - mov dr2, eax - ret -AsmWriteDr2 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr3.asm b/MdePkg/Library/BaseLib/Ia32/WriteDr3.asm deleted file mode 100644 index b24d1058ac..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/WriteDr3.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteDr3.Asm -; -; Abstract: -; -; AsmWriteDr3 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteDr3 ( -; IN UINTN Value -; ); -;------------------------------------------------------------------------------ -AsmWriteDr3 PROC - mov eax, [esp + 4] - mov dr3, eax - ret -AsmWriteDr3 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr4.asm b/MdePkg/Library/BaseLib/Ia32/WriteDr4.asm deleted file mode 100644 index bc8eef17a5..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/WriteDr4.asm +++ /dev/null @@ -1,48 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteDr4.Asm -; -; Abstract: -; -; AsmWriteDr4 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteDr4 ( -; IN UINTN Value -; ); -;------------------------------------------------------------------------------ -AsmWriteDr4 PROC - mov eax, [esp + 4] - ; - ; DR4 is alias to DR6 only if DE (in CR4) is cleared. Otherwise, writing to - ; this register will cause a #UD exception. - ; - ; MS assembler doesn't support this instruction since no one would use it - ; under normal circustances. Here opcode is used. - ; - DB 0fh, 23h, 0e0h - ret -AsmWriteDr4 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr5.asm b/MdePkg/Library/BaseLib/Ia32/WriteDr5.asm deleted file mode 100644 index 0df817529b..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/WriteDr5.asm +++ /dev/null @@ -1,48 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteDr5.Asm -; -; Abstract: -; -; AsmWriteDr5 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteDr5 ( -; IN UINTN Value -; ); -;------------------------------------------------------------------------------ -AsmWriteDr5 PROC - mov eax, [esp + 4] - ; - ; DR5 is alias to DR7 only if DE (in CR4) is cleared. Otherwise, writing to - ; this register will cause a #UD exception. - ; - ; MS assembler doesn't support this instruction since no one would use it - ; under normal circustances. Here opcode is used. - ; - DB 0fh, 23h, 0e8h - ret -AsmWriteDr5 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr6.asm b/MdePkg/Library/BaseLib/Ia32/WriteDr6.asm deleted file mode 100644 index dc399eab32..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/WriteDr6.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteDr6.Asm -; -; Abstract: -; -; AsmWriteDr6 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteDr6 ( -; IN UINTN Value -; ); -;------------------------------------------------------------------------------ -AsmWriteDr6 PROC - mov eax, [esp + 4] - mov dr6, eax - ret -AsmWriteDr6 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr7.asm b/MdePkg/Library/BaseLib/Ia32/WriteDr7.asm deleted file mode 100644 index ace8822ce9..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/WriteDr7.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteDr7.Asm -; -; Abstract: -; -; AsmWriteDr7 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteDr7 ( -; IN UINTN Value -; ); -;------------------------------------------------------------------------------ -AsmWriteDr7 PROC - mov eax, [esp + 4] - mov dr7, eax - ret -AsmWriteDr7 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteGdtr.asm b/MdePkg/Library/BaseLib/Ia32/WriteGdtr.asm deleted file mode 100644 index d95ef316fd..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/WriteGdtr.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteGdtr.Asm -; -; Abstract: -; -; AsmWriteGdtr function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; InternalX86WriteGdtr ( -; IN CONST IA32_DESCRIPTOR *Idtr -; ); -;------------------------------------------------------------------------------ -InternalX86WriteGdtr PROC - mov eax, [esp + 4] - lgdt fword ptr [eax] - ret -InternalX86WriteGdtr ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteIdtr.asm b/MdePkg/Library/BaseLib/Ia32/WriteIdtr.asm deleted file mode 100644 index da15433f69..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/WriteIdtr.asm +++ /dev/null @@ -1,44 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteIdtr.Asm -; -; Abstract: -; -; AsmWriteIdtr function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; InternalX86WriteIdtr ( -; IN CONST IA32_DESCRIPTOR *Idtr -; ); -;------------------------------------------------------------------------------ -InternalX86WriteIdtr PROC - mov eax, [esp + 4] - pushfd - cli - lidt fword ptr [eax] - popfd - ret -InternalX86WriteIdtr ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteLdtr.asm b/MdePkg/Library/BaseLib/Ia32/WriteLdtr.asm deleted file mode 100644 index adec67da3e..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/WriteLdtr.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteLdtr.Asm -; -; Abstract: -; -; AsmWriteLdtr function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386p - .model flat - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmWriteLdtr ( -; IN UINT16 Ldtr -; ); -;------------------------------------------------------------------------------ -AsmWriteLdtr PROC - mov eax, [esp + 4] - lldt ax - ret -AsmWriteLdtr ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm0.asm b/MdePkg/Library/BaseLib/Ia32/WriteMm0.asm deleted file mode 100644 index de89a86629..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/WriteMm0.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteMm0.Asm -; -; Abstract: -; -; AsmWriteMm0 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586 - .model flat,C - .mmx - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmWriteMm0 ( -; IN UINT64 Value -; ); -;------------------------------------------------------------------------------ -AsmWriteMm0 PROC - movq mm0, [esp + 4] - ret -AsmWriteMm0 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm1.asm b/MdePkg/Library/BaseLib/Ia32/WriteMm1.asm deleted file mode 100644 index 2bb255feec..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/WriteMm1.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteMm1.Asm -; -; Abstract: -; -; AsmWriteMm1 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586 - .model flat,C - .mmx - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmWriteMm1 ( -; IN UINT64 Value -; ); -;------------------------------------------------------------------------------ -AsmWriteMm1 PROC - movq mm1, [esp + 4] - ret -AsmWriteMm1 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm2.asm b/MdePkg/Library/BaseLib/Ia32/WriteMm2.asm deleted file mode 100644 index 99a9fc8a6d..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/WriteMm2.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteMm2.Asm -; -; Abstract: -; -; AsmWriteMm2 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586 - .model flat,C - .mmx - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmWriteMm2 ( -; IN UINT64 Value -; ); -;------------------------------------------------------------------------------ -AsmWriteMm2 PROC - movq mm2, [esp + 4] - ret -AsmWriteMm2 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm3.asm b/MdePkg/Library/BaseLib/Ia32/WriteMm3.asm deleted file mode 100644 index 7ae32ed424..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/WriteMm3.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteMm3.Asm -; -; Abstract: -; -; AsmWriteMm3 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586 - .model flat,C - .mmx - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmWriteMm3 ( -; IN UINT64 Value -; ); -;------------------------------------------------------------------------------ -AsmWriteMm3 PROC - movq mm3, [esp + 4] - ret -AsmWriteMm3 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm4.asm b/MdePkg/Library/BaseLib/Ia32/WriteMm4.asm deleted file mode 100644 index 0ede40e49a..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/WriteMm4.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteMm4.Asm -; -; Abstract: -; -; AsmWriteMm4 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586 - .model flat,C - .mmx - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmWriteMm4 ( -; IN UINT64 Value -; ); -;------------------------------------------------------------------------------ -AsmWriteMm4 PROC - movq mm4, [esp + 4] - ret -AsmWriteMm4 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm5.asm b/MdePkg/Library/BaseLib/Ia32/WriteMm5.asm deleted file mode 100644 index 1438a889a7..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/WriteMm5.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteMm5.Asm -; -; Abstract: -; -; AsmWriteMm5 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586 - .model flat,C - .mmx - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmWriteMm5 ( -; IN UINT64 Value -; ); -;------------------------------------------------------------------------------ -AsmWriteMm5 PROC - movq mm5, [esp + 4] - ret -AsmWriteMm5 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm6.asm b/MdePkg/Library/BaseLib/Ia32/WriteMm6.asm deleted file mode 100644 index d7bce977e6..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/WriteMm6.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteMm6.Asm -; -; Abstract: -; -; AsmWriteMm6 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586 - .model flat,C - .mmx - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmWriteMm6 ( -; IN UINT64 Value -; ); -;------------------------------------------------------------------------------ -AsmWriteMm6 PROC - movq mm6, [esp + 4] - ret -AsmWriteMm6 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm7.asm b/MdePkg/Library/BaseLib/Ia32/WriteMm7.asm deleted file mode 100644 index c6920b494a..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/WriteMm7.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteMm7.Asm -; -; Abstract: -; -; AsmWriteMm7 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586 - .model flat,C - .mmx - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmWriteMm7 ( -; IN UINT64 Value -; ); -;------------------------------------------------------------------------------ -AsmWriteMm7 PROC - movq mm7, [esp + 4] - ret -AsmWriteMm7 ENDP - - END diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMsr64.asm b/MdePkg/Library/BaseLib/Ia32/WriteMsr64.asm deleted file mode 100644 index 109adc83c4..0000000000 --- a/MdePkg/Library/BaseLib/Ia32/WriteMsr64.asm +++ /dev/null @@ -1,44 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteMsr64.Asm -; -; Abstract: -; -; AsmWriteMsr64 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586p - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmWriteMsr64 ( -; IN UINT32 Index, -; IN UINT64 Value -; ); -;------------------------------------------------------------------------------ -AsmWriteMsr64 PROC - mov edx, [esp + 12] - mov eax, [esp + 8] - mov ecx, [esp + 4] - wrmsr - ret -AsmWriteMsr64 ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/CpuBreakpoint.asm b/MdePkg/Library/BaseLib/X64/CpuBreakpoint.asm deleted file mode 100644 index 25dd9b48e8..0000000000 --- a/MdePkg/Library/BaseLib/X64/CpuBreakpoint.asm +++ /dev/null @@ -1,37 +0,0 @@ -;------------------------------------------------------------------------------ ; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; CpuBreakpoint.Asm -; -; Abstract: -; -; CpuBreakpoint function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; CpuBreakpoint ( -; VOID -; ); -;------------------------------------------------------------------------------ -CpuBreakpoint PROC - int 3 - ret -CpuBreakpoint ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/CpuId.asm b/MdePkg/Library/BaseLib/X64/CpuId.asm deleted file mode 100644 index c6182c1611..0000000000 --- a/MdePkg/Library/BaseLib/X64/CpuId.asm +++ /dev/null @@ -1,62 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; CpuId.Asm -; -; Abstract: -; -; AsmCpuid function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmCpuid ( -; IN UINT32 RegisterInEax, -; OUT UINT32 *RegisterOutEax OPTIONAL, -; OUT UINT32 *RegisterOutEbx OPTIONAL, -; OUT UINT32 *RegisterOutEcx OPTIONAL, -; OUT UINT32 *RegisterOutEdx OPTIONAL -; ) -;------------------------------------------------------------------------------ -AsmCpuid PROC USES rbx - mov eax, ecx - push rax ; save Index on stack - push rdx - cpuid - test r9, r9 - jz @F - mov [r9], ecx -@@: - pop rcx - jrcxz @F - mov [rcx], eax -@@: - mov rcx, r8 - jrcxz @F - mov [rcx], ebx -@@: - mov rcx, [rsp + 38h] - jrcxz @F - mov [rcx], edx -@@: - pop rax ; restore Index to rax as return value - ret -AsmCpuid ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/CpuIdEx.asm b/MdePkg/Library/BaseLib/X64/CpuIdEx.asm deleted file mode 100644 index b41ba8e2fe..0000000000 --- a/MdePkg/Library/BaseLib/X64/CpuIdEx.asm +++ /dev/null @@ -1,64 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; CpuIdEx.Asm -; -; Abstract: -; -; AsmCpuidEx function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINT32 -; EFIAPI -; AsmCpuidEx ( -; IN UINT32 RegisterInEax, -; IN UINT32 RegisterInEcx, -; OUT UINT32 *RegisterOutEax OPTIONAL, -; OUT UINT32 *RegisterOutEbx OPTIONAL, -; OUT UINT32 *RegisterOutEcx OPTIONAL, -; OUT UINT32 *RegisterOutEdx OPTIONAL -; ) -;------------------------------------------------------------------------------ -AsmCpuidEx PROC USES rbx - mov eax, ecx - mov ecx, edx - push rax ; save Index on stack - cpuid - mov r10, [rsp + 38h] - test r10, r10 - jz @F - mov [r10], ecx -@@: - mov rcx, r8 - jrcxz @F - mov [rcx], eax -@@: - mov rcx, r9 - jrcxz @F - mov [rcx], ebx -@@: - mov rcx, [rsp + 40h] - jrcxz @F - mov [rcx], edx -@@: - pop rax ; restore Index to rax as return value - ret -AsmCpuidEx ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/CpuPause.asm b/MdePkg/Library/BaseLib/X64/CpuPause.asm deleted file mode 100644 index a84465fe0a..0000000000 --- a/MdePkg/Library/BaseLib/X64/CpuPause.asm +++ /dev/null @@ -1,37 +0,0 @@ -;------------------------------------------------------------------------------ ; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; CpuPause.Asm -; -; Abstract: -; -; CpuPause function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; CpuPause ( -; VOID -; ); -;------------------------------------------------------------------------------ -CpuPause PROC - pause - ret -CpuPause ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/DisableCache.asm b/MdePkg/Library/BaseLib/X64/DisableCache.asm deleted file mode 100644 index 9fd5bd79bd..0000000000 --- a/MdePkg/Library/BaseLib/X64/DisableCache.asm +++ /dev/null @@ -1,43 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; DisableCache.Asm -; -; Abstract: -; -; Set the CD bit of CR0 to 1, clear the NW bit of CR0 to 0, and flush all caches with a -; WBINVD instruction. -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmDisableCache ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmDisableCache PROC - mov rax, cr0 - bts rax, 30 - btr rax, 29 - mov cr0, rax - wbinvd - ret -AsmDisableCache ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/DisableInterrupts.asm b/MdePkg/Library/BaseLib/X64/DisableInterrupts.asm deleted file mode 100644 index 4e54e0d889..0000000000 --- a/MdePkg/Library/BaseLib/X64/DisableInterrupts.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; DisableInterrupts.Asm -; -; Abstract: -; -; DisableInterrupts function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; DisableInterrupts ( -; VOID -; ); -;------------------------------------------------------------------------------ -DisableInterrupts PROC - cli - ret -DisableInterrupts ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/DisablePaging64.asm b/MdePkg/Library/BaseLib/X64/DisablePaging64.asm deleted file mode 100644 index 32dcd5aa1f..0000000000 --- a/MdePkg/Library/BaseLib/X64/DisablePaging64.asm +++ /dev/null @@ -1,84 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; DisablePaging64.Asm -; -; Abstract: -; -; AsmDisablePaging64 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; InternalX86DisablePaging64 ( -; IN UINT16 Cs, -; IN UINT32 EntryPoint, -; IN UINT32 Context1, OPTIONAL -; IN UINT32 Context2, OPTIONAL -; IN UINT32 NewStack -; ); -;------------------------------------------------------------------------------ -InternalX86DisablePaging64 PROC - cli - lea rsi, @F ; rsi <- The start address of transition code - mov edi, [rsp + 28h] ; rdi <- New stack - lea rax, mTransitionEnd ; rax <- end of transition code - sub rax, rsi ; rax <- The size of transition piece code - add rax, 4 ; Round RAX up to the next 4 byte boundary - and al, 0fch - sub rdi, rax ; rdi <- Use stack to hold transition code - mov r10d, edi ; r10 <- The start address of transicition code below 4G - push rcx ; save rcx to stack - mov rcx, rax ; rcx <- The size of transition piece code - rep movsb ; copy transition code to top of new stack which must be below 4GB - pop rcx ; restore rcx - - mov esi, r8d - mov edi, r9d - mov eax, r10d ; eax <- start of the transition code on the stack - sub eax, 4 ; eax <- One slot below transition code on the stack - push rcx ; push Cs to stack - push r10 ; push address of tansition code on stack - DB 48h ; prefix to composite "retq" with next "retf" - retf ; Use far return to load CS register from stack - -; Start of transition code -@@: - mov esp, eax ; set up new stack - mov rax, cr0 - btr eax, 31 ; Clear CR0.PG - mov cr0, rax ; disable paging and caches - - mov ebx, edx ; save EntryPoint to rbx, for rdmsr will overwrite rdx - mov ecx, 0c0000080h - rdmsr - and ah, NOT 1 ; clear LME - wrmsr - mov rax, cr4 - and al, NOT (1 SHL 5) ; clear PAE - mov cr4, rax - push rdi ; push Context2 - push rsi ; push Context1 - call rbx ; transfer control to EntryPoint - hlt ; no one should get here -InternalX86DisablePaging64 ENDP - -mTransitionEnd LABEL BYTE - - END diff --git a/MdePkg/Library/BaseLib/X64/EnableCache.asm b/MdePkg/Library/BaseLib/X64/EnableCache.asm deleted file mode 100644 index 88b71d706f..0000000000 --- a/MdePkg/Library/BaseLib/X64/EnableCache.asm +++ /dev/null @@ -1,43 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; EnableCache.Asm -; -; Abstract: -; -; Flush all caches with a WBINVD instruction, clear the CD bit of CR0 to 0, and clear -; the NW bit of CR0 to 0 -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmEnableCache ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmEnableCache PROC - wbinvd - mov rax, cr0 - btr rax, 29 - btr rax, 30 - mov cr0, rax - ret -AsmEnableCache ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/EnableDisableInterrupts.asm b/MdePkg/Library/BaseLib/X64/EnableDisableInterrupts.asm deleted file mode 100644 index f6b2d9c97a..0000000000 --- a/MdePkg/Library/BaseLib/X64/EnableDisableInterrupts.asm +++ /dev/null @@ -1,39 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; EnableDisableInterrupts.Asm -; -; Abstract: -; -; EnableDisableInterrupts function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; EnableDisableInterrupts ( -; VOID -; ); -;------------------------------------------------------------------------------ -EnableDisableInterrupts PROC - sti - cli - ret -EnableDisableInterrupts ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/EnableInterrupts.asm b/MdePkg/Library/BaseLib/X64/EnableInterrupts.asm deleted file mode 100644 index e776c27c4b..0000000000 --- a/MdePkg/Library/BaseLib/X64/EnableInterrupts.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; EnableInterrupts.Asm -; -; Abstract: -; -; EnableInterrupts function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; EnableInterrupts ( -; VOID -; ); -;------------------------------------------------------------------------------ -EnableInterrupts PROC - sti - ret -EnableInterrupts ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/FlushCacheLine.asm b/MdePkg/Library/BaseLib/X64/FlushCacheLine.asm deleted file mode 100644 index e30f9a90b9..0000000000 --- a/MdePkg/Library/BaseLib/X64/FlushCacheLine.asm +++ /dev/null @@ -1,39 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; FlushCacheLine.Asm -; -; Abstract: -; -; AsmFlushCacheLine function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID * -; EFIAPI -; AsmFlushCacheLine ( -; IN VOID *LinearAddress -; ); -;------------------------------------------------------------------------------ -AsmFlushCacheLine PROC - clflush [rcx] - mov rax, rcx - ret -AsmFlushCacheLine ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/FxRestore.asm b/MdePkg/Library/BaseLib/X64/FxRestore.asm deleted file mode 100644 index 8496331ac5..0000000000 --- a/MdePkg/Library/BaseLib/X64/FxRestore.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; FxRestore.Asm -; -; Abstract: -; -; AsmFxRestore function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; InternalX86FxRestore ( -; IN CONST IA32_FX_BUFFER *Buffer -; ); -;------------------------------------------------------------------------------ -InternalX86FxRestore PROC - fxrstor [rcx] - ret -InternalX86FxRestore ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/FxSave.asm b/MdePkg/Library/BaseLib/X64/FxSave.asm deleted file mode 100644 index d41e9351b3..0000000000 --- a/MdePkg/Library/BaseLib/X64/FxSave.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; FxSave.Asm -; -; Abstract: -; -; AsmFxSave function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; InternalX86FxSave ( -; OUT IA32_FX_BUFFER *Buffer -; ); -;------------------------------------------------------------------------------ -InternalX86FxSave PROC - fxsave [rcx] - ret -InternalX86FxSave ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/Invd.asm b/MdePkg/Library/BaseLib/X64/Invd.asm deleted file mode 100644 index ed6f95da55..0000000000 --- a/MdePkg/Library/BaseLib/X64/Invd.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; Invd.Asm -; -; Abstract: -; -; AsmInvd function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmInvd ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmInvd PROC - invd - ret -AsmInvd ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/LongJump.asm b/MdePkg/Library/BaseLib/X64/LongJump.asm deleted file mode 100644 index eaf32ea2e6..0000000000 --- a/MdePkg/Library/BaseLib/X64/LongJump.asm +++ /dev/null @@ -1,58 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; LongJump.Asm -; -; Abstract: -; -; Implementation of _LongJump() on x64. -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; InternalLongJump ( -; IN BASE_LIBRARY_JUMP_BUFFER *JumpBuffer, -; IN UINTN Value -; ); -;------------------------------------------------------------------------------ -InternalLongJump PROC - mov rbx, [rcx] - mov rsp, [rcx + 8] - mov rbp, [rcx + 10h] - mov rdi, [rcx + 18h] - mov rsi, [rcx + 20h] - mov r12, [rcx + 28h] - mov r13, [rcx + 30h] - mov r14, [rcx + 38h] - mov r15, [rcx + 40h] - ; load non-volatile fp registers - ldmxcsr [rcx + 50h] - movdqu xmm6, [rcx + 58h] - movdqu xmm7, [rcx + 68h] - movdqu xmm8, [rcx + 78h] - movdqu xmm9, [rcx + 88h] - movdqu xmm10, [rcx + 98h] - movdqu xmm11, [rcx + 0A8h] - movdqu xmm12, [rcx + 0B8h] - movdqu xmm13, [rcx + 0C8h] - movdqu xmm14, [rcx + 0D8h] - movdqu xmm15, [rcx + 0E8h] - mov rax, rdx ; set return value - jmp qword ptr [rcx + 48h] -InternalLongJump ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/Monitor.asm b/MdePkg/Library/BaseLib/X64/Monitor.asm deleted file mode 100644 index 8ae6e7320c..0000000000 --- a/MdePkg/Library/BaseLib/X64/Monitor.asm +++ /dev/null @@ -1,43 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; Monitor.Asm -; -; Abstract: -; -; AsmMonitor function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmMonitor ( -; IN UINTN Eax, -; IN UINTN Ecx, -; IN UINTN Edx -; ); -;------------------------------------------------------------------------------ -AsmMonitor PROC - mov eax, ecx - mov ecx, edx - mov edx, r8d - DB 0fh, 1, 0c8h ; monitor - ret -AsmMonitor ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/Mwait.asm b/MdePkg/Library/BaseLib/X64/Mwait.asm deleted file mode 100644 index 02ec8633e5..0000000000 --- a/MdePkg/Library/BaseLib/X64/Mwait.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; Mwait.Asm -; -; Abstract: -; -; AsmMwait function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmMwait ( -; IN UINTN Eax, -; IN UINTN Ecx -; ); -;------------------------------------------------------------------------------ -AsmMwait PROC - mov eax, ecx - mov ecx, edx - DB 0fh, 1, 0c9h ; mwait - ret -AsmMwait ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/RdRand.asm b/MdePkg/Library/BaseLib/X64/RdRand.asm deleted file mode 100644 index 8e2074e2d5..0000000000 --- a/MdePkg/Library/BaseLib/X64/RdRand.asm +++ /dev/null @@ -1,83 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; RdRand.asm -; -; Abstract: -; -; Generates random number through CPU RdRand instruction under 64-bit platform. -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; Generates a 16 bit random number through RDRAND instruction. -; Return TRUE if Rand generated successfully, or FALSE if not. -; -; BOOLEAN EFIAPI InternalX86RdRand16 (UINT16 *Rand); -;------------------------------------------------------------------------------ -InternalX86RdRand16 PROC - ; rdrand ax ; generate a 16 bit RN into eax, - ; CF=1 if RN generated ok, otherwise CF=0 - db 0fh, 0c7h, 0f0h ; rdrand r16: "0f c7 /6 ModRM:r/m(w)" - jc rn16_ok ; jmp if CF=1 - xor rax, rax ; reg=0 if CF=0 - ret ; return with failure status -rn16_ok: - mov [rcx], ax - mov rax, 1 - ret -InternalX86RdRand16 ENDP - -;------------------------------------------------------------------------------ -; Generates a 32 bit random number through RDRAND instruction. -; Return TRUE if Rand generated successfully, or FALSE if not. -; -; BOOLEAN EFIAPI InternalX86RdRand32 (UINT32 *Rand); -;------------------------------------------------------------------------------ -InternalX86RdRand32 PROC - ; rdrand eax ; generate a 32 bit RN into eax, - ; CF=1 if RN generated ok, otherwise CF=0 - db 0fh, 0c7h, 0f0h ; rdrand r32: "0f c7 /6 ModRM:r/m(w)" - jc rn32_ok ; jmp if CF=1 - xor rax, rax ; reg=0 if CF=0 - ret ; return with failure status -rn32_ok: - mov [rcx], eax - mov rax, 1 - ret -InternalX86RdRand32 ENDP - -;------------------------------------------------------------------------------ -; Generates a 64 bit random number through one RDRAND instruction. -; Return TRUE if Rand generated successfully, or FALSE if not. -; -; BOOLEAN EFIAPI InternalX86RdRand64 (UINT64 *Random); -;------------------------------------------------------------------------------ -InternalX86RdRand64 PROC - ; rdrand rax ; generate a 64 bit RN into rax, - ; CF=1 if RN generated ok, otherwise CF=0 - db 048h, 0fh, 0c7h, 0f0h ; rdrand r64: "REX.W + 0f c7 /6 ModRM:r/m(w)" - jc rn64_ok ; jmp if CF=1 - xor rax, rax ; reg=0 if CF=0 - ret ; return with failure status -rn64_ok: - mov [rcx], rax - mov rax, 1 - ret -InternalX86RdRand64 ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/ReadCr0.asm b/MdePkg/Library/BaseLib/X64/ReadCr0.asm deleted file mode 100644 index c3ff5b0772..0000000000 --- a/MdePkg/Library/BaseLib/X64/ReadCr0.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadCr0.Asm -; -; Abstract: -; -; AsmReadCr0 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadCr0 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadCr0 PROC - mov rax, cr0 - ret -AsmReadCr0 ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/ReadCr2.asm b/MdePkg/Library/BaseLib/X64/ReadCr2.asm deleted file mode 100644 index f1473b9ad4..0000000000 --- a/MdePkg/Library/BaseLib/X64/ReadCr2.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadCr2.Asm -; -; Abstract: -; -; AsmReadCr2 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadCr2 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadCr2 PROC - mov rax, cr2 - ret -AsmReadCr2 ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/ReadCr3.asm b/MdePkg/Library/BaseLib/X64/ReadCr3.asm deleted file mode 100644 index 432468e731..0000000000 --- a/MdePkg/Library/BaseLib/X64/ReadCr3.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadCr3.Asm -; -; Abstract: -; -; AsmReadCr3 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadCr3 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadCr3 PROC - mov rax, cr3 - ret -AsmReadCr3 ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/ReadCr4.asm b/MdePkg/Library/BaseLib/X64/ReadCr4.asm deleted file mode 100644 index 17d44996ea..0000000000 --- a/MdePkg/Library/BaseLib/X64/ReadCr4.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadCr4.Asm -; -; Abstract: -; -; AsmReadCr4 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadCr4 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadCr4 PROC - mov rax, cr4 - ret -AsmReadCr4 ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/ReadCs.asm b/MdePkg/Library/BaseLib/X64/ReadCs.asm deleted file mode 100644 index ac3040cd1b..0000000000 --- a/MdePkg/Library/BaseLib/X64/ReadCs.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadCs.Asm -; -; Abstract: -; -; AsmReadCs function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINT16 -; EFIAPI -; AsmReadCs ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadCs PROC - mov eax, cs - ret -AsmReadCs ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/ReadDr0.asm b/MdePkg/Library/BaseLib/X64/ReadDr0.asm deleted file mode 100644 index 8ac85ade8e..0000000000 --- a/MdePkg/Library/BaseLib/X64/ReadDr0.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadDr0.Asm -; -; Abstract: -; -; AsmReadDr0 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadDr0 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadDr0 PROC - mov rax, dr0 - ret -AsmReadDr0 ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/ReadDr1.asm b/MdePkg/Library/BaseLib/X64/ReadDr1.asm deleted file mode 100644 index 8b042e2d2e..0000000000 --- a/MdePkg/Library/BaseLib/X64/ReadDr1.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadDr1.Asm -; -; Abstract: -; -; AsmReadDr1 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadDr1 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadDr1 PROC - mov rax, dr1 - ret -AsmReadDr1 ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/ReadDr2.asm b/MdePkg/Library/BaseLib/X64/ReadDr2.asm deleted file mode 100644 index 9361756584..0000000000 --- a/MdePkg/Library/BaseLib/X64/ReadDr2.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadDr2.Asm -; -; Abstract: -; -; AsmReadDr2 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadDr2 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadDr2 PROC - mov rax, dr2 - ret -AsmReadDr2 ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/ReadDr3.asm b/MdePkg/Library/BaseLib/X64/ReadDr3.asm deleted file mode 100644 index a25fc9d97a..0000000000 --- a/MdePkg/Library/BaseLib/X64/ReadDr3.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadDr3.Asm -; -; Abstract: -; -; AsmReadDr3 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadDr3 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadDr3 PROC - mov rax, dr3 - ret -AsmReadDr3 ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/ReadDr4.asm b/MdePkg/Library/BaseLib/X64/ReadDr4.asm deleted file mode 100644 index dc6c5e9826..0000000000 --- a/MdePkg/Library/BaseLib/X64/ReadDr4.asm +++ /dev/null @@ -1,42 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadDr4.Asm -; -; Abstract: -; -; AsmReadDr4 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadDr4 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadDr4 PROC - ; - ; There's no obvious reason to access this register, since it's aliased to - ; DR7 when DE=0 or an exception generated when DE=1 - ; - DB 0fh, 21h, 0e0h - ret -AsmReadDr4 ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/ReadDr5.asm b/MdePkg/Library/BaseLib/X64/ReadDr5.asm deleted file mode 100644 index 7e313522f6..0000000000 --- a/MdePkg/Library/BaseLib/X64/ReadDr5.asm +++ /dev/null @@ -1,42 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadDr5.Asm -; -; Abstract: -; -; AsmReadDr5 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadDr5 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadDr5 PROC - ; - ; There's no obvious reason to access this register, since it's aliased to - ; DR7 when DE=0 or an exception generated when DE=1 - ; - DB 0fh, 21h, 0e8h - ret -AsmReadDr5 ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/ReadDr6.asm b/MdePkg/Library/BaseLib/X64/ReadDr6.asm deleted file mode 100644 index ee6b9ec695..0000000000 --- a/MdePkg/Library/BaseLib/X64/ReadDr6.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadDr6.Asm -; -; Abstract: -; -; AsmReadDr6 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadDr6 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadDr6 PROC - mov rax, dr6 - ret -AsmReadDr6 ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/ReadDr7.asm b/MdePkg/Library/BaseLib/X64/ReadDr7.asm deleted file mode 100644 index 7173057e9e..0000000000 --- a/MdePkg/Library/BaseLib/X64/ReadDr7.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadDr7.Asm -; -; Abstract: -; -; AsmReadDr7 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadDr7 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadDr7 PROC - mov rax, dr7 - ret -AsmReadDr7 ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/ReadDs.asm b/MdePkg/Library/BaseLib/X64/ReadDs.asm deleted file mode 100644 index d67512c3de..0000000000 --- a/MdePkg/Library/BaseLib/X64/ReadDs.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadDs.Asm -; -; Abstract: -; -; AsmReadDs function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINT16 -; EFIAPI -; AsmReadDs ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadDs PROC - mov eax, ds - ret -AsmReadDs ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/ReadEflags.asm b/MdePkg/Library/BaseLib/X64/ReadEflags.asm deleted file mode 100644 index b3ecc7cc16..0000000000 --- a/MdePkg/Library/BaseLib/X64/ReadEflags.asm +++ /dev/null @@ -1,39 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadEflags.Asm -; -; Abstract: -; -; AsmReadEflags function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmReadEflags ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadEflags PROC - pushfq - pop rax - ret -AsmReadEflags ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/ReadEs.asm b/MdePkg/Library/BaseLib/X64/ReadEs.asm deleted file mode 100644 index 76cffdcb5c..0000000000 --- a/MdePkg/Library/BaseLib/X64/ReadEs.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadEs.Asm -; -; Abstract: -; -; AsmReadEs function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINT16 -; EFIAPI -; AsmReadEs ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadEs PROC - mov eax, es - ret -AsmReadEs ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/ReadFs.asm b/MdePkg/Library/BaseLib/X64/ReadFs.asm deleted file mode 100644 index e91aa14aa6..0000000000 --- a/MdePkg/Library/BaseLib/X64/ReadFs.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadFs.Asm -; -; Abstract: -; -; AsmReadFs function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINT16 -; EFIAPI -; AsmReadFs ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadFs PROC - mov eax, fs - ret -AsmReadFs ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/ReadGdtr.asm b/MdePkg/Library/BaseLib/X64/ReadGdtr.asm deleted file mode 100644 index ebc60bd999..0000000000 --- a/MdePkg/Library/BaseLib/X64/ReadGdtr.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadGdtr.Asm -; -; Abstract: -; -; AsmReadGdtr function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; InternalX86ReadGdtr ( -; OUT IA32_DESCRIPTOR *Gdtr -; ); -;------------------------------------------------------------------------------ -InternalX86ReadGdtr PROC - sgdt fword ptr [rcx] - ret -InternalX86ReadGdtr ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/ReadGs.asm b/MdePkg/Library/BaseLib/X64/ReadGs.asm deleted file mode 100644 index f185c38761..0000000000 --- a/MdePkg/Library/BaseLib/X64/ReadGs.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadGs.Asm -; -; Abstract: -; -; AsmReadGs function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINT16 -; EFIAPI -; AsmReadGs ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadGs PROC - mov eax, gs - ret -AsmReadGs ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/ReadIdtr.asm b/MdePkg/Library/BaseLib/X64/ReadIdtr.asm deleted file mode 100644 index 4d53feb9d8..0000000000 --- a/MdePkg/Library/BaseLib/X64/ReadIdtr.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadIdtr.Asm -; -; Abstract: -; -; AsmReadIdtr function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; InternalX86ReadIdtr ( -; OUT IA32_DESCRIPTOR *Idtr -; ); -;------------------------------------------------------------------------------ -InternalX86ReadIdtr PROC - sidt fword ptr [rcx] - ret -InternalX86ReadIdtr ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/ReadLdtr.asm b/MdePkg/Library/BaseLib/X64/ReadLdtr.asm deleted file mode 100644 index dbe517e353..0000000000 --- a/MdePkg/Library/BaseLib/X64/ReadLdtr.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadLdtr.Asm -; -; Abstract: -; -; AsmReadLdtr function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINT16 -; EFIAPI -; AsmReadLdtr ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadLdtr PROC - sldt eax - ret -AsmReadLdtr ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/ReadMm0.asm b/MdePkg/Library/BaseLib/X64/ReadMm0.asm deleted file mode 100644 index 99212c747d..0000000000 --- a/MdePkg/Library/BaseLib/X64/ReadMm0.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadMm0.Asm -; -; Abstract: -; -; AsmReadMm0 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmReadMm0 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadMm0 PROC - ; - ; 64-bit MASM doesn't support MMX instructions, so use opcode here - ; - DB 48h, 0fh, 7eh, 0c0h - ret -AsmReadMm0 ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/ReadMm1.asm b/MdePkg/Library/BaseLib/X64/ReadMm1.asm deleted file mode 100644 index 7a9ae7c1ce..0000000000 --- a/MdePkg/Library/BaseLib/X64/ReadMm1.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadMm1.Asm -; -; Abstract: -; -; AsmReadMm1 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmReadMm1 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadMm1 PROC - ; - ; 64-bit MASM doesn't support MMX instructions, so use opcode here - ; - DB 48h, 0fh, 7eh, 0c8h - ret -AsmReadMm1 ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/ReadMm2.asm b/MdePkg/Library/BaseLib/X64/ReadMm2.asm deleted file mode 100644 index 337ac73dde..0000000000 --- a/MdePkg/Library/BaseLib/X64/ReadMm2.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadMm2.Asm -; -; Abstract: -; -; AsmReadMm2 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmReadMm2 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadMm2 PROC - ; - ; 64-bit MASM doesn't support MMX instructions, so use opcode here - ; - DB 48h, 0fh, 7eh, 0d0h - ret -AsmReadMm2 ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/ReadMm3.asm b/MdePkg/Library/BaseLib/X64/ReadMm3.asm deleted file mode 100644 index 266e29a9d1..0000000000 --- a/MdePkg/Library/BaseLib/X64/ReadMm3.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadMm3.Asm -; -; Abstract: -; -; AsmReadMm3 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmReadMm3 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadMm3 PROC - ; - ; 64-bit MASM doesn't support MMX instructions, so use opcode here - ; - DB 48h, 0fh, 7eh, 0d8h - ret -AsmReadMm3 ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/ReadMm4.asm b/MdePkg/Library/BaseLib/X64/ReadMm4.asm deleted file mode 100644 index 9cc7435807..0000000000 --- a/MdePkg/Library/BaseLib/X64/ReadMm4.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadMm4.Asm -; -; Abstract: -; -; AsmReadMm4 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmReadMm4 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadMm4 PROC - ; - ; 64-bit MASM doesn't support MMX instructions, so use opcode here - ; - DB 48h, 0fh, 7eh, 0e0h - ret -AsmReadMm4 ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/ReadMm5.asm b/MdePkg/Library/BaseLib/X64/ReadMm5.asm deleted file mode 100644 index b66522535f..0000000000 --- a/MdePkg/Library/BaseLib/X64/ReadMm5.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadMm5.Asm -; -; Abstract: -; -; AsmReadMm5 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmReadMm5 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadMm5 PROC - ; - ; 64-bit MASM doesn't support MMX instructions, so use opcode here - ; - DB 48h, 0fh, 7eh, 0e8h - ret -AsmReadMm5 ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/ReadMm6.asm b/MdePkg/Library/BaseLib/X64/ReadMm6.asm deleted file mode 100644 index 1e3ebc5d8e..0000000000 --- a/MdePkg/Library/BaseLib/X64/ReadMm6.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadMm6.Asm -; -; Abstract: -; -; AsmReadMm6 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmReadMm6 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadMm6 PROC - ; - ; 64-bit MASM doesn't support MMX instructions, so use opcode here - ; - DB 48h, 0fh, 7eh, 0f0h - ret -AsmReadMm6 ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/ReadMm7.asm b/MdePkg/Library/BaseLib/X64/ReadMm7.asm deleted file mode 100644 index 8228672135..0000000000 --- a/MdePkg/Library/BaseLib/X64/ReadMm7.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadMm7.Asm -; -; Abstract: -; -; AsmReadMm7 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmReadMm7 ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadMm7 PROC - ; - ; 64-bit MASM doesn't support MMX instructions, so use opcode here - ; - DB 48h, 0fh, 7eh, 0f8h - ret -AsmReadMm7 ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/ReadMsr64.asm b/MdePkg/Library/BaseLib/X64/ReadMsr64.asm deleted file mode 100644 index 878ed18245..0000000000 --- a/MdePkg/Library/BaseLib/X64/ReadMsr64.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadMsr64.Asm -; -; Abstract: -; -; AsmReadMsr64 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmReadMsr64 ( -; IN UINT32 Index -; ); -;------------------------------------------------------------------------------ -AsmReadMsr64 PROC - rdmsr ; edx & eax are zero extended - shl rdx, 20h - or rax, rdx - ret -AsmReadMsr64 ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/ReadPmc.asm b/MdePkg/Library/BaseLib/X64/ReadPmc.asm deleted file mode 100644 index 1b74f67e72..0000000000 --- a/MdePkg/Library/BaseLib/X64/ReadPmc.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadPmc.Asm -; -; Abstract: -; -; AsmReadPmc function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmReadPmc ( -; IN UINT32 PmcIndex -; ); -;------------------------------------------------------------------------------ -AsmReadPmc PROC - rdpmc - shl rdx, 20h - or rax, rdx - ret -AsmReadPmc ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/ReadSs.asm b/MdePkg/Library/BaseLib/X64/ReadSs.asm deleted file mode 100644 index 8f308c49af..0000000000 --- a/MdePkg/Library/BaseLib/X64/ReadSs.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadSs.Asm -; -; Abstract: -; -; AsmReadSs function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINT16 -; EFIAPI -; AsmReadSs ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadSs PROC - mov eax, ss - ret -AsmReadSs ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/ReadTr.asm b/MdePkg/Library/BaseLib/X64/ReadTr.asm deleted file mode 100644 index a114f53146..0000000000 --- a/MdePkg/Library/BaseLib/X64/ReadTr.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadTr.Asm -; -; Abstract: -; -; AsmReadTr function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINT16 -; EFIAPI -; AsmReadTr ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadTr PROC - str eax - ret -AsmReadTr ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/ReadTsc.asm b/MdePkg/Library/BaseLib/X64/ReadTsc.asm deleted file mode 100644 index d792bfb204..0000000000 --- a/MdePkg/Library/BaseLib/X64/ReadTsc.asm +++ /dev/null @@ -1,40 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ReadTsc.Asm -; -; Abstract: -; -; AsmReadTsc function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmReadTsc ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmReadTsc PROC - rdtsc - shl rdx, 20h - or rax, rdx - ret -AsmReadTsc ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/SetJump.asm b/MdePkg/Library/BaseLib/X64/SetJump.asm deleted file mode 100644 index 13cb323fc0..0000000000 --- a/MdePkg/Library/BaseLib/X64/SetJump.asm +++ /dev/null @@ -1,66 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; SetJump.Asm -; -; Abstract: -; -; Implementation of SetJump() on x64. -; -;------------------------------------------------------------------------------ - - .code - -EXTERN InternalAssertJumpBuffer:PROC - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; SetJump ( -; OUT BASE_LIBRARY_JUMP_BUFFER *JumpBuffer -; ); -;------------------------------------------------------------------------------ -SetJump PROC - push rcx - add rsp, -20h - call InternalAssertJumpBuffer - add rsp, 20h - pop rcx - pop rdx - mov [rcx], rbx - mov [rcx + 8], rsp - mov [rcx + 10h], rbp - mov [rcx + 18h], rdi - mov [rcx + 20h], rsi - mov [rcx + 28h], r12 - mov [rcx + 30h], r13 - mov [rcx + 38h], r14 - mov [rcx + 40h], r15 - mov [rcx + 48h], rdx - ; save non-volatile fp registers - stmxcsr [rcx + 50h] - movdqu [rcx + 58h], xmm6 - movdqu [rcx + 68h], xmm7 - movdqu [rcx + 78h], xmm8 - movdqu [rcx + 88h], xmm9 - movdqu [rcx + 98h], xmm10 - movdqu [rcx + 0A8h], xmm11 - movdqu [rcx + 0B8h], xmm12 - movdqu [rcx + 0C8h], xmm13 - movdqu [rcx + 0D8h], xmm14 - movdqu [rcx + 0E8h], xmm15 - xor rax, rax - jmp rdx -SetJump ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/SwitchStack.asm b/MdePkg/Library/BaseLib/X64/SwitchStack.asm deleted file mode 100644 index 0f802b0174..0000000000 --- a/MdePkg/Library/BaseLib/X64/SwitchStack.asm +++ /dev/null @@ -1,51 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; SwitchStack.Asm -; -; Abstract: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; Routine Description: -; -; Routine for switching stacks with 2 parameters -; -; Arguments: -; -; (rcx) EntryPoint - Entry point with new stack. -; (rdx) Context1 - Parameter1 for entry point. -; (r8) Context2 - Parameter2 for entry point. -; (r9) NewStack - The pointer to new stack. -; -; Returns: -; -; None -; -;------------------------------------------------------------------------------ -InternalSwitchStack PROC - mov rax, rcx - mov rcx, rdx - mov rdx, r8 - ; - ; Reserve space for register parameters (rcx, rdx, r8 & r9) on the stack, - ; in case the callee wishes to spill them. - ; - lea rsp, [r9 - 20h] - call rax -InternalSwitchStack ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/Thunk16.asm b/MdePkg/Library/BaseLib/X64/Thunk16.asm deleted file mode 100644 index e01de272d2..0000000000 --- a/MdePkg/Library/BaseLib/X64/Thunk16.asm +++ /dev/null @@ -1,315 +0,0 @@ - -#include "BaseLibInternals.h" - -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; Thunk.asm -; -; Abstract: -; -; Real mode thunk -; -;------------------------------------------------------------------------------ - -EXTERNDEF m16Start:BYTE -EXTERNDEF m16Size:WORD -EXTERNDEF mThunk16Attr:WORD -EXTERNDEF m16Gdt:WORD -EXTERNDEF m16GdtrBase:WORD -EXTERNDEF mTransition:WORD - -IA32_REGS STRUC 4t -_EDI DD ? -_ESI DD ? -_EBP DD ? -_ESP DD ? -_EBX DD ? -_EDX DD ? -_ECX DD ? -_EAX DD ? -_DS DW ? -_ES DW ? -_FS DW ? -_GS DW ? -_EFLAGS DQ ? -_EIP DD ? -_CS DW ? -_SS DW ? -IA32_REGS ENDS - - .const - -m16Size DW InternalAsmThunk16 - m16Start -mThunk16Attr DW _ThunkAttr - m16Start -m16Gdt DW _NullSeg - m16Start -m16GdtrBase DW _16GdtrBase - m16Start -mTransition DW _EntryPoint - m16Start - - .code - -m16Start LABEL BYTE - -SavedGdt LABEL FWORD - DW ? - DQ ? - -;------------------------------------------------------------------------------ -; _BackFromUserCode() takes control in real mode after 'retf' has been executed -; by user code. It will be shadowed to somewhere in memory below 1MB. -;------------------------------------------------------------------------------ -_BackFromUserCode PROC - ; - ; The order of saved registers on the stack matches the order they appears - ; in IA32_REGS structure. This facilitates wrapper function to extract them - ; into that structure. - ; - ; Some instructions for manipulation of segment registers have to be written - ; in opcode since 64-bit MASM prevents accesses to those registers. - ; - DB 16h ; push ss - DB 0eh ; push cs - DB 66h - call @Base ; push eip -@Base: - DB 66h - push 0 ; reserved high order 32 bits of EFlags - pushf ; pushfd actually - cli ; disable interrupts - push gs - push fs - DB 6 ; push es - DB 1eh ; push ds - DB 66h, 60h ; pushad - DB 66h, 0bah ; mov edx, imm32 -_ThunkAttr DD ? - test dl, THUNK_ATTRIBUTE_DISABLE_A20_MASK_INT_15 - jz @1 - mov eax, 15cd2401h ; mov ax, 2401h & int 15h - cli ; disable interrupts - jnc @2 -@1: - test dl, THUNK_ATTRIBUTE_DISABLE_A20_MASK_KBD_CTRL - jz @2 - in al, 92h - or al, 2 - out 92h, al ; deactivate A20M# -@2: - xor ax, ax ; xor eax, eax - mov eax, ss ; mov ax, ss - lea bp, [esp + sizeof (IA32_REGS)] - ; - ; rsi in the following 2 instructions is indeed bp in 16-bit code - ; - mov word ptr (IA32_REGS ptr [rsi - sizeof (IA32_REGS)])._ESP, bp - DB 66h - mov ebx, (IA32_REGS ptr [rsi - sizeof (IA32_REGS)])._EIP - shl ax, 4 ; shl eax, 4 - add bp, ax ; add ebp, eax - mov ax, cs - shl ax, 4 - lea ax, [eax + ebx + (@64BitCode - @Base)] - DB 66h, 2eh, 89h, 87h ; mov cs:[bx + (@64Eip - @Base)], eax - DW @64Eip - @Base - DB 66h, 0b8h ; mov eax, imm32 -SavedCr4 DD ? - mov cr4, rax - ; - ; rdi in the instruction below is indeed bx in 16-bit code - ; - DB 66h, 2eh ; 2eh is "cs:" segment override - lgdt fword ptr [rdi + (SavedGdt - @Base)] - DB 66h - mov ecx, 0c0000080h - rdmsr - or ah, 1 - wrmsr - DB 66h, 0b8h ; mov eax, imm32 -SavedCr0 DD ? - mov cr0, rax - DB 66h, 0eah ; jmp far cs:@64Bit -@64Eip DD ? -SavedCs DW ? -@64BitCode: - db 090h - db 048h, 0bch ; mov rsp, imm64 -SavedSp DQ ? ; restore stack - nop - ret -_BackFromUserCode ENDP - -_EntryPoint DD _ToUserCode - m16Start - DW CODE16 -_16Gdtr LABEL FWORD - DW GDT_SIZE - 1 -_16GdtrBase DQ _NullSeg -_16Idtr FWORD (1 SHL 10) - 1 - -;------------------------------------------------------------------------------ -; _ToUserCode() takes control in real mode before passing control to user code. -; It will be shadowed to somewhere in memory below 1MB. -;------------------------------------------------------------------------------ -_ToUserCode PROC - mov ss, edx ; set new segment selectors - mov ds, edx - mov es, edx - mov fs, edx - mov gs, edx - DB 66h - mov ecx, 0c0000080h - mov cr0, rax ; real mode starts at next instruction - rdmsr - and ah, NOT 1 - wrmsr - mov cr4, rbp - mov ss, esi ; set up 16-bit stack segment - mov sp, bx ; set up 16-bit stack pointer - DB 66h ; make the following call 32-bit - call @Base ; push eip -@Base: - pop bp ; ebp <- address of @Base - push [esp + sizeof (IA32_REGS) + 2] - lea eax, [rsi + (@RealMode - @Base)] ; rsi is "bp" in 16-bit code - push rax - retf ; execution begins at next instruction -@RealMode: - DB 66h, 2eh ; CS and operand size override - lidt fword ptr [rsi + (_16Idtr - @Base)] - DB 66h, 61h ; popad - DB 1fh ; pop ds - DB 07h ; pop es - pop fs - pop gs - popf ; popfd - lea sp, [esp + 4] ; skip high order 32 bits of EFlags - DB 66h ; make the following retf 32-bit - retf ; transfer control to user code -_ToUserCode ENDP - -CODE16 = _16Code - $ -DATA16 = _16Data - $ -DATA32 = _32Data - $ - -_NullSeg DQ 0 -_16Code LABEL QWORD - DW -1 - DW 0 - DB 0 - DB 9bh - DB 8fh ; 16-bit segment, 4GB limit - DB 0 -_16Data LABEL QWORD - DW -1 - DW 0 - DB 0 - DB 93h - DB 8fh ; 16-bit segment, 4GB limit - DB 0 -_32Data LABEL QWORD - DW -1 - DW 0 - DB 0 - DB 93h - DB 0cfh ; 16-bit segment, 4GB limit - DB 0 - -GDT_SIZE = $ - _NullSeg - -;------------------------------------------------------------------------------ -; IA32_REGISTER_SET * -; EFIAPI -; InternalAsmThunk16 ( -; IN IA32_REGISTER_SET *RegisterSet, -; IN OUT VOID *Transition -; ); -;------------------------------------------------------------------------------ -InternalAsmThunk16 PROC USES rbp rbx rsi rdi - mov rbx, ds - push rbx ; Save ds segment register on the stack - mov rbx, es - push rbx ; Save es segment register on the stack - mov rbx, ss - push rbx ; Save ss segment register on the stack - - push fs - push gs - mov rsi, rcx - movzx r8d, (IA32_REGS ptr [rsi])._SS - mov edi, (IA32_REGS ptr [rsi])._ESP - lea rdi, [edi - (sizeof (IA32_REGS) + 4)] - imul eax, r8d, 16 ; eax <- r8d(stack segment) * 16 - mov ebx, edi ; ebx <- stack for 16-bit code - push sizeof (IA32_REGS) / 4 - add edi, eax ; edi <- linear address of 16-bit stack - pop rcx - rep movsd ; copy RegSet - lea ecx, [rdx + (SavedCr4 - m16Start)] - mov eax, edx ; eax <- transition code address - and edx, 0fh - shl eax, 12 ; segment address in high order 16 bits - lea ax, [rdx + (_BackFromUserCode - m16Start)] ; offset address - stosd ; [edi] <- return address of user code - - sgdt fword ptr [rsp + 60h] ; save GDT stack in argument space - movzx r10, word ptr [rsp + 60h] ; r10 <- GDT limit - lea r11, [rcx + (InternalAsmThunk16 - SavedCr4) + 0xf] - and r11, 0xfffffff0 ; r11 <- 16-byte aligned shadowed GDT table in real mode buffer - - mov word ptr [rcx + (SavedGdt - SavedCr4)], r10w ; save the limit of shadowed GDT table - mov qword ptr [rcx + (SavedGdt - SavedCr4) + 2], r11 ; save the base address of shadowed GDT table - - mov rsi, qword ptr [rsp + 62h] ; rsi <- the original GDT base address - xchg rcx, r10 ; save rcx to r10 and initialize rcx to be the limit of GDT table - inc rcx ; rcx <- the size of memory to copy - xchg rdi, r11 ; save rdi to r11 and initialize rdi to the base address of shadowed GDT table - rep movsb ; perform memory copy to shadow GDT table - mov rcx, r10 ; restore the orignal rcx before memory copy - mov rdi, r11 ; restore the original rdi before memory copy - - sidt fword ptr [rsp + 50h] ; save IDT stack in argument space - mov rax, cr0 - mov [rcx + (SavedCr0 - SavedCr4)], eax - and eax, 7ffffffeh ; clear PE, PG bits - mov rbp, cr4 - mov [rcx], ebp ; save CR4 in SavedCr4 - and ebp, NOT 30h ; clear PAE, PSE bits - mov esi, r8d ; esi <- 16-bit stack segment - DB 6ah, DATA32 ; push DATA32 - pop rdx ; rdx <- 32-bit data segment selector - lgdt fword ptr [rcx + (_16Gdtr - SavedCr4)] - mov ss, edx - pushfq - lea edx, [rdx + DATA16 - DATA32] - lea r8, @RetFromRealMode - push r8 - mov r8d, cs - mov [rcx + (SavedCs - SavedCr4)], r8w - mov [rcx + (SavedSp - SavedCr4)], rsp - jmp fword ptr [rcx + (_EntryPoint - SavedCr4)] -@RetFromRealMode: - popfq - lgdt fword ptr [rsp + 60h] ; restore protected mode GDTR - lidt fword ptr [rsp + 50h] ; restore protected mode IDTR - lea eax, [rbp - sizeof (IA32_REGS)] - pop gs - pop fs - pop rbx - mov ss, rbx - pop rbx - mov es, rbx - pop rbx - mov ds, rbx - ret -InternalAsmThunk16 ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/Wbinvd.asm b/MdePkg/Library/BaseLib/X64/Wbinvd.asm deleted file mode 100644 index b0807e088f..0000000000 --- a/MdePkg/Library/BaseLib/X64/Wbinvd.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; Wbinvd.Asm -; -; Abstract: -; -; AsmWbinvd function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmWbinvd ( -; VOID -; ); -;------------------------------------------------------------------------------ -AsmWbinvd PROC - wbinvd - ret -AsmWbinvd ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/WriteCr0.asm b/MdePkg/Library/BaseLib/X64/WriteCr0.asm deleted file mode 100644 index 98fef9cd61..0000000000 --- a/MdePkg/Library/BaseLib/X64/WriteCr0.asm +++ /dev/null @@ -1,39 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteCr0.Asm -; -; Abstract: -; -; AsmWriteCr0 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteCr0 ( -; UINTN Cr0 -; ); -;------------------------------------------------------------------------------ -AsmWriteCr0 PROC - mov cr0, rcx - mov rax, rcx - ret -AsmWriteCr0 ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/WriteCr2.asm b/MdePkg/Library/BaseLib/X64/WriteCr2.asm deleted file mode 100644 index 3d77d6aef2..0000000000 --- a/MdePkg/Library/BaseLib/X64/WriteCr2.asm +++ /dev/null @@ -1,39 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteCr2.Asm -; -; Abstract: -; -; AsmWriteCr2 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteCr2 ( -; UINTN Cr2 -; ); -;------------------------------------------------------------------------------ -AsmWriteCr2 PROC - mov cr2, rcx - mov rax, rcx - ret -AsmWriteCr2 ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/WriteCr3.asm b/MdePkg/Library/BaseLib/X64/WriteCr3.asm deleted file mode 100644 index 9b39938150..0000000000 --- a/MdePkg/Library/BaseLib/X64/WriteCr3.asm +++ /dev/null @@ -1,39 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteCr3.Asm -; -; Abstract: -; -; AsmWriteCr3 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteCr3 ( -; UINTN Cr3 -; ); -;------------------------------------------------------------------------------ -AsmWriteCr3 PROC - mov cr3, rcx - mov rax, rcx - ret -AsmWriteCr3 ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/WriteCr4.asm b/MdePkg/Library/BaseLib/X64/WriteCr4.asm deleted file mode 100644 index 145584257e..0000000000 --- a/MdePkg/Library/BaseLib/X64/WriteCr4.asm +++ /dev/null @@ -1,39 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteCr4.Asm -; -; Abstract: -; -; AsmWriteCr4 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteCr4 ( -; UINTN Cr4 -; ); -;------------------------------------------------------------------------------ -AsmWriteCr4 PROC - mov cr4, rcx - mov rax, rcx - ret -AsmWriteCr4 ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/WriteDr0.asm b/MdePkg/Library/BaseLib/X64/WriteDr0.asm deleted file mode 100644 index dafe9ab169..0000000000 --- a/MdePkg/Library/BaseLib/X64/WriteDr0.asm +++ /dev/null @@ -1,39 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteDr0.Asm -; -; Abstract: -; -; AsmWriteDr0 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteDr0 ( -; IN UINTN Value -; ); -;------------------------------------------------------------------------------ -AsmWriteDr0 PROC - mov dr0, rcx - mov rax, rcx - ret -AsmWriteDr0 ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/WriteDr1.asm b/MdePkg/Library/BaseLib/X64/WriteDr1.asm deleted file mode 100644 index 7167f5e5c2..0000000000 --- a/MdePkg/Library/BaseLib/X64/WriteDr1.asm +++ /dev/null @@ -1,39 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteDr1.Asm -; -; Abstract: -; -; AsmWriteDr1 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteDr1 ( -; IN UINTN Value -; ); -;------------------------------------------------------------------------------ -AsmWriteDr1 PROC - mov dr1, rcx - mov rax, rcx - ret -AsmWriteDr1 ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/WriteDr2.asm b/MdePkg/Library/BaseLib/X64/WriteDr2.asm deleted file mode 100644 index c14ba34b15..0000000000 --- a/MdePkg/Library/BaseLib/X64/WriteDr2.asm +++ /dev/null @@ -1,39 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteDr2.Asm -; -; Abstract: -; -; AsmWriteDr2 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteDr2 ( -; IN UINTN Value -; ); -;------------------------------------------------------------------------------ -AsmWriteDr2 PROC - mov dr2, rcx - mov rax, rcx - ret -AsmWriteDr2 ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/WriteDr3.asm b/MdePkg/Library/BaseLib/X64/WriteDr3.asm deleted file mode 100644 index 8873916c4e..0000000000 --- a/MdePkg/Library/BaseLib/X64/WriteDr3.asm +++ /dev/null @@ -1,39 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteDr3.Asm -; -; Abstract: -; -; AsmWriteDr3 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteDr3 ( -; IN UINTN Value -; ); -;------------------------------------------------------------------------------ -AsmWriteDr3 PROC - mov dr3, rcx - mov rax, rcx - ret -AsmWriteDr3 ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/WriteDr4.asm b/MdePkg/Library/BaseLib/X64/WriteDr4.asm deleted file mode 100644 index 4803525dd9..0000000000 --- a/MdePkg/Library/BaseLib/X64/WriteDr4.asm +++ /dev/null @@ -1,43 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteDr4.Asm -; -; Abstract: -; -; AsmWriteDr4 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteDr4 ( -; IN UINTN Value -; ); -;------------------------------------------------------------------------------ -AsmWriteDr4 PROC - ; - ; There's no obvious reason to access this register, since it's aliased to - ; DR6 when DE=0 or an exception generated when DE=1 - ; - DB 0fh, 23h, 0e1h - mov rax, rcx - ret -AsmWriteDr4 ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/WriteDr5.asm b/MdePkg/Library/BaseLib/X64/WriteDr5.asm deleted file mode 100644 index 2cdb328771..0000000000 --- a/MdePkg/Library/BaseLib/X64/WriteDr5.asm +++ /dev/null @@ -1,43 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteDr5.Asm -; -; Abstract: -; -; AsmWriteDr5 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteDr5 ( -; IN UINTN Value -; ); -;------------------------------------------------------------------------------ -AsmWriteDr5 PROC - ; - ; There's no obvious reason to access this register, since it's aliased to - ; DR7 when DE=0 or an exception generated when DE=1 - ; - DB 0fh, 23h, 0e9h - mov rax, rcx - ret -AsmWriteDr5 ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/WriteDr6.asm b/MdePkg/Library/BaseLib/X64/WriteDr6.asm deleted file mode 100644 index 22c9c871c4..0000000000 --- a/MdePkg/Library/BaseLib/X64/WriteDr6.asm +++ /dev/null @@ -1,39 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteDr6.Asm -; -; Abstract: -; -; AsmWriteDr6 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteDr6 ( -; IN UINTN Value -; ); -;------------------------------------------------------------------------------ -AsmWriteDr6 PROC - mov dr6, rcx - mov rax, rcx - ret -AsmWriteDr6 ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/WriteDr7.asm b/MdePkg/Library/BaseLib/X64/WriteDr7.asm deleted file mode 100644 index b55afd39af..0000000000 --- a/MdePkg/Library/BaseLib/X64/WriteDr7.asm +++ /dev/null @@ -1,39 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteDr7.Asm -; -; Abstract: -; -; AsmWriteDr7 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINTN -; EFIAPI -; AsmWriteDr7 ( -; IN UINTN Value -; ); -;------------------------------------------------------------------------------ -AsmWriteDr7 PROC - mov dr7, rcx - mov rax, rcx - ret -AsmWriteDr7 ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/WriteGdtr.asm b/MdePkg/Library/BaseLib/X64/WriteGdtr.asm deleted file mode 100644 index 0cc8b7ad7a..0000000000 --- a/MdePkg/Library/BaseLib/X64/WriteGdtr.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteGdtr.Asm -; -; Abstract: -; -; AsmWriteGdtr function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; InternalX86WriteGdtr ( -; IN CONST IA32_DESCRIPTOR *Idtr -; ); -;------------------------------------------------------------------------------ -InternalX86WriteGdtr PROC - lgdt fword ptr [rcx] - ret -InternalX86WriteGdtr ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/WriteIdtr.asm b/MdePkg/Library/BaseLib/X64/WriteIdtr.asm deleted file mode 100644 index 01ca1c0b59..0000000000 --- a/MdePkg/Library/BaseLib/X64/WriteIdtr.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteIdtr.Asm -; -; Abstract: -; -; AsmWriteIdtr function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; InternalX86WriteIdtr ( -; IN CONST IA32_DESCRIPTOR *Idtr -; ); -;------------------------------------------------------------------------------ -InternalX86WriteIdtr PROC - pushfq - cli - lidt fword ptr [rcx] - popfq - ret -InternalX86WriteIdtr ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/WriteLdtr.asm b/MdePkg/Library/BaseLib/X64/WriteLdtr.asm deleted file mode 100644 index af6786389b..0000000000 --- a/MdePkg/Library/BaseLib/X64/WriteLdtr.asm +++ /dev/null @@ -1,38 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteLdtr.Asm -; -; Abstract: -; -; AsmWriteLdtr function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmWriteLdtr ( -; IN UINT16 Ldtr -; ); -;------------------------------------------------------------------------------ -AsmWriteLdtr PROC - lldt cx - ret -AsmWriteLdtr ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/WriteMm0.asm b/MdePkg/Library/BaseLib/X64/WriteMm0.asm deleted file mode 100644 index f40db0339d..0000000000 --- a/MdePkg/Library/BaseLib/X64/WriteMm0.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteMm0.Asm -; -; Abstract: -; -; AsmWriteMm0 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmWriteMm0 ( -; IN UINT64 Value -; ); -;------------------------------------------------------------------------------ -AsmWriteMm0 PROC - ; - ; 64-bit MASM doesn't support MMX instructions, so use opcode here - ; - DB 48h, 0fh, 6eh, 0c1h - ret -AsmWriteMm0 ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/WriteMm1.asm b/MdePkg/Library/BaseLib/X64/WriteMm1.asm deleted file mode 100644 index ec17208ec4..0000000000 --- a/MdePkg/Library/BaseLib/X64/WriteMm1.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteMm1.Asm -; -; Abstract: -; -; AsmWriteMm1 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmWriteMm1 ( -; IN UINT64 Value -; ); -;------------------------------------------------------------------------------ -AsmWriteMm1 PROC - ; - ; 64-bit MASM doesn't support MMX instructions, so use opcode here - ; - DB 48h, 0fh, 6eh, 0c9h - ret -AsmWriteMm1 ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/WriteMm2.asm b/MdePkg/Library/BaseLib/X64/WriteMm2.asm deleted file mode 100644 index 38c0d5ed26..0000000000 --- a/MdePkg/Library/BaseLib/X64/WriteMm2.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteMm2.Asm -; -; Abstract: -; -; AsmWriteMm2 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmWriteMm2 ( -; IN UINT64 Value -; ); -;------------------------------------------------------------------------------ -AsmWriteMm2 PROC - ; - ; 64-bit MASM doesn't support MMX instructions, so use opcode here - ; - DB 48h, 0fh, 6eh, 0d1h - ret -AsmWriteMm2 ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/WriteMm3.asm b/MdePkg/Library/BaseLib/X64/WriteMm3.asm deleted file mode 100644 index 5f5bbdd482..0000000000 --- a/MdePkg/Library/BaseLib/X64/WriteMm3.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteMm3.Asm -; -; Abstract: -; -; AsmWriteMm3 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmWriteMm3 ( -; IN UINT64 Value -; ); -;------------------------------------------------------------------------------ -AsmWriteMm3 PROC - ; - ; 64-bit MASM doesn't support MMX instructions, so use opcode here - ; - DB 48h, 0fh, 6eh, 0d9h - ret -AsmWriteMm3 ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/WriteMm4.asm b/MdePkg/Library/BaseLib/X64/WriteMm4.asm deleted file mode 100644 index 7f533137f8..0000000000 --- a/MdePkg/Library/BaseLib/X64/WriteMm4.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteMm4.Asm -; -; Abstract: -; -; AsmWriteMm4 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmWriteMm4 ( -; IN UINT64 Value -; ); -;------------------------------------------------------------------------------ -AsmWriteMm4 PROC - ; - ; 64-bit MASM doesn't support MMX instructions, so use opcode here - ; - DB 48h, 0fh, 6eh, 0e1h - ret -AsmWriteMm4 ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/WriteMm5.asm b/MdePkg/Library/BaseLib/X64/WriteMm5.asm deleted file mode 100644 index ea30bc14a4..0000000000 --- a/MdePkg/Library/BaseLib/X64/WriteMm5.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteMm5.Asm -; -; Abstract: -; -; AsmWriteMm5 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmWriteMm5 ( -; IN UINT64 Value -; ); -;------------------------------------------------------------------------------ -AsmWriteMm5 PROC - ; - ; 64-bit MASM doesn't support MMX instructions, so use opcode here - ; - DB 48h, 0fh, 6eh, 0e9h - ret -AsmWriteMm5 ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/WriteMm6.asm b/MdePkg/Library/BaseLib/X64/WriteMm6.asm deleted file mode 100644 index aa926ae710..0000000000 --- a/MdePkg/Library/BaseLib/X64/WriteMm6.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteMm6.Asm -; -; Abstract: -; -; AsmWriteMm6 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmWriteMm6 ( -; IN UINT64 Value -; ); -;------------------------------------------------------------------------------ -AsmWriteMm6 PROC - ; - ; 64-bit MASM doesn't support MMX instructions, so use opcode here - ; - DB 48h, 0fh, 6eh, 0f1h - ret -AsmWriteMm6 ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/WriteMm7.asm b/MdePkg/Library/BaseLib/X64/WriteMm7.asm deleted file mode 100644 index 652e041452..0000000000 --- a/MdePkg/Library/BaseLib/X64/WriteMm7.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteMm7.Asm -; -; Abstract: -; -; AsmWriteMm7 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; AsmWriteMm7 ( -; IN UINT64 Value -; ); -;------------------------------------------------------------------------------ -AsmWriteMm7 PROC - ; - ; 64-bit MASM doesn't support MMX instructions, so use opcode here - ; - DB 48h, 0fh, 6eh, 0f9h - ret -AsmWriteMm7 ENDP - - END diff --git a/MdePkg/Library/BaseLib/X64/WriteMsr64.asm b/MdePkg/Library/BaseLib/X64/WriteMsr64.asm deleted file mode 100644 index 19ef572845..0000000000 --- a/MdePkg/Library/BaseLib/X64/WriteMsr64.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; WriteMsr64.Asm -; -; Abstract: -; -; AsmWriteMsr64 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; AsmWriteMsr64 ( -; IN UINT32 Index, -; IN UINT64 Value -; ); -;------------------------------------------------------------------------------ -AsmWriteMsr64 PROC - mov rax, rdx ; meanwhile, rax <- return value - shr rdx, 20h ; edx:eax contains the value to write - wrmsr - ret -AsmWriteMsr64 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibMmx/BaseMemoryLibMmx.inf b/MdePkg/Library/BaseMemoryLibMmx/BaseMemoryLibMmx.inf index af08b7d6d9..da6589a6a4 100644 --- a/MdePkg/Library/BaseMemoryLibMmx/BaseMemoryLibMmx.inf +++ b/MdePkg/Library/BaseMemoryLibMmx/BaseMemoryLibMmx.inf @@ -4,7 +4,7 @@ # Base Memory Library that uses MMX registers for high performance. # Optimized for use in DXE. # -# Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
+# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -74,52 +74,30 @@ Ia32/CopyMem.nasm Ia32/CopyMem.S Ia32/ScanMem64.nasm - Ia32/ScanMem64.asm Ia32/ScanMem32.nasm - Ia32/ScanMem32.asm Ia32/ScanMem16.nasm - Ia32/ScanMem16.asm Ia32/ScanMem8.nasm - Ia32/ScanMem8.asm Ia32/CompareMem.nasm - Ia32/CompareMem.asm Ia32/SetMem64.nasm - Ia32/SetMem64.asm Ia32/SetMem32.nasm - Ia32/SetMem32.asm Ia32/SetMem16.nasm - Ia32/SetMem16.asm Ia32/ZeroMem.nasm - Ia32/ZeroMem.asm Ia32/SetMem.nasm - Ia32/SetMem.asm Ia32/CopyMem.nasm - Ia32/CopyMem.asm Ia32/IsZeroBuffer.nasm [Sources.X64] X64/ZeroMem.nasm - X64/ZeroMem.asm X64/ScanMem64.nasm - X64/ScanMem64.asm X64/ScanMem32.nasm - X64/ScanMem32.asm X64/ScanMem16.nasm - X64/ScanMem16.asm X64/ScanMem8.nasm - X64/ScanMem8.asm X64/CompareMem.nasm - X64/CompareMem.asm X64/SetMem64.nasm - X64/SetMem64.asm X64/SetMem32.nasm - X64/SetMem32.asm X64/SetMem16.nasm - X64/SetMem16.asm X64/SetMem.nasm - X64/SetMem.asm X64/CopyMem.nasm - X64/CopyMem.asm X64/ScanMem64.nasm X64/ScanMem64.S X64/ScanMem32.nasm diff --git a/MdePkg/Library/BaseMemoryLibMmx/Ia32/CompareMem.asm b/MdePkg/Library/BaseMemoryLibMmx/Ia32/CompareMem.asm deleted file mode 100644 index 5a0792d592..0000000000 --- a/MdePkg/Library/BaseMemoryLibMmx/Ia32/CompareMem.asm +++ /dev/null @@ -1,56 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; CompareMem.Asm -; -; Abstract: -; -; CompareMem function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; INTN -; EFIAPI -; InternalMemCompareMem ( -; IN CONST VOID *DestinationBuffer, -; IN CONST VOID *SourceBuffer, -; IN UINTN Length -; ); -;------------------------------------------------------------------------------ -InternalMemCompareMem PROC USES esi edi - mov esi, [esp + 12] - mov edi, [esp + 16] - mov ecx, [esp + 20] - repe cmpsb - movzx eax, byte ptr [esi - 1] - movzx edx, byte ptr [edi - 1] - sub eax, edx - ret -InternalMemCompareMem ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibMmx/Ia32/CopyMem.asm b/MdePkg/Library/BaseMemoryLibMmx/Ia32/CopyMem.asm deleted file mode 100644 index 38e1da7d81..0000000000 --- a/MdePkg/Library/BaseMemoryLibMmx/Ia32/CopyMem.asm +++ /dev/null @@ -1,77 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; CopyMem.asm -; -; Abstract: -; -; CopyMem function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .mmx - .code - -;------------------------------------------------------------------------------ -; VOID * -; EFIAPI -; InternalMemCopyMem ( -; IN VOID *Destination, -; IN VOID *Source, -; IN UINTN Count -; ); -;------------------------------------------------------------------------------ -InternalMemCopyMem PROC USES esi edi - mov esi, [esp + 16] ; esi <- Source - mov edi, [esp + 12] ; edi <- Destination - mov edx, [esp + 20] ; edx <- Count - lea eax, [esi + edx - 1] ; eax <- End of Source - cmp esi, edi - jae @F - cmp eax, edi ; Overlapped? - jae @CopyBackward ; Copy backward if overlapped -@@: - mov ecx, edx - and edx, 7 - shr ecx, 3 ; ecx <- # of Qwords to copy - jz @CopyBytes - push eax - push eax - movq [esp], mm0 ; save mm0 -@@: - movq mm0, [esi] - movq [edi], mm0 - add esi, 8 - add edi, 8 - loop @B - movq mm0, [esp] ; restore mm0 - pop ecx ; stack cleanup - pop ecx ; stack cleanup - jmp @CopyBytes -@CopyBackward: - mov esi, eax ; esi <- Last byte in Source - lea edi, [edi + edx - 1] ; edi <- Last byte in Destination - std -@CopyBytes: - mov ecx, edx - rep movsb - cld - mov eax, [esp + 12] - ret -InternalMemCopyMem ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibMmx/Ia32/ScanMem16.asm b/MdePkg/Library/BaseMemoryLibMmx/Ia32/ScanMem16.asm deleted file mode 100644 index 0ee190e46a..0000000000 --- a/MdePkg/Library/BaseMemoryLibMmx/Ia32/ScanMem16.asm +++ /dev/null @@ -1,55 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ScanMem16.Asm -; -; Abstract: -; -; ScanMem16 function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; CONST VOID * -; EFIAPI -; InternalMemScanMem16 ( -; IN CONST VOID *Buffer, -; IN UINTN Length, -; IN UINT16 Value -; ); -;------------------------------------------------------------------------------ -InternalMemScanMem16 PROC USES edi - mov ecx, [esp + 12] - mov edi, [esp + 8] - mov eax, [esp + 16] - repne scasw - lea eax, [edi - 2] - cmovnz eax, ecx - ret -InternalMemScanMem16 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibMmx/Ia32/ScanMem32.asm b/MdePkg/Library/BaseMemoryLibMmx/Ia32/ScanMem32.asm deleted file mode 100644 index adbf295621..0000000000 --- a/MdePkg/Library/BaseMemoryLibMmx/Ia32/ScanMem32.asm +++ /dev/null @@ -1,55 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ScanMem32.Asm -; -; Abstract: -; -; ScanMem32 function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; CONST VOID * -; EFIAPI -; InternalMemScanMem32 ( -; IN CONST VOID *Buffer, -; IN UINTN Length, -; IN UINT32 Value -; ); -;------------------------------------------------------------------------------ -InternalMemScanMem32 PROC USES edi - mov ecx, [esp + 12] - mov edi, [esp + 8] - mov eax, [esp + 16] - repne scasd - lea eax, [edi - 4] - cmovnz eax, ecx - ret -InternalMemScanMem32 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibMmx/Ia32/ScanMem64.asm b/MdePkg/Library/BaseMemoryLibMmx/Ia32/ScanMem64.asm deleted file mode 100644 index 0a0f5d0468..0000000000 --- a/MdePkg/Library/BaseMemoryLibMmx/Ia32/ScanMem64.asm +++ /dev/null @@ -1,64 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ScanMem64.Asm -; -; Abstract: -; -; ScanMem64 function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; CONST VOID * -; EFIAPI -; InternalMemScanMem64 ( -; IN CONST VOID *Buffer, -; IN UINTN Length, -; IN UINT64 Value -; ); -;------------------------------------------------------------------------------ -InternalMemScanMem64 PROC USES edi - mov ecx, [esp + 12] - mov eax, [esp + 16] - mov edx, [esp + 20] - mov edi, [esp + 8] -@@: - cmp eax, [edi] - lea edi, [edi + 8] - loopne @B - jne @F - cmp edx, [edi - 4] - jecxz @F - jne @B -@@: - lea eax, [edi - 8] - cmovne eax, ecx - ret -InternalMemScanMem64 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibMmx/Ia32/ScanMem8.asm b/MdePkg/Library/BaseMemoryLibMmx/Ia32/ScanMem8.asm deleted file mode 100644 index c64d41d6c1..0000000000 --- a/MdePkg/Library/BaseMemoryLibMmx/Ia32/ScanMem8.asm +++ /dev/null @@ -1,55 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ScanMem8.Asm -; -; Abstract: -; -; ScanMem8 function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; CONST VOID * -; EFIAPI -; InternalMemScanMem8 ( -; IN CONST VOID *Buffer, -; IN UINTN Length, -; IN UINT8 Value -; ); -;------------------------------------------------------------------------------ -InternalMemScanMem8 PROC USES edi - mov ecx, [esp + 12] - mov edi, [esp + 8] - mov al, [esp + 16] - repne scasb - lea eax, [edi - 1] - cmovnz eax, ecx - ret -InternalMemScanMem8 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem.asm b/MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem.asm deleted file mode 100644 index e43ea08684..0000000000 --- a/MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem.asm +++ /dev/null @@ -1,70 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; SetMem.asm -; -; Abstract: -; -; SetMem function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .mmx - .code - -;------------------------------------------------------------------------------ -; VOID * -; EFIAPI -; InternalMemSetMem ( -; IN VOID *Buffer, -; IN UINTN Count, -; IN UINT8 Value -; ) -;------------------------------------------------------------------------------ -InternalMemSetMem PROC USES edi - mov al, [esp + 16] - mov ah, al - shrd edx, eax, 16 - shld eax, edx, 16 - mov ecx, [esp + 12] ; ecx <- Count - mov edi, [esp + 8] ; edi <- Buffer - mov edx, ecx - and edx, 7 - shr ecx, 3 ; # of Qwords to set - jz @SetBytes - add esp, -10h - movq [esp], mm0 ; save mm0 - movq [esp + 8], mm1 ; save mm1 - movd mm0, eax - movd mm1, eax - psllq mm0, 32 - por mm0, mm1 ; fill mm0 with 8 Value's -@@: - movq [edi], mm0 - add edi, 8 - loop @B - movq mm0, [esp] ; restore mm0 - movq mm1, [esp + 8] ; restore mm1 - add esp, 10h ; stack cleanup -@SetBytes: - mov ecx, edx - rep stosb - mov eax, [esp + 8] ; eax <- Buffer as return value - ret -InternalMemSetMem ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem16.asm b/MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem16.asm deleted file mode 100644 index 8d5bca0e70..0000000000 --- a/MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem16.asm +++ /dev/null @@ -1,63 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; SetMem16.asm -; -; Abstract: -; -; SetMem16 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .mmx - .code - -;------------------------------------------------------------------------------ -; VOID * -; EFIAPI -; InternalMemSetMem16 ( -; IN VOID *Buffer, -; IN UINTN Count, -; IN UINT16 Value -; ) -;------------------------------------------------------------------------------ -InternalMemSetMem16 PROC USES edi - mov eax, [esp + 16] - shrd edx, eax, 16 - shld eax, edx, 16 - mov edx, [esp + 12] - mov edi, [esp + 8] - mov ecx, edx - and edx, 3 - shr ecx, 2 - jz @SetWords - movd mm0, eax - movd mm1, eax - psllq mm0, 32 - por mm0, mm1 -@@: - movq [edi], mm0 - add edi, 8 - loop @B -@SetWords: - mov ecx, edx - rep stosw - mov eax, [esp + 8] - ret -InternalMemSetMem16 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem32.asm b/MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem32.asm deleted file mode 100644 index 031c48a32d..0000000000 --- a/MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem32.asm +++ /dev/null @@ -1,59 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; SetMem32.asm -; -; Abstract: -; -; SetMem32 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .mmx - .code - -;------------------------------------------------------------------------------ -; VOID * -; EFIAPI -; InternalMemSetMem32 ( -; IN VOID *Buffer, -; IN UINTN Count, -; IN UINT32 Value -; ); -;------------------------------------------------------------------------------ -InternalMemSetMem32 PROC - mov eax, [esp + 4] ; eax <- Buffer as return value - mov ecx, [esp + 8] ; ecx <- Count - movd mm0, dword ptr [esp + 12] ; mm0 <- Value - shr ecx, 1 ; ecx <- number of qwords to set - mov edx, eax ; edx <- Buffer - jz @SetDwords - movq mm1, mm0 - psllq mm1, 32 - por mm0, mm1 -@@: - movq qword ptr [edx], mm0 - lea edx, [edx + 8] ; use "lea" to avoid change in flags - loop @B -@SetDwords: - jnc @F - movd dword ptr [edx], mm0 -@@: - ret -InternalMemSetMem32 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem64.asm b/MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem64.asm deleted file mode 100644 index 42870bdc38..0000000000 --- a/MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem64.asm +++ /dev/null @@ -1,50 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; SetMem64.asm -; -; Abstract: -; -; SetMem64 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .mmx - .code - -;------------------------------------------------------------------------------ -; VOID * -; EFIAPI -; InternalMemSetMem64 ( -; IN VOID *Buffer, -; IN UINTN Count, -; IN UINT64 Value -; ) -;------------------------------------------------------------------------------ -InternalMemSetMem64 PROC - mov eax, [esp + 4] - mov ecx, [esp + 8] - movq mm0, [esp + 12] - mov edx, eax -@@: - movq [edx], mm0 - add edx, 8 - loop @B - ret -InternalMemSetMem64 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibMmx/Ia32/ZeroMem.asm b/MdePkg/Library/BaseMemoryLibMmx/Ia32/ZeroMem.asm deleted file mode 100644 index 1676b35b9a..0000000000 --- a/MdePkg/Library/BaseMemoryLibMmx/Ia32/ZeroMem.asm +++ /dev/null @@ -1,56 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ZeroMem.asm -; -; Abstract: -; -; ZeroMem function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .mmx - .code - -;------------------------------------------------------------------------------ -; VOID * -; InternalMemZeroMem ( -; IN VOID *Buffer, -; IN UINTN Count -; ); -;------------------------------------------------------------------------------ -InternalMemZeroMem PROC USES edi - mov edi, [esp + 8] - mov ecx, [esp + 12] - mov edx, ecx - shr ecx, 3 - jz @ZeroBytes - pxor mm0, mm0 -@@: - movq [edi], mm0 - add edi, 8 - loop @B -@ZeroBytes: - and edx, 7 - xor eax, eax - mov ecx, edx - rep stosb - mov eax, [esp + 8] - ret -InternalMemZeroMem ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/CompareMem.asm b/MdePkg/Library/BaseMemoryLibMmx/X64/CompareMem.asm deleted file mode 100644 index 0ef05b2fa2..0000000000 --- a/MdePkg/Library/BaseMemoryLibMmx/X64/CompareMem.asm +++ /dev/null @@ -1,54 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; CompareMem.Asm -; -; Abstract: -; -; CompareMem function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; INTN -; EFIAPI -; InternalMemCompareMem ( -; IN CONST VOID *DestinationBuffer, -; IN CONST VOID *SourceBuffer, -; IN UINTN Length -; ); -;------------------------------------------------------------------------------ -InternalMemCompareMem PROC USES rsi rdi - mov rsi, rcx - mov rdi, rdx - mov rcx, r8 - repe cmpsb - movzx rax, byte ptr [rsi - 1] - movzx rdx, byte ptr [rdi - 1] - sub rax, rdx - ret -InternalMemCompareMem ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/CopyMem.asm b/MdePkg/Library/BaseMemoryLibMmx/X64/CopyMem.asm deleted file mode 100644 index 6e74985e35..0000000000 --- a/MdePkg/Library/BaseMemoryLibMmx/X64/CopyMem.asm +++ /dev/null @@ -1,70 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; CopyMem.asm -; -; Abstract: -; -; CopyMem function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID * -; EFIAPI -; InternalMemCopyMem ( -; OUT VOID *DestinationBuffer, -; IN CONST VOID *SourceBuffer, -; IN UINTN Length -; ); -;------------------------------------------------------------------------------ -InternalMemCopyMem PROC USES rsi rdi - mov rsi, rdx ; rsi <- Source - mov rdi, rcx ; rdi <- Destination - lea r9, [rsi + r8 - 1] ; r9 <- End of Source - cmp rsi, rdi - mov rax, rdi ; rax <- Destination as return value - jae @F - cmp r9, rdi - jae @CopyBackward ; Copy backward if overlapped -@@: - mov rcx, r8 - and r8, 7 - shr rcx, 3 ; rcx <- # of Qwords to copy - jz @CopyBytes - DB 49h, 0fh, 7eh, 0c2h ; movd r10, mm0 (Save mm0 in r10) -@@: - DB 0fh, 6fh, 06h ; movd mm0, [rsi] - DB 0fh, 0e7h, 07h ; movntq [rdi], mm0 - add rsi, 8 - add rdi, 8 - loop @B - mfence - DB 49h, 0fh, 6eh, 0c2h ; movd mm0, r10 (Restore mm0) - jmp @CopyBytes -@CopyBackward: - mov rsi, r9 ; rsi <- End of Source - lea rdi, [rdi + r8 - 1] ; rdi <- End of Destination - std ; set direction flag -@CopyBytes: - mov rcx, r8 - rep movsb ; Copy bytes backward - cld - ret -InternalMemCopyMem ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem16.asm b/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem16.asm deleted file mode 100644 index a6114db134..0000000000 --- a/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem16.asm +++ /dev/null @@ -1,53 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ScanMem16.Asm -; -; Abstract: -; -; ScanMem16 function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; CONST VOID * -; EFIAPI -; InternalMemScanMem16 ( -; IN CONST VOID *Buffer, -; IN UINTN Length, -; IN UINT16 Value -; ); -;------------------------------------------------------------------------------ -InternalMemScanMem16 PROC USES rdi - mov rdi, rcx - mov rax, r8 - mov rcx, rdx - repne scasw - lea rax, [rdi - 2] - cmovnz rax, rcx - ret -InternalMemScanMem16 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem32.asm b/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem32.asm deleted file mode 100644 index 40ff6c9e93..0000000000 --- a/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem32.asm +++ /dev/null @@ -1,53 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ScanMem32.Asm -; -; Abstract: -; -; ScanMem32 function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; CONST VOID * -; EFIAPI -; InternalMemScanMem32 ( -; IN CONST VOID *Buffer, -; IN UINTN Length, -; IN UINT32 Value -; ); -;------------------------------------------------------------------------------ -InternalMemScanMem32 PROC USES rdi - mov rdi, rcx - mov rax, r8 - mov rcx, rdx - repne scasd - lea rax, [rdi - 4] - cmovnz rax, rcx - ret -InternalMemScanMem32 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem64.asm b/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem64.asm deleted file mode 100644 index e78da7d019..0000000000 --- a/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem64.asm +++ /dev/null @@ -1,53 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ScanMem64.Asm -; -; Abstract: -; -; ScanMem64 function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; CONST VOID * -; EFIAPI -; InternalMemScanMem64 ( -; IN CONST VOID *Buffer, -; IN UINTN Length, -; IN UINT64 Value -; ); -;------------------------------------------------------------------------------ -InternalMemScanMem64 PROC USES rdi - mov rdi, rcx - mov rax, r8 - mov rcx, rdx - repne scasq - lea rax, [rdi - 8] - cmovnz rax, rcx - ret -InternalMemScanMem64 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem8.asm b/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem8.asm deleted file mode 100644 index fee239701d..0000000000 --- a/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem8.asm +++ /dev/null @@ -1,53 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ScanMem8.Asm -; -; Abstract: -; -; ScanMem8 function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; CONST VOID * -; EFIAPI -; InternalMemScanMem8 ( -; IN CONST VOID *Buffer, -; IN UINTN Length, -; IN UINT8 Value -; ); -;------------------------------------------------------------------------------ -InternalMemScanMem8 PROC USES rdi - mov rdi, rcx - mov rcx, rdx - mov rax, r8 - repne scasb - lea rax, [rdi - 1] - cmovnz rax, rcx ; set rax to 0 if not found - ret -InternalMemScanMem8 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem.asm b/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem.asm deleted file mode 100644 index 9ff949cdd2..0000000000 --- a/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem.asm +++ /dev/null @@ -1,58 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; SetMem.asm -; -; Abstract: -; -; SetMem function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID * -; EFIAPI -; InternalMemSetMem ( -; OUT VOID *Buffer, -; IN UINTN Length, -; IN UINT8 Value -; ); -;------------------------------------------------------------------------------ -InternalMemSetMem PROC USES rdi - mov rax, r8 - mov ah, al - DB 48h, 0fh, 6eh, 0c0h ; movd mm0, rax - mov r8, rcx - mov rdi, r8 ; rdi <- Buffer - mov rcx, rdx - and edx, 7 - shr rcx, 3 - jz @SetBytes - DB 0fh, 70h, 0C0h, 00h ; pshufw mm0, mm0, 0h -@@: - DB 0fh, 0e7h, 07h ; movntq [rdi], mm0 - add rdi, 8 - loop @B - mfence -@SetBytes: - mov ecx, edx - rep stosb - mov rax, r8 - ret -InternalMemSetMem ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem16.asm b/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem16.asm deleted file mode 100644 index fbd98b0fe9..0000000000 --- a/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem16.asm +++ /dev/null @@ -1,57 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; SetMem16.asm -; -; Abstract: -; -; SetMem16 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID * -; EFIAPI -; InternalMemSetMem16 ( -; OUT VOID *Buffer, -; IN UINTN Length, -; IN UINT16 Value -; ); -;------------------------------------------------------------------------------ -InternalMemSetMem16 PROC USES rdi - mov rax, r8 - DB 48h, 0fh, 6eh, 0c0h ; movd mm0, rax - mov r8, rcx - mov rdi, r8 - mov rcx, rdx - and edx, 3 - shr rcx, 2 - jz @SetWords - DB 0fh, 70h, 0C0h, 00h ; pshufw mm0, mm0, 0h -@@: - DB 0fh, 0e7h, 07h ; movntq [rdi], mm0 - add rdi, 8 - loop @B - mfence -@SetWords: - mov ecx, edx - rep stosw - mov rax, r8 - ret -InternalMemSetMem16 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem32.asm b/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem32.asm deleted file mode 100644 index a0bdd89bed..0000000000 --- a/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem32.asm +++ /dev/null @@ -1,53 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; SetMem32.asm -; -; Abstract: -; -; SetMem32 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID * -; InternalMemSetMem32 ( -; IN VOID *Buffer, -; IN UINTN Count, -; IN UINT32 Value -; ) -;------------------------------------------------------------------------------ -InternalMemSetMem32 PROC - DB 49h, 0fh, 6eh, 0c0h ; movd mm0, r8 (Value) - mov rax, rcx ; rax <- Buffer - xchg rcx, rdx ; rcx <- Count rdx <- Buffer - shr rcx, 1 ; rcx <- # of qwords to set - jz @SetDwords - DB 0fh, 70h, 0C0h, 44h ; pshufw mm0, mm0, 44h -@@: - DB 0fh, 0e7h, 02h ; movntq [rdx], mm0 - lea rdx, [rdx + 8] ; use "lea" to avoid flag changes - loop @B - mfence -@SetDwords: - jnc @F - DB 0fh, 7eh, 02h ; movd [rdx], mm0 -@@: - ret -InternalMemSetMem32 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem64.asm b/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem64.asm deleted file mode 100644 index f26177fa11..0000000000 --- a/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem64.asm +++ /dev/null @@ -1,46 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; SetMem64.asm -; -; Abstract: -; -; SetMem64 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID * -; InternalMemSetMem64 ( -; IN VOID *Buffer, -; IN UINTN Count, -; IN UINT64 Value -; ) -;------------------------------------------------------------------------------ -InternalMemSetMem64 PROC - DB 49h, 0fh, 6eh, 0c0h ; movd mm0, r8 (Value) - mov rax, rcx ; rax <- Buffer - xchg rcx, rdx ; rcx <- Count -@@: - DB 0fh, 0e7h, 02h ; movntq [rdx], mm0 - add rdx, 8 - loop @B - mfence - ret -InternalMemSetMem64 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/ZeroMem.asm b/MdePkg/Library/BaseMemoryLibMmx/X64/ZeroMem.asm deleted file mode 100644 index 0fcf50ce8b..0000000000 --- a/MdePkg/Library/BaseMemoryLibMmx/X64/ZeroMem.asm +++ /dev/null @@ -1,54 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ZeroMem.asm -; -; Abstract: -; -; ZeroMem function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID * -; InternalMemZeroMem ( -; IN VOID *Buffer, -; IN UINTN Count -; ); -;------------------------------------------------------------------------------ -InternalMemZeroMem PROC USES rdi - mov rdi, rcx - mov rcx, rdx - mov r8, rdi - and edx, 7 - shr rcx, 3 - jz @ZeroBytes - DB 0fh, 0efh, 0c0h ; pxor mm0, mm0 -@@: - DB 0fh, 0e7h, 7 ; movntq [rdi], mm0 - add rdi, 8 - loop @B - DB 0fh, 0aeh, 0f0h ; mfence -@ZeroBytes: - xor eax, eax - mov ecx, edx - rep stosb - mov rax, r8 - ret -InternalMemZeroMem ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/BaseMemoryLibOptDxe.inf b/MdePkg/Library/BaseMemoryLibOptDxe/BaseMemoryLibOptDxe.inf index bc5ec2f253..fa9e6d21b6 100644 --- a/MdePkg/Library/BaseMemoryLibOptDxe/BaseMemoryLibOptDxe.inf +++ b/MdePkg/Library/BaseMemoryLibOptDxe/BaseMemoryLibOptDxe.inf @@ -4,7 +4,7 @@ # Base Memory Library that is optimized for use in DXE phase. # Uses REP, MMX, XMM registers as required for best performance. # -# Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.
+# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -57,63 +57,41 @@ Ia32/CopyMem.nasm Ia32/CopyMem.S Ia32/ScanMem64.nasm - Ia32/ScanMem64.asm Ia32/ScanMem32.nasm - Ia32/ScanMem32.asm Ia32/ScanMem16.nasm - Ia32/ScanMem16.asm Ia32/ScanMem8.nasm - Ia32/ScanMem8.asm Ia32/CompareMem.nasm - Ia32/CompareMem.asm Ia32/ZeroMem.nasm - Ia32/ZeroMem.asm Ia32/SetMem64.nasm - Ia32/SetMem64.asm Ia32/SetMem32.nasm - Ia32/SetMem32.asm Ia32/SetMem16.nasm - Ia32/SetMem16.asm Ia32/SetMem.nasm - Ia32/SetMem.asm Ia32/CopyMem.nasm - Ia32/CopyMem.asm Ia32/IsZeroBuffer.nasm MemLibGuid.c [Sources.X64] X64/ScanMem64.nasm - X64/ScanMem64.asm X64/ScanMem64.S X64/ScanMem32.nasm - X64/ScanMem32.asm X64/ScanMem32.S X64/ScanMem16.nasm - X64/ScanMem16.asm X64/ScanMem16.S X64/ScanMem8.nasm - X64/ScanMem8.asm X64/ScanMem8.S X64/CompareMem.nasm - X64/CompareMem.asm X64/CompareMem.S X64/ZeroMem.nasm - X64/ZeroMem.asm X64/ZeroMem.S X64/SetMem64.nasm - X64/SetMem64.asm X64/SetMem64.S X64/SetMem32.nasm - X64/SetMem32.asm X64/SetMem32.S X64/SetMem16.nasm - X64/SetMem16.asm X64/SetMem16.S X64/SetMem.nasm - X64/SetMem.asm X64/SetMem.S X64/CopyMem.nasm - X64/CopyMem.asm X64/CopyMem.S X64/IsZeroBuffer.nasm MemLibGuid.c diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/CompareMem.asm b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/CompareMem.asm deleted file mode 100644 index 5a0792d592..0000000000 --- a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/CompareMem.asm +++ /dev/null @@ -1,56 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; CompareMem.Asm -; -; Abstract: -; -; CompareMem function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; INTN -; EFIAPI -; InternalMemCompareMem ( -; IN CONST VOID *DestinationBuffer, -; IN CONST VOID *SourceBuffer, -; IN UINTN Length -; ); -;------------------------------------------------------------------------------ -InternalMemCompareMem PROC USES esi edi - mov esi, [esp + 12] - mov edi, [esp + 16] - mov ecx, [esp + 20] - repe cmpsb - movzx eax, byte ptr [esi - 1] - movzx edx, byte ptr [edi - 1] - sub eax, edx - ret -InternalMemCompareMem ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/CopyMem.asm b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/CopyMem.asm deleted file mode 100644 index a57a628bb2..0000000000 --- a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/CopyMem.asm +++ /dev/null @@ -1,84 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; CopyMem.asm -; -; Abstract: -; -; CopyMem function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .xmm - .code - -;------------------------------------------------------------------------------ -; VOID * -; InternalMemCopyMem ( -; IN VOID *Destination, -; IN VOID *Source, -; IN UINTN Count -; ); -;------------------------------------------------------------------------------ -InternalMemCopyMem PROC USES esi edi - mov esi, [esp + 16] ; esi <- Source - mov edi, [esp + 12] ; edi <- Destination - mov edx, [esp + 20] ; edx <- Count - lea eax, [esi + edx - 1] ; eax <- End of Source - cmp esi, edi - jae @F - cmp eax, edi ; Overlapped? - jae @CopyBackward ; Copy backward if overlapped -@@: - xor ecx, ecx - sub ecx, edi - and ecx, 15 ; ecx + edi aligns on 16-byte boundary - jz @F - cmp ecx, edx - cmova ecx, edx - sub edx, ecx ; edx <- remaining bytes to copy - rep movsb -@@: - mov ecx, edx - and edx, 15 - shr ecx, 4 ; ecx <- # of DQwords to copy - jz @CopyBytes - add esp, -16 - movdqu [esp], xmm0 ; save xmm0 -@@: - movdqu xmm0, [esi] ; esi may not be 16-bytes aligned - movntdq [edi], xmm0 ; edi should be 16-bytes aligned - add esi, 16 - add edi, 16 - loop @B - mfence - movdqu xmm0, [esp] ; restore xmm0 - add esp, 16 ; stack cleanup - jmp @CopyBytes -@CopyBackward: - mov esi, eax ; esi <- Last byte in Source - lea edi, [edi + edx - 1] ; edi <- Last byte in Destination - std -@CopyBytes: - mov ecx, edx - rep movsb - cld - mov eax, [esp + 12] ; eax <- Destination as return value - ret -InternalMemCopyMem ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ScanMem16.asm b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ScanMem16.asm deleted file mode 100644 index 0ee190e46a..0000000000 --- a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ScanMem16.asm +++ /dev/null @@ -1,55 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ScanMem16.Asm -; -; Abstract: -; -; ScanMem16 function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; CONST VOID * -; EFIAPI -; InternalMemScanMem16 ( -; IN CONST VOID *Buffer, -; IN UINTN Length, -; IN UINT16 Value -; ); -;------------------------------------------------------------------------------ -InternalMemScanMem16 PROC USES edi - mov ecx, [esp + 12] - mov edi, [esp + 8] - mov eax, [esp + 16] - repne scasw - lea eax, [edi - 2] - cmovnz eax, ecx - ret -InternalMemScanMem16 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ScanMem32.asm b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ScanMem32.asm deleted file mode 100644 index adbf295621..0000000000 --- a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ScanMem32.asm +++ /dev/null @@ -1,55 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ScanMem32.Asm -; -; Abstract: -; -; ScanMem32 function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; CONST VOID * -; EFIAPI -; InternalMemScanMem32 ( -; IN CONST VOID *Buffer, -; IN UINTN Length, -; IN UINT32 Value -; ); -;------------------------------------------------------------------------------ -InternalMemScanMem32 PROC USES edi - mov ecx, [esp + 12] - mov edi, [esp + 8] - mov eax, [esp + 16] - repne scasd - lea eax, [edi - 4] - cmovnz eax, ecx - ret -InternalMemScanMem32 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ScanMem64.asm b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ScanMem64.asm deleted file mode 100644 index 0a0f5d0468..0000000000 --- a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ScanMem64.asm +++ /dev/null @@ -1,64 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ScanMem64.Asm -; -; Abstract: -; -; ScanMem64 function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; CONST VOID * -; EFIAPI -; InternalMemScanMem64 ( -; IN CONST VOID *Buffer, -; IN UINTN Length, -; IN UINT64 Value -; ); -;------------------------------------------------------------------------------ -InternalMemScanMem64 PROC USES edi - mov ecx, [esp + 12] - mov eax, [esp + 16] - mov edx, [esp + 20] - mov edi, [esp + 8] -@@: - cmp eax, [edi] - lea edi, [edi + 8] - loopne @B - jne @F - cmp edx, [edi - 4] - jecxz @F - jne @B -@@: - lea eax, [edi - 8] - cmovne eax, ecx - ret -InternalMemScanMem64 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ScanMem8.asm b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ScanMem8.asm deleted file mode 100644 index c64d41d6c1..0000000000 --- a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ScanMem8.asm +++ /dev/null @@ -1,55 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ScanMem8.Asm -; -; Abstract: -; -; ScanMem8 function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; CONST VOID * -; EFIAPI -; InternalMemScanMem8 ( -; IN CONST VOID *Buffer, -; IN UINTN Length, -; IN UINT8 Value -; ); -;------------------------------------------------------------------------------ -InternalMemScanMem8 PROC USES edi - mov ecx, [esp + 12] - mov edi, [esp + 8] - mov al, [esp + 16] - repne scasb - lea eax, [edi - 1] - cmovnz eax, ecx - ret -InternalMemScanMem8 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem.asm b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem.asm deleted file mode 100644 index 663d238275..0000000000 --- a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem.asm +++ /dev/null @@ -1,53 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; SetMem.Asm -; -; Abstract: -; -; SetMem function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; VOID * -; InternalMemSetMem ( -; IN VOID *Buffer, -; IN UINTN Count, -; IN UINT8 Value -; ) -;------------------------------------------------------------------------------ -InternalMemSetMem PROC USES edi - mov ecx, [esp + 12] - mov al, [esp + 16] - mov ah, al - shrd edx, eax, 16 - shld eax, edx, 16 - mov edx, ecx - mov edi, [esp + 8] - shr ecx, 2 - rep stosd - mov ecx, edx - and ecx, 3 - rep stosb - mov eax, [esp + 8] - ret -InternalMemSetMem ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem16.asm b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem16.asm deleted file mode 100644 index 3f3350d4f3..0000000000 --- a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem16.asm +++ /dev/null @@ -1,45 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; SetMem16.Asm -; -; Abstract: -; -; SetMem16 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; VOID * -; InternalMemSetMem16 ( -; IN VOID *Buffer, -; IN UINTN Count, -; IN UINT16 Value -; ) -;------------------------------------------------------------------------------ -InternalMemSetMem16 PROC USES edi - mov eax, [esp + 16] - mov edi, [esp + 8] - mov ecx, [esp + 12] - rep stosw - mov eax, [esp + 8] - ret -InternalMemSetMem16 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem32.asm b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem32.asm deleted file mode 100644 index b27b85bca4..0000000000 --- a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem32.asm +++ /dev/null @@ -1,45 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; SetMem32.Asm -; -; Abstract: -; -; SetMem32 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; VOID * -; InternalMemSetMem32 ( -; IN VOID *Buffer, -; IN UINTN Count, -; IN UINT32 Value -; ) -;------------------------------------------------------------------------------ -InternalMemSetMem32 PROC USES edi - mov eax, [esp + 16] - mov edi, [esp + 8] - mov ecx, [esp + 12] - rep stosd - mov eax, [esp + 8] - ret -InternalMemSetMem32 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem64.asm b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem64.asm deleted file mode 100644 index 146f3b957d..0000000000 --- a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem64.asm +++ /dev/null @@ -1,49 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; SetMem64.Asm -; -; Abstract: -; -; SetMem64 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; VOID * -; InternalMemSetMem64 ( -; IN VOID *Buffer, -; IN UINTN Count, -; IN UINT64 Value -; ) -;------------------------------------------------------------------------------ -InternalMemSetMem64 PROC USES edi - mov ecx, [esp + 12] - mov eax, [esp + 16] - mov edx, [esp + 20] - mov edi, [esp + 8] -@@: - mov [edi + ecx*8 - 8], eax - mov [edi + ecx*8 - 4], edx - loop @B - mov eax, edi - ret -InternalMemSetMem64 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ZeroMem.asm b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ZeroMem.asm deleted file mode 100644 index 722bf67d24..0000000000 --- a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ZeroMem.asm +++ /dev/null @@ -1,50 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ZeroMem.Asm -; -; Abstract: -; -; ZeroMem function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; VOID * -; InternalMemZeroMem ( -; IN VOID *Buffer, -; IN UINTN Count -; ); -;------------------------------------------------------------------------------ -InternalMemZeroMem PROC USES edi - xor eax, eax - mov edi, [esp + 8] - mov ecx, [esp + 12] - mov edx, ecx - shr ecx, 2 - and edx, 3 - push edi - rep stosd - mov ecx, edx - rep stosb - pop eax - ret -InternalMemZeroMem ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/X64/CompareMem.asm b/MdePkg/Library/BaseMemoryLibOptDxe/X64/CompareMem.asm deleted file mode 100644 index 0ef05b2fa2..0000000000 --- a/MdePkg/Library/BaseMemoryLibOptDxe/X64/CompareMem.asm +++ /dev/null @@ -1,54 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; CompareMem.Asm -; -; Abstract: -; -; CompareMem function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; INTN -; EFIAPI -; InternalMemCompareMem ( -; IN CONST VOID *DestinationBuffer, -; IN CONST VOID *SourceBuffer, -; IN UINTN Length -; ); -;------------------------------------------------------------------------------ -InternalMemCompareMem PROC USES rsi rdi - mov rsi, rcx - mov rdi, rdx - mov rcx, r8 - repe cmpsb - movzx rax, byte ptr [rsi - 1] - movzx rdx, byte ptr [rdi - 1] - sub rax, rdx - ret -InternalMemCompareMem ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/X64/CopyMem.asm b/MdePkg/Library/BaseMemoryLibOptDxe/X64/CopyMem.asm deleted file mode 100644 index 8bcaca7cbe..0000000000 --- a/MdePkg/Library/BaseMemoryLibOptDxe/X64/CopyMem.asm +++ /dev/null @@ -1,79 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; CopyMem.asm -; -; Abstract: -; -; CopyMem function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID * -; EFIAPI -; InternalMemCopyMem ( -; IN VOID *Destination, -; IN VOID *Source, -; IN UINTN Count -; ); -;------------------------------------------------------------------------------ -InternalMemCopyMem PROC USES rsi rdi - mov rsi, rdx ; rsi <- Source - mov rdi, rcx ; rdi <- Destination - lea r9, [rsi + r8 - 1] ; r9 <- Last byte of Source - cmp rsi, rdi - mov rax, rdi ; rax <- Destination as return value - jae @F ; Copy forward if Source > Destination - cmp r9, rdi ; Overlapped? - jae @CopyBackward ; Copy backward if overlapped -@@: - xor rcx, rcx - sub rcx, rdi ; rcx <- -rdi - and rcx, 15 ; rcx + rsi should be 16 bytes aligned - jz @F ; skip if rcx == 0 - cmp rcx, r8 - cmova rcx, r8 - sub r8, rcx - rep movsb -@@: - mov rcx, r8 - and r8, 15 - shr rcx, 4 ; rcx <- # of DQwords to copy - jz @CopyBytes - movdqa [rsp + 18h], xmm0 ; save xmm0 on stack -@@: - movdqu xmm0, [rsi] ; rsi may not be 16-byte aligned - movntdq [rdi], xmm0 ; rdi should be 16-byte aligned - add rsi, 16 - add rdi, 16 - loop @B - mfence - movdqa xmm0, [rsp + 18h] ; restore xmm0 - jmp @CopyBytes ; copy remaining bytes -@CopyBackward: - mov rsi, r9 ; rsi <- Last byte of Source - lea rdi, [rdi + r8 - 1] ; rdi <- Last byte of Destination - std -@CopyBytes: - mov rcx, r8 - rep movsb - cld - ret -InternalMemCopyMem ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem16.asm b/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem16.asm deleted file mode 100644 index a6114db134..0000000000 --- a/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem16.asm +++ /dev/null @@ -1,53 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ScanMem16.Asm -; -; Abstract: -; -; ScanMem16 function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; CONST VOID * -; EFIAPI -; InternalMemScanMem16 ( -; IN CONST VOID *Buffer, -; IN UINTN Length, -; IN UINT16 Value -; ); -;------------------------------------------------------------------------------ -InternalMemScanMem16 PROC USES rdi - mov rdi, rcx - mov rax, r8 - mov rcx, rdx - repne scasw - lea rax, [rdi - 2] - cmovnz rax, rcx - ret -InternalMemScanMem16 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem32.asm b/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem32.asm deleted file mode 100644 index 40ff6c9e93..0000000000 --- a/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem32.asm +++ /dev/null @@ -1,53 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ScanMem32.Asm -; -; Abstract: -; -; ScanMem32 function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; CONST VOID * -; EFIAPI -; InternalMemScanMem32 ( -; IN CONST VOID *Buffer, -; IN UINTN Length, -; IN UINT32 Value -; ); -;------------------------------------------------------------------------------ -InternalMemScanMem32 PROC USES rdi - mov rdi, rcx - mov rax, r8 - mov rcx, rdx - repne scasd - lea rax, [rdi - 4] - cmovnz rax, rcx - ret -InternalMemScanMem32 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem64.asm b/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem64.asm deleted file mode 100644 index e78da7d019..0000000000 --- a/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem64.asm +++ /dev/null @@ -1,53 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ScanMem64.Asm -; -; Abstract: -; -; ScanMem64 function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; CONST VOID * -; EFIAPI -; InternalMemScanMem64 ( -; IN CONST VOID *Buffer, -; IN UINTN Length, -; IN UINT64 Value -; ); -;------------------------------------------------------------------------------ -InternalMemScanMem64 PROC USES rdi - mov rdi, rcx - mov rax, r8 - mov rcx, rdx - repne scasq - lea rax, [rdi - 8] - cmovnz rax, rcx - ret -InternalMemScanMem64 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem8.asm b/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem8.asm deleted file mode 100644 index fee239701d..0000000000 --- a/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem8.asm +++ /dev/null @@ -1,53 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ScanMem8.Asm -; -; Abstract: -; -; ScanMem8 function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; CONST VOID * -; EFIAPI -; InternalMemScanMem8 ( -; IN CONST VOID *Buffer, -; IN UINTN Length, -; IN UINT8 Value -; ); -;------------------------------------------------------------------------------ -InternalMemScanMem8 PROC USES rdi - mov rdi, rcx - mov rcx, rdx - mov rax, r8 - repne scasb - lea rax, [rdi - 1] - cmovnz rax, rcx ; set rax to 0 if not found - ret -InternalMemScanMem8 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem.asm b/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem.asm deleted file mode 100644 index 5ca1571cf7..0000000000 --- a/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem.asm +++ /dev/null @@ -1,58 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; SetMem.Asm -; -; Abstract: -; -; SetMem function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID * -; EFIAPI -; InternalMemSetMem ( -; IN VOID *Buffer, -; IN UINTN Count, -; IN UINT8 Value -; ) -;------------------------------------------------------------------------------ -InternalMemSetMem PROC USES rdi rbx - push rcx ; push Buffer - mov rax, r8 ; rax = Value - and rax, 0ffh ; rax = lower 8 bits of r8, upper 56 bits are 0 - mov ah, al ; ah = al - mov bx, ax ; bx = ax - shl rax, 10h ; rax = ax << 16 - mov ax, bx ; ax = bx - mov rbx, rax ; ebx = eax - shl rax, 20h ; rax = rax << 32 - or rax, rbx ; eax = ebx - mov rdi, rcx ; rdi = Buffer - mov rcx, rdx ; rcx = Count - shr rcx, 3 ; rcx = rcx / 8 - cld - rep stosq - mov rcx, rdx ; rcx = rdx - and rcx, 7 ; rcx = rcx & 7 - rep stosb - pop rax ; rax = Buffer - ret -InternalMemSetMem ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem16.asm b/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem16.asm deleted file mode 100644 index 1ac3b8d3b5..0000000000 --- a/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem16.asm +++ /dev/null @@ -1,45 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; SetMem16.Asm -; -; Abstract: -; -; SetMem16 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID * -; EFIAPI -; InternalMemSetMem16 ( -; IN VOID *Buffer, -; IN UINTN Count, -; IN UINT16 Value -; ) -;------------------------------------------------------------------------------ -InternalMemSetMem16 PROC USES rdi - push rcx - mov rdi, rcx - mov rax, r8 - xchg rcx, rdx - rep stosw - pop rax - ret -InternalMemSetMem16 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem32.asm b/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem32.asm deleted file mode 100644 index 4a42b2f7fb..0000000000 --- a/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem32.asm +++ /dev/null @@ -1,45 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; SetMem32.Asm -; -; Abstract: -; -; SetMem32 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID * -; EFIAPI -; InternalMemSetMem32 ( -; IN VOID *Buffer, -; IN UINTN Count, -; IN UINT32 Value -; ); -;------------------------------------------------------------------------------ -InternalMemSetMem32 PROC USES rdi - push rcx - mov rdi, rcx - mov rax, r8 - xchg rcx, rdx - rep stosd - pop rax - ret -InternalMemSetMem32 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem64.asm b/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem64.asm deleted file mode 100644 index 9611c4c7a8..0000000000 --- a/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem64.asm +++ /dev/null @@ -1,44 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; SetMem64.Asm -; -; Abstract: -; -; SetMem64 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID * -; InternalMemSetMem64 ( -; IN VOID *Buffer, -; IN UINTN Count, -; IN UINT64 Value -; ) -;------------------------------------------------------------------------------ -InternalMemSetMem64 PROC USES rdi - push rcx - mov rdi, rcx - mov rax, r8 - xchg rcx, rdx - rep stosq - pop rax - ret -InternalMemSetMem64 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/X64/ZeroMem.asm b/MdePkg/Library/BaseMemoryLibOptDxe/X64/ZeroMem.asm deleted file mode 100644 index 29398fba9f..0000000000 --- a/MdePkg/Library/BaseMemoryLibOptDxe/X64/ZeroMem.asm +++ /dev/null @@ -1,48 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ZeroMem.Asm -; -; Abstract: -; -; ZeroMem function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID * -; InternalMemZeroMem ( -; IN VOID *Buffer, -; IN UINTN Count -; ); -;------------------------------------------------------------------------------ -InternalMemZeroMem PROC USES rdi - push rcx ; push Buffer - xor rax, rax ; rax = 0 - mov rdi, rcx ; rdi = Buffer - mov rcx, rdx ; rcx = Count - shr rcx, 3 ; rcx = rcx / 8 - and rdx, 7 ; rdx = rdx & 7 - cld - rep stosq - mov rcx, rdx ; rcx = rdx - rep stosb - pop rax ; rax = Buffer - ret -InternalMemZeroMem ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibOptPei/BaseMemoryLibOptPei.inf b/MdePkg/Library/BaseMemoryLibOptPei/BaseMemoryLibOptPei.inf index 21f060ebcf..bcbf2cd0ea 100644 --- a/MdePkg/Library/BaseMemoryLibOptPei/BaseMemoryLibOptPei.inf +++ b/MdePkg/Library/BaseMemoryLibOptPei/BaseMemoryLibOptPei.inf @@ -4,7 +4,7 @@ # Base Memory Library that is optimized for use in PEI phase. # Uses REP, MMX, XMM registers as required for best performance. # -# Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.
+# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -57,27 +57,16 @@ Ia32/CopyMem.nasm Ia32/CopyMem.S Ia32/ScanMem64.nasm - Ia32/ScanMem64.asm Ia32/ScanMem32.nasm - Ia32/ScanMem32.asm Ia32/ScanMem16.nasm - Ia32/ScanMem16.asm Ia32/ScanMem8.nasm - Ia32/ScanMem8.asm Ia32/CompareMem.nasm - Ia32/CompareMem.asm Ia32/ZeroMem.nasm - Ia32/ZeroMem.asm Ia32/SetMem64.nasm - Ia32/SetMem64.asm Ia32/SetMem32.nasm - Ia32/SetMem32.asm Ia32/SetMem16.nasm - Ia32/SetMem16.asm Ia32/SetMem.nasm - Ia32/SetMem.asm Ia32/CopyMem.nasm - Ia32/CopyMem.asm Ia32/IsZeroBuffer.nasm ScanMem64Wrapper.c ScanMem32Wrapper.c @@ -95,37 +84,26 @@ [Sources.X64] X64/ScanMem64.nasm - X64/ScanMem64.asm X64/ScanMem64.S X64/ScanMem32.nasm - X64/ScanMem32.asm X64/ScanMem32.S X64/ScanMem16.nasm - X64/ScanMem16.asm X64/ScanMem16.S X64/ScanMem8.nasm - X64/ScanMem8.asm X64/ScanMem8.S X64/CompareMem.nasm - X64/CompareMem.asm X64/CompareMem.S X64/ZeroMem.nasm - X64/ZeroMem.asm X64/ZeroMem.S X64/SetMem64.nasm - X64/SetMem64.asm X64/SetMem64.S X64/SetMem32.nasm - X64/SetMem32.asm X64/SetMem32.S X64/SetMem16.nasm - X64/SetMem16.asm X64/SetMem16.S X64/SetMem.nasm - X64/SetMem.asm X64/SetMem.S X64/CopyMem.nasm - X64/CopyMem.asm X64/CopyMem.S X64/IsZeroBuffer.nasm ScanMem64Wrapper.c diff --git a/MdePkg/Library/BaseMemoryLibOptPei/Ia32/CompareMem.asm b/MdePkg/Library/BaseMemoryLibOptPei/Ia32/CompareMem.asm deleted file mode 100644 index 5a0792d592..0000000000 --- a/MdePkg/Library/BaseMemoryLibOptPei/Ia32/CompareMem.asm +++ /dev/null @@ -1,56 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; CompareMem.Asm -; -; Abstract: -; -; CompareMem function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; INTN -; EFIAPI -; InternalMemCompareMem ( -; IN CONST VOID *DestinationBuffer, -; IN CONST VOID *SourceBuffer, -; IN UINTN Length -; ); -;------------------------------------------------------------------------------ -InternalMemCompareMem PROC USES esi edi - mov esi, [esp + 12] - mov edi, [esp + 16] - mov ecx, [esp + 20] - repe cmpsb - movzx eax, byte ptr [esi - 1] - movzx edx, byte ptr [edi - 1] - sub eax, edx - ret -InternalMemCompareMem ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibOptPei/Ia32/CopyMem.asm b/MdePkg/Library/BaseMemoryLibOptPei/Ia32/CopyMem.asm deleted file mode 100644 index 6f8d007bc2..0000000000 --- a/MdePkg/Library/BaseMemoryLibOptPei/Ia32/CopyMem.asm +++ /dev/null @@ -1,61 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; CopyMem.Asm -; -; Abstract: -; -; CopyMem function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; VOID * -; InternalMemCopyMem ( -; IN VOID *Destination, -; IN VOID *Source, -; IN UINTN Count -; ) -;------------------------------------------------------------------------------ -InternalMemCopyMem PROC USES esi edi - mov esi, [esp+16] ; esi <- Source - mov edi, [esp+12] ; edi <- Destination - mov edx, [esp+20] ; edx <- Count - cmp esi, edi - je @CopyDone - cmp edx, 0 - je @CopyDone - lea eax, [esi + edx - 1] ; eax <- End of Source - cmp esi, edi - jae @CopyBytes - cmp eax, edi - jb @CopyBytes ; Copy backward if overlapped - mov esi, eax ; esi <- End of Source - lea edi, [edi + edx - 1] ; edi <- End of Destination - std -@CopyBytes: - mov ecx, edx - rep movsb ; Copy bytes backward - cld -@CopyDone: - mov eax, [esp + 12] ; eax <- Destination as return value - ret -InternalMemCopyMem ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibOptPei/Ia32/ScanMem16.asm b/MdePkg/Library/BaseMemoryLibOptPei/Ia32/ScanMem16.asm deleted file mode 100644 index 0ee190e46a..0000000000 --- a/MdePkg/Library/BaseMemoryLibOptPei/Ia32/ScanMem16.asm +++ /dev/null @@ -1,55 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ScanMem16.Asm -; -; Abstract: -; -; ScanMem16 function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; CONST VOID * -; EFIAPI -; InternalMemScanMem16 ( -; IN CONST VOID *Buffer, -; IN UINTN Length, -; IN UINT16 Value -; ); -;------------------------------------------------------------------------------ -InternalMemScanMem16 PROC USES edi - mov ecx, [esp + 12] - mov edi, [esp + 8] - mov eax, [esp + 16] - repne scasw - lea eax, [edi - 2] - cmovnz eax, ecx - ret -InternalMemScanMem16 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibOptPei/Ia32/ScanMem32.asm b/MdePkg/Library/BaseMemoryLibOptPei/Ia32/ScanMem32.asm deleted file mode 100644 index adbf295621..0000000000 --- a/MdePkg/Library/BaseMemoryLibOptPei/Ia32/ScanMem32.asm +++ /dev/null @@ -1,55 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ScanMem32.Asm -; -; Abstract: -; -; ScanMem32 function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; CONST VOID * -; EFIAPI -; InternalMemScanMem32 ( -; IN CONST VOID *Buffer, -; IN UINTN Length, -; IN UINT32 Value -; ); -;------------------------------------------------------------------------------ -InternalMemScanMem32 PROC USES edi - mov ecx, [esp + 12] - mov edi, [esp + 8] - mov eax, [esp + 16] - repne scasd - lea eax, [edi - 4] - cmovnz eax, ecx - ret -InternalMemScanMem32 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibOptPei/Ia32/ScanMem64.asm b/MdePkg/Library/BaseMemoryLibOptPei/Ia32/ScanMem64.asm deleted file mode 100644 index 0a0f5d0468..0000000000 --- a/MdePkg/Library/BaseMemoryLibOptPei/Ia32/ScanMem64.asm +++ /dev/null @@ -1,64 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ScanMem64.Asm -; -; Abstract: -; -; ScanMem64 function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; CONST VOID * -; EFIAPI -; InternalMemScanMem64 ( -; IN CONST VOID *Buffer, -; IN UINTN Length, -; IN UINT64 Value -; ); -;------------------------------------------------------------------------------ -InternalMemScanMem64 PROC USES edi - mov ecx, [esp + 12] - mov eax, [esp + 16] - mov edx, [esp + 20] - mov edi, [esp + 8] -@@: - cmp eax, [edi] - lea edi, [edi + 8] - loopne @B - jne @F - cmp edx, [edi - 4] - jecxz @F - jne @B -@@: - lea eax, [edi - 8] - cmovne eax, ecx - ret -InternalMemScanMem64 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibOptPei/Ia32/ScanMem8.asm b/MdePkg/Library/BaseMemoryLibOptPei/Ia32/ScanMem8.asm deleted file mode 100644 index c64d41d6c1..0000000000 --- a/MdePkg/Library/BaseMemoryLibOptPei/Ia32/ScanMem8.asm +++ /dev/null @@ -1,55 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ScanMem8.Asm -; -; Abstract: -; -; ScanMem8 function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; CONST VOID * -; EFIAPI -; InternalMemScanMem8 ( -; IN CONST VOID *Buffer, -; IN UINTN Length, -; IN UINT8 Value -; ); -;------------------------------------------------------------------------------ -InternalMemScanMem8 PROC USES edi - mov ecx, [esp + 12] - mov edi, [esp + 8] - mov al, [esp + 16] - repne scasb - lea eax, [edi - 1] - cmovnz eax, ecx - ret -InternalMemScanMem8 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibOptPei/Ia32/SetMem.asm b/MdePkg/Library/BaseMemoryLibOptPei/Ia32/SetMem.asm deleted file mode 100644 index 663d238275..0000000000 --- a/MdePkg/Library/BaseMemoryLibOptPei/Ia32/SetMem.asm +++ /dev/null @@ -1,53 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; SetMem.Asm -; -; Abstract: -; -; SetMem function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; VOID * -; InternalMemSetMem ( -; IN VOID *Buffer, -; IN UINTN Count, -; IN UINT8 Value -; ) -;------------------------------------------------------------------------------ -InternalMemSetMem PROC USES edi - mov ecx, [esp + 12] - mov al, [esp + 16] - mov ah, al - shrd edx, eax, 16 - shld eax, edx, 16 - mov edx, ecx - mov edi, [esp + 8] - shr ecx, 2 - rep stosd - mov ecx, edx - and ecx, 3 - rep stosb - mov eax, [esp + 8] - ret -InternalMemSetMem ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibOptPei/Ia32/SetMem16.asm b/MdePkg/Library/BaseMemoryLibOptPei/Ia32/SetMem16.asm deleted file mode 100644 index 3f3350d4f3..0000000000 --- a/MdePkg/Library/BaseMemoryLibOptPei/Ia32/SetMem16.asm +++ /dev/null @@ -1,45 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; SetMem16.Asm -; -; Abstract: -; -; SetMem16 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; VOID * -; InternalMemSetMem16 ( -; IN VOID *Buffer, -; IN UINTN Count, -; IN UINT16 Value -; ) -;------------------------------------------------------------------------------ -InternalMemSetMem16 PROC USES edi - mov eax, [esp + 16] - mov edi, [esp + 8] - mov ecx, [esp + 12] - rep stosw - mov eax, [esp + 8] - ret -InternalMemSetMem16 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibOptPei/Ia32/SetMem32.asm b/MdePkg/Library/BaseMemoryLibOptPei/Ia32/SetMem32.asm deleted file mode 100644 index b27b85bca4..0000000000 --- a/MdePkg/Library/BaseMemoryLibOptPei/Ia32/SetMem32.asm +++ /dev/null @@ -1,45 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; SetMem32.Asm -; -; Abstract: -; -; SetMem32 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; VOID * -; InternalMemSetMem32 ( -; IN VOID *Buffer, -; IN UINTN Count, -; IN UINT32 Value -; ) -;------------------------------------------------------------------------------ -InternalMemSetMem32 PROC USES edi - mov eax, [esp + 16] - mov edi, [esp + 8] - mov ecx, [esp + 12] - rep stosd - mov eax, [esp + 8] - ret -InternalMemSetMem32 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibOptPei/Ia32/SetMem64.asm b/MdePkg/Library/BaseMemoryLibOptPei/Ia32/SetMem64.asm deleted file mode 100644 index 146f3b957d..0000000000 --- a/MdePkg/Library/BaseMemoryLibOptPei/Ia32/SetMem64.asm +++ /dev/null @@ -1,49 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; SetMem64.Asm -; -; Abstract: -; -; SetMem64 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; VOID * -; InternalMemSetMem64 ( -; IN VOID *Buffer, -; IN UINTN Count, -; IN UINT64 Value -; ) -;------------------------------------------------------------------------------ -InternalMemSetMem64 PROC USES edi - mov ecx, [esp + 12] - mov eax, [esp + 16] - mov edx, [esp + 20] - mov edi, [esp + 8] -@@: - mov [edi + ecx*8 - 8], eax - mov [edi + ecx*8 - 4], edx - loop @B - mov eax, edi - ret -InternalMemSetMem64 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibOptPei/Ia32/ZeroMem.asm b/MdePkg/Library/BaseMemoryLibOptPei/Ia32/ZeroMem.asm deleted file mode 100644 index 722bf67d24..0000000000 --- a/MdePkg/Library/BaseMemoryLibOptPei/Ia32/ZeroMem.asm +++ /dev/null @@ -1,50 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ZeroMem.Asm -; -; Abstract: -; -; ZeroMem function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; VOID * -; InternalMemZeroMem ( -; IN VOID *Buffer, -; IN UINTN Count -; ); -;------------------------------------------------------------------------------ -InternalMemZeroMem PROC USES edi - xor eax, eax - mov edi, [esp + 8] - mov ecx, [esp + 12] - mov edx, ecx - shr ecx, 2 - and edx, 3 - push edi - rep stosd - mov ecx, edx - rep stosb - pop eax - ret -InternalMemZeroMem ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibOptPei/X64/CompareMem.asm b/MdePkg/Library/BaseMemoryLibOptPei/X64/CompareMem.asm deleted file mode 100644 index 0ef05b2fa2..0000000000 --- a/MdePkg/Library/BaseMemoryLibOptPei/X64/CompareMem.asm +++ /dev/null @@ -1,54 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; CompareMem.Asm -; -; Abstract: -; -; CompareMem function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; INTN -; EFIAPI -; InternalMemCompareMem ( -; IN CONST VOID *DestinationBuffer, -; IN CONST VOID *SourceBuffer, -; IN UINTN Length -; ); -;------------------------------------------------------------------------------ -InternalMemCompareMem PROC USES rsi rdi - mov rsi, rcx - mov rdi, rdx - mov rcx, r8 - repe cmpsb - movzx rax, byte ptr [rsi - 1] - movzx rdx, byte ptr [rdi - 1] - sub rax, rdx - ret -InternalMemCompareMem ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibOptPei/X64/CopyMem.asm b/MdePkg/Library/BaseMemoryLibOptPei/X64/CopyMem.asm deleted file mode 100644 index df2e7cc98a..0000000000 --- a/MdePkg/Library/BaseMemoryLibOptPei/X64/CopyMem.asm +++ /dev/null @@ -1,61 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; CopyMem.Asm -; -; Abstract: -; -; CopyMem function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID * -; EFIAPI -; InternalMemCopyMem ( -; IN VOID *Destination, -; IN VOID *Source, -; IN UINTN Count -; ) -;------------------------------------------------------------------------------ -InternalMemCopyMem PROC USES rsi rdi - mov rsi, rdx ; rsi <- Source - mov rdi, rcx ; rdi <- Destination - lea r9, [rsi + r8 - 1] ; r9 <- End of Source - cmp rsi, rdi - mov rax, rdi ; rax <- Destination as return value - jae @F - cmp r9, rdi - jae @CopyBackward ; Copy backward if overlapped -@@: - mov rcx, r8 - and r8, 7 - shr rcx, 3 - rep movsq ; Copy as many Qwords as possible - jmp @CopyBytes -@CopyBackward: - mov rsi, r9 ; rsi <- End of Source - lea rdi, [rdi + r8 - 1] ; esi <- End of Destination - std ; set direction flag -@CopyBytes: - mov rcx, r8 - rep movsb ; Copy bytes backward - cld - ret -InternalMemCopyMem ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem16.asm b/MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem16.asm deleted file mode 100644 index a6114db134..0000000000 --- a/MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem16.asm +++ /dev/null @@ -1,53 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ScanMem16.Asm -; -; Abstract: -; -; ScanMem16 function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; CONST VOID * -; EFIAPI -; InternalMemScanMem16 ( -; IN CONST VOID *Buffer, -; IN UINTN Length, -; IN UINT16 Value -; ); -;------------------------------------------------------------------------------ -InternalMemScanMem16 PROC USES rdi - mov rdi, rcx - mov rax, r8 - mov rcx, rdx - repne scasw - lea rax, [rdi - 2] - cmovnz rax, rcx - ret -InternalMemScanMem16 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem32.asm b/MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem32.asm deleted file mode 100644 index 40ff6c9e93..0000000000 --- a/MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem32.asm +++ /dev/null @@ -1,53 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ScanMem32.Asm -; -; Abstract: -; -; ScanMem32 function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; CONST VOID * -; EFIAPI -; InternalMemScanMem32 ( -; IN CONST VOID *Buffer, -; IN UINTN Length, -; IN UINT32 Value -; ); -;------------------------------------------------------------------------------ -InternalMemScanMem32 PROC USES rdi - mov rdi, rcx - mov rax, r8 - mov rcx, rdx - repne scasd - lea rax, [rdi - 4] - cmovnz rax, rcx - ret -InternalMemScanMem32 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem64.asm b/MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem64.asm deleted file mode 100644 index e78da7d019..0000000000 --- a/MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem64.asm +++ /dev/null @@ -1,53 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ScanMem64.Asm -; -; Abstract: -; -; ScanMem64 function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; CONST VOID * -; EFIAPI -; InternalMemScanMem64 ( -; IN CONST VOID *Buffer, -; IN UINTN Length, -; IN UINT64 Value -; ); -;------------------------------------------------------------------------------ -InternalMemScanMem64 PROC USES rdi - mov rdi, rcx - mov rax, r8 - mov rcx, rdx - repne scasq - lea rax, [rdi - 8] - cmovnz rax, rcx - ret -InternalMemScanMem64 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem8.asm b/MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem8.asm deleted file mode 100644 index fee239701d..0000000000 --- a/MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem8.asm +++ /dev/null @@ -1,53 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ScanMem8.Asm -; -; Abstract: -; -; ScanMem8 function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; CONST VOID * -; EFIAPI -; InternalMemScanMem8 ( -; IN CONST VOID *Buffer, -; IN UINTN Length, -; IN UINT8 Value -; ); -;------------------------------------------------------------------------------ -InternalMemScanMem8 PROC USES rdi - mov rdi, rcx - mov rcx, rdx - mov rax, r8 - repne scasb - lea rax, [rdi - 1] - cmovnz rax, rcx ; set rax to 0 if not found - ret -InternalMemScanMem8 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem.asm b/MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem.asm deleted file mode 100644 index 72b640556e..0000000000 --- a/MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem.asm +++ /dev/null @@ -1,45 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; SetMem.Asm -; -; Abstract: -; -; SetMem function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID * -; EFIAPI -; InternalMemSetMem ( -; IN VOID *Buffer, -; IN UINTN Count, -; IN UINT8 Value -; ) -;------------------------------------------------------------------------------ -InternalMemSetMem PROC USES rdi - push rcx ; push Buffer - mov rax, r8 ; rax = Value - mov rdi, rcx ; rdi = Buffer - mov rcx, rdx ; rcx = Count - rep stosb - pop rax ; rax = Buffer - ret -InternalMemSetMem ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem16.asm b/MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem16.asm deleted file mode 100644 index 446e3a35e4..0000000000 --- a/MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem16.asm +++ /dev/null @@ -1,44 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; SetMem16.Asm -; -; Abstract: -; -; SetMem16 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID * -; EFIAPI -; InternalMemSetMem16 ( -; IN VOID *Buffer, -; IN UINTN Count, -; IN UINT16 Value -; ) -;------------------------------------------------------------------------------ -InternalMemSetMem16 PROC USES rdi - mov rdi, rcx - mov rax, r8 - xchg rcx, rdx - rep stosw - mov rax, rdx - ret -InternalMemSetMem16 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem32.asm b/MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem32.asm deleted file mode 100644 index abe733e78c..0000000000 --- a/MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem32.asm +++ /dev/null @@ -1,44 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; SetMem32.Asm -; -; Abstract: -; -; SetMem32 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID * -; EFIAPI -; InternalMemSetMem32 ( -; IN VOID *Buffer, -; IN UINTN Count, -; IN UINT32 Value -; ); -;------------------------------------------------------------------------------ -InternalMemSetMem32 PROC USES rdi - mov rdi, rcx - mov rax, r8 - xchg rcx, rdx - rep stosd - mov rax, rdx - ret -InternalMemSetMem32 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem64.asm b/MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem64.asm deleted file mode 100644 index 0a91105c48..0000000000 --- a/MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem64.asm +++ /dev/null @@ -1,43 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; SetMem64.Asm -; -; Abstract: -; -; SetMem64 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID * -; InternalMemSetMem64 ( -; IN VOID *Buffer, -; IN UINTN Count, -; IN UINT64 Value -; ) -;------------------------------------------------------------------------------ -InternalMemSetMem64 PROC USES rdi - mov rdi, rcx - mov rax, r8 - xchg rcx, rdx - rep stosq - mov rax, rdx - ret -InternalMemSetMem64 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibOptPei/X64/ZeroMem.asm b/MdePkg/Library/BaseMemoryLibOptPei/X64/ZeroMem.asm deleted file mode 100644 index fc4403ae96..0000000000 --- a/MdePkg/Library/BaseMemoryLibOptPei/X64/ZeroMem.asm +++ /dev/null @@ -1,47 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ZeroMem.Asm -; -; Abstract: -; -; ZeroMem function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID * -; InternalMemZeroMem ( -; IN VOID *Buffer, -; IN UINTN Count -; ); -;------------------------------------------------------------------------------ -InternalMemZeroMem PROC USES rdi - push rcx - xor rax, rax - mov rdi, rcx - mov rcx, rdx - shr rcx, 3 - and rdx, 7 - rep stosq - mov ecx, edx - rep stosb - pop rax - ret -InternalMemZeroMem ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf b/MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf index 729e26a492..aa78fe37b5 100644 --- a/MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf +++ b/MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf @@ -4,7 +4,7 @@ # Base Memory Library that uses REP string instructions for # high performance and small size. Optimized for use in PEI. # -# Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.
+# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -70,27 +70,16 @@ Ia32/CopyMem.nasm Ia32/CopyMem.S Ia32/ScanMem64.nasm - Ia32/ScanMem64.asm Ia32/ScanMem32.nasm - Ia32/ScanMem32.asm Ia32/ScanMem16.nasm - Ia32/ScanMem16.asm Ia32/ScanMem8.nasm - Ia32/ScanMem8.asm Ia32/CompareMem.nasm - Ia32/CompareMem.asm Ia32/ZeroMem.nasm - Ia32/ZeroMem.asm Ia32/SetMem64.nasm - Ia32/SetMem64.asm Ia32/SetMem32.nasm - Ia32/SetMem32.asm Ia32/SetMem16.nasm - Ia32/SetMem16.asm Ia32/SetMem.nasm - Ia32/SetMem.asm Ia32/CopyMem.nasm - Ia32/CopyMem.asm Ia32/IsZeroBuffer.nasm [Sources.X64] @@ -117,27 +106,16 @@ X64/CopyMem.nasm X64/CopyMem.S X64/ScanMem64.nasm - X64/ScanMem64.asm X64/ScanMem32.nasm - X64/ScanMem32.asm X64/ScanMem16.nasm - X64/ScanMem16.asm X64/ScanMem8.nasm - X64/ScanMem8.asm X64/CompareMem.nasm - X64/CompareMem.asm X64/ZeroMem.nasm - X64/ZeroMem.asm X64/SetMem64.nasm - X64/SetMem64.asm X64/SetMem32.nasm - X64/SetMem32.asm X64/SetMem16.nasm - X64/SetMem16.asm X64/SetMem.nasm - X64/SetMem.asm X64/CopyMem.nasm - X64/CopyMem.asm X64/IsZeroBuffer.nasm [Packages] diff --git a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/CompareMem.asm b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/CompareMem.asm deleted file mode 100644 index 5a0792d592..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/CompareMem.asm +++ /dev/null @@ -1,56 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; CompareMem.Asm -; -; Abstract: -; -; CompareMem function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; INTN -; EFIAPI -; InternalMemCompareMem ( -; IN CONST VOID *DestinationBuffer, -; IN CONST VOID *SourceBuffer, -; IN UINTN Length -; ); -;------------------------------------------------------------------------------ -InternalMemCompareMem PROC USES esi edi - mov esi, [esp + 12] - mov edi, [esp + 16] - mov ecx, [esp + 20] - repe cmpsb - movzx eax, byte ptr [esi - 1] - movzx edx, byte ptr [edi - 1] - sub eax, edx - ret -InternalMemCompareMem ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/CopyMem.asm b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/CopyMem.asm deleted file mode 100644 index cdb352015f..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/CopyMem.asm +++ /dev/null @@ -1,63 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; CopyMem.Asm -; -; Abstract: -; -; CopyMem function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; VOID * -; InternalMemCopyMem ( -; IN VOID *Destination, -; IN VOID *Source, -; IN UINTN Count -; ) -;------------------------------------------------------------------------------ -InternalMemCopyMem PROC USES esi edi - mov esi, [esp + 16] ; esi <- Source - mov edi, [esp + 12] ; edi <- Destination - mov edx, [esp + 20] ; edx <- Count - lea eax, [esi + edx - 1] ; eax <- End of Source - cmp esi, edi - jae @F - cmp eax, edi - jae @CopyBackward ; Copy backward if overlapped -@@: - mov ecx, edx - and edx, 3 - shr ecx, 2 - rep movsd ; Copy as many Dwords as possible - jmp @CopyBytes -@CopyBackward: - mov esi, eax ; esi <- End of Source - lea edi, [edi + edx - 1] ; edi <- End of Destination - std -@CopyBytes: - mov ecx, edx - rep movsb ; Copy bytes backward - cld - mov eax, [esp + 12] ; eax <- Destination as return value - ret -InternalMemCopyMem ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem16.asm b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem16.asm deleted file mode 100644 index c12eaff27a..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem16.asm +++ /dev/null @@ -1,57 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ScanMem16.Asm -; -; Abstract: -; -; ScanMem16 function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; CONST VOID * -; EFIAPI -; InternalMemScanMem16 ( -; IN CONST VOID *Buffer, -; IN UINTN Length, -; IN UINT16 Value -; ); -;------------------------------------------------------------------------------ -InternalMemScanMem16 PROC USES edi - mov ecx, [esp + 12] - mov edi, [esp + 8] - mov eax, [esp + 16] - repne scasw - lea eax, [edi - 2] - jz @F - mov eax, ecx -@@: - ret -InternalMemScanMem16 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem32.asm b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem32.asm deleted file mode 100644 index b065620594..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem32.asm +++ /dev/null @@ -1,57 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ScanMem32.Asm -; -; Abstract: -; -; ScanMem32 function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; CONST VOID * -; EFIAPI -; InternalMemScanMem32 ( -; IN CONST VOID *Buffer, -; IN UINTN Length, -; IN UINT32 Value -; ); -;------------------------------------------------------------------------------ -InternalMemScanMem32 PROC USES edi - mov ecx, [esp + 12] - mov edi, [esp + 8] - mov eax, [esp + 16] - repne scasd - lea eax, [edi - 4] - jz @F - mov eax, ecx -@@: - ret -InternalMemScanMem32 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem64.asm b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem64.asm deleted file mode 100644 index 96e3b99f72..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem64.asm +++ /dev/null @@ -1,66 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ScanMem64.Asm -; -; Abstract: -; -; ScanMem64 function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; CONST VOID * -; EFIAPI -; InternalMemScanMem64 ( -; IN CONST VOID *Buffer, -; IN UINTN Length, -; IN UINT64 Value -; ); -;------------------------------------------------------------------------------ -InternalMemScanMem64 PROC USES edi - mov ecx, [esp + 12] - mov eax, [esp + 16] - mov edx, [esp + 20] - mov edi, [esp + 8] -@@: - cmp eax, [edi] - lea edi, [edi + 8] - loopne @B - jne @F - cmp edx, [edi - 4] - jecxz @F - jne @B -@@: - lea eax, [edi - 8] - jz @F - mov eax, ecx -@@: - ret -InternalMemScanMem64 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem8.asm b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem8.asm deleted file mode 100644 index 202d58f790..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem8.asm +++ /dev/null @@ -1,57 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ScanMem8.Asm -; -; Abstract: -; -; ScanMem8 function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; CONST VOID * -; EFIAPI -; InternalMemScanMem8 ( -; IN CONST VOID *Buffer, -; IN UINTN Length, -; IN UINT8 Value -; ); -;------------------------------------------------------------------------------ -InternalMemScanMem8 PROC USES edi - mov ecx, [esp + 12] - mov edi, [esp + 8] - mov al, [esp + 16] - repne scasb - lea eax, [edi - 1] - jz @F - mov eax, ecx -@@: - ret -InternalMemScanMem8 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem.asm b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem.asm deleted file mode 100644 index 3fdaba9b07..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem.asm +++ /dev/null @@ -1,45 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; SetMem.Asm -; -; Abstract: -; -; SetMem function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; VOID * -; InternalMemSetMem ( -; IN VOID *Buffer, -; IN UINTN Count, -; IN UINT8 Value -; ) -;------------------------------------------------------------------------------ -InternalMemSetMem PROC USES edi - mov eax, [esp + 16] - mov edi, [esp + 8] - mov ecx, [esp + 12] - rep stosb - mov eax, [esp + 8] - ret -InternalMemSetMem ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem16.asm b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem16.asm deleted file mode 100644 index 3f3350d4f3..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem16.asm +++ /dev/null @@ -1,45 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; SetMem16.Asm -; -; Abstract: -; -; SetMem16 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; VOID * -; InternalMemSetMem16 ( -; IN VOID *Buffer, -; IN UINTN Count, -; IN UINT16 Value -; ) -;------------------------------------------------------------------------------ -InternalMemSetMem16 PROC USES edi - mov eax, [esp + 16] - mov edi, [esp + 8] - mov ecx, [esp + 12] - rep stosw - mov eax, [esp + 8] - ret -InternalMemSetMem16 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem32.asm b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem32.asm deleted file mode 100644 index b27b85bca4..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem32.asm +++ /dev/null @@ -1,45 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; SetMem32.Asm -; -; Abstract: -; -; SetMem32 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; VOID * -; InternalMemSetMem32 ( -; IN VOID *Buffer, -; IN UINTN Count, -; IN UINT32 Value -; ) -;------------------------------------------------------------------------------ -InternalMemSetMem32 PROC USES edi - mov eax, [esp + 16] - mov edi, [esp + 8] - mov ecx, [esp + 12] - rep stosd - mov eax, [esp + 8] - ret -InternalMemSetMem32 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem64.asm b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem64.asm deleted file mode 100644 index 146f3b957d..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem64.asm +++ /dev/null @@ -1,49 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; SetMem64.Asm -; -; Abstract: -; -; SetMem64 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; VOID * -; InternalMemSetMem64 ( -; IN VOID *Buffer, -; IN UINTN Count, -; IN UINT64 Value -; ) -;------------------------------------------------------------------------------ -InternalMemSetMem64 PROC USES edi - mov ecx, [esp + 12] - mov eax, [esp + 16] - mov edx, [esp + 20] - mov edi, [esp + 8] -@@: - mov [edi + ecx*8 - 8], eax - mov [edi + ecx*8 - 4], edx - loop @B - mov eax, edi - ret -InternalMemSetMem64 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ZeroMem.asm b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ZeroMem.asm deleted file mode 100644 index 722bf67d24..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ZeroMem.asm +++ /dev/null @@ -1,50 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ZeroMem.Asm -; -; Abstract: -; -; ZeroMem function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; VOID * -; InternalMemZeroMem ( -; IN VOID *Buffer, -; IN UINTN Count -; ); -;------------------------------------------------------------------------------ -InternalMemZeroMem PROC USES edi - xor eax, eax - mov edi, [esp + 8] - mov ecx, [esp + 12] - mov edx, ecx - shr ecx, 2 - and edx, 3 - push edi - rep stosd - mov ecx, edx - rep stosb - pop eax - ret -InternalMemZeroMem ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/CompareMem.asm b/MdePkg/Library/BaseMemoryLibRepStr/X64/CompareMem.asm deleted file mode 100644 index 0ef05b2fa2..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/X64/CompareMem.asm +++ /dev/null @@ -1,54 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; CompareMem.Asm -; -; Abstract: -; -; CompareMem function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; INTN -; EFIAPI -; InternalMemCompareMem ( -; IN CONST VOID *DestinationBuffer, -; IN CONST VOID *SourceBuffer, -; IN UINTN Length -; ); -;------------------------------------------------------------------------------ -InternalMemCompareMem PROC USES rsi rdi - mov rsi, rcx - mov rdi, rdx - mov rcx, r8 - repe cmpsb - movzx rax, byte ptr [rsi - 1] - movzx rdx, byte ptr [rdi - 1] - sub rax, rdx - ret -InternalMemCompareMem ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/CopyMem.asm b/MdePkg/Library/BaseMemoryLibRepStr/X64/CopyMem.asm deleted file mode 100644 index df2e7cc98a..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/X64/CopyMem.asm +++ /dev/null @@ -1,61 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; CopyMem.Asm -; -; Abstract: -; -; CopyMem function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID * -; EFIAPI -; InternalMemCopyMem ( -; IN VOID *Destination, -; IN VOID *Source, -; IN UINTN Count -; ) -;------------------------------------------------------------------------------ -InternalMemCopyMem PROC USES rsi rdi - mov rsi, rdx ; rsi <- Source - mov rdi, rcx ; rdi <- Destination - lea r9, [rsi + r8 - 1] ; r9 <- End of Source - cmp rsi, rdi - mov rax, rdi ; rax <- Destination as return value - jae @F - cmp r9, rdi - jae @CopyBackward ; Copy backward if overlapped -@@: - mov rcx, r8 - and r8, 7 - shr rcx, 3 - rep movsq ; Copy as many Qwords as possible - jmp @CopyBytes -@CopyBackward: - mov rsi, r9 ; rsi <- End of Source - lea rdi, [rdi + r8 - 1] ; esi <- End of Destination - std ; set direction flag -@CopyBytes: - mov rcx, r8 - rep movsb ; Copy bytes backward - cld - ret -InternalMemCopyMem ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem16.asm b/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem16.asm deleted file mode 100644 index a6114db134..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem16.asm +++ /dev/null @@ -1,53 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ScanMem16.Asm -; -; Abstract: -; -; ScanMem16 function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; CONST VOID * -; EFIAPI -; InternalMemScanMem16 ( -; IN CONST VOID *Buffer, -; IN UINTN Length, -; IN UINT16 Value -; ); -;------------------------------------------------------------------------------ -InternalMemScanMem16 PROC USES rdi - mov rdi, rcx - mov rax, r8 - mov rcx, rdx - repne scasw - lea rax, [rdi - 2] - cmovnz rax, rcx - ret -InternalMemScanMem16 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem32.asm b/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem32.asm deleted file mode 100644 index 40ff6c9e93..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem32.asm +++ /dev/null @@ -1,53 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ScanMem32.Asm -; -; Abstract: -; -; ScanMem32 function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; CONST VOID * -; EFIAPI -; InternalMemScanMem32 ( -; IN CONST VOID *Buffer, -; IN UINTN Length, -; IN UINT32 Value -; ); -;------------------------------------------------------------------------------ -InternalMemScanMem32 PROC USES rdi - mov rdi, rcx - mov rax, r8 - mov rcx, rdx - repne scasd - lea rax, [rdi - 4] - cmovnz rax, rcx - ret -InternalMemScanMem32 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem64.asm b/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem64.asm deleted file mode 100644 index e78da7d019..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem64.asm +++ /dev/null @@ -1,53 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ScanMem64.Asm -; -; Abstract: -; -; ScanMem64 function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; CONST VOID * -; EFIAPI -; InternalMemScanMem64 ( -; IN CONST VOID *Buffer, -; IN UINTN Length, -; IN UINT64 Value -; ); -;------------------------------------------------------------------------------ -InternalMemScanMem64 PROC USES rdi - mov rdi, rcx - mov rax, r8 - mov rcx, rdx - repne scasq - lea rax, [rdi - 8] - cmovnz rax, rcx - ret -InternalMemScanMem64 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem8.asm b/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem8.asm deleted file mode 100644 index fee239701d..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem8.asm +++ /dev/null @@ -1,53 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ScanMem8.Asm -; -; Abstract: -; -; ScanMem8 function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; CONST VOID * -; EFIAPI -; InternalMemScanMem8 ( -; IN CONST VOID *Buffer, -; IN UINTN Length, -; IN UINT8 Value -; ); -;------------------------------------------------------------------------------ -InternalMemScanMem8 PROC USES rdi - mov rdi, rcx - mov rcx, rdx - mov rax, r8 - repne scasb - lea rax, [rdi - 1] - cmovnz rax, rcx ; set rax to 0 if not found - ret -InternalMemScanMem8 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem.asm b/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem.asm deleted file mode 100644 index ef15710a80..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem.asm +++ /dev/null @@ -1,44 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; SetMem.Asm -; -; Abstract: -; -; SetMem function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID * -; EFIAPI -; InternalMemSetMem ( -; IN VOID *Buffer, -; IN UINTN Count, -; IN UINT8 Value -; ) -;------------------------------------------------------------------------------ -InternalMemSetMem PROC USES rdi - mov rax, r8 ; rax = Value - mov rdi, rcx ; rdi = Buffer - xchg rcx, rdx ; rcx = Count, rdx = Buffer - rep stosb - mov rax, rdx ; rax = Buffer - ret -InternalMemSetMem ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem16.asm b/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem16.asm deleted file mode 100644 index 446e3a35e4..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem16.asm +++ /dev/null @@ -1,44 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; SetMem16.Asm -; -; Abstract: -; -; SetMem16 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID * -; EFIAPI -; InternalMemSetMem16 ( -; IN VOID *Buffer, -; IN UINTN Count, -; IN UINT16 Value -; ) -;------------------------------------------------------------------------------ -InternalMemSetMem16 PROC USES rdi - mov rdi, rcx - mov rax, r8 - xchg rcx, rdx - rep stosw - mov rax, rdx - ret -InternalMemSetMem16 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem32.asm b/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem32.asm deleted file mode 100644 index abe733e78c..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem32.asm +++ /dev/null @@ -1,44 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; SetMem32.Asm -; -; Abstract: -; -; SetMem32 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID * -; EFIAPI -; InternalMemSetMem32 ( -; IN VOID *Buffer, -; IN UINTN Count, -; IN UINT32 Value -; ); -;------------------------------------------------------------------------------ -InternalMemSetMem32 PROC USES rdi - mov rdi, rcx - mov rax, r8 - xchg rcx, rdx - rep stosd - mov rax, rdx - ret -InternalMemSetMem32 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem64.asm b/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem64.asm deleted file mode 100644 index 0a91105c48..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem64.asm +++ /dev/null @@ -1,43 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; SetMem64.Asm -; -; Abstract: -; -; SetMem64 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID * -; InternalMemSetMem64 ( -; IN VOID *Buffer, -; IN UINTN Count, -; IN UINT64 Value -; ) -;------------------------------------------------------------------------------ -InternalMemSetMem64 PROC USES rdi - mov rdi, rcx - mov rax, r8 - xchg rcx, rdx - rep stosq - mov rax, rdx - ret -InternalMemSetMem64 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/ZeroMem.asm b/MdePkg/Library/BaseMemoryLibRepStr/X64/ZeroMem.asm deleted file mode 100644 index fc4403ae96..0000000000 --- a/MdePkg/Library/BaseMemoryLibRepStr/X64/ZeroMem.asm +++ /dev/null @@ -1,47 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ZeroMem.Asm -; -; Abstract: -; -; ZeroMem function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID * -; InternalMemZeroMem ( -; IN VOID *Buffer, -; IN UINTN Count -; ); -;------------------------------------------------------------------------------ -InternalMemZeroMem PROC USES rdi - push rcx - xor rax, rax - mov rdi, rcx - mov rcx, rdx - shr rcx, 3 - and rdx, 7 - rep stosq - mov ecx, edx - rep stosb - pop rax - ret -InternalMemZeroMem ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibSse2/BaseMemoryLibSse2.inf b/MdePkg/Library/BaseMemoryLibSse2/BaseMemoryLibSse2.inf index fc82b16305..5b2417a9b0 100644 --- a/MdePkg/Library/BaseMemoryLibSse2/BaseMemoryLibSse2.inf +++ b/MdePkg/Library/BaseMemoryLibSse2/BaseMemoryLibSse2.inf @@ -3,7 +3,7 @@ # # Base Memory Library that uses SSE2 registers for high performance. # -# Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.
+# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -69,52 +69,30 @@ Ia32/CopyMem.nasm Ia32/CopyMem.S Ia32/ScanMem64.nasm - Ia32/ScanMem64.asm Ia32/ScanMem32.nasm - Ia32/ScanMem32.asm Ia32/ScanMem16.nasm - Ia32/ScanMem16.asm Ia32/ScanMem8.nasm - Ia32/ScanMem8.asm Ia32/CompareMem.nasm - Ia32/CompareMem.asm Ia32/ZeroMem.nasm - Ia32/ZeroMem.asm Ia32/SetMem64.nasm - Ia32/SetMem64.asm Ia32/SetMem32.nasm - Ia32/SetMem32.asm Ia32/SetMem16.nasm - Ia32/SetMem16.asm Ia32/SetMem.nasm - Ia32/SetMem.asm Ia32/CopyMem.nasm - Ia32/CopyMem.asm Ia32/IsZeroBuffer.nasm [Sources.X64] X64/ScanMem64.nasm - X64/ScanMem64.asm X64/ScanMem32.nasm - X64/ScanMem32.asm X64/ScanMem16.nasm - X64/ScanMem16.asm X64/ScanMem8.nasm - X64/ScanMem8.asm X64/CompareMem.nasm - X64/CompareMem.asm X64/ZeroMem.nasm - X64/ZeroMem.asm X64/SetMem64.nasm - X64/SetMem64.asm X64/SetMem32.nasm - X64/SetMem32.asm X64/SetMem16.nasm - X64/SetMem16.asm X64/SetMem.nasm - X64/SetMem.asm X64/CopyMem.nasm - X64/CopyMem.asm X64/ScanMem64.nasm X64/ScanMem64.S X64/ScanMem32.nasm diff --git a/MdePkg/Library/BaseMemoryLibSse2/Ia32/CompareMem.asm b/MdePkg/Library/BaseMemoryLibSse2/Ia32/CompareMem.asm deleted file mode 100644 index 5a0792d592..0000000000 --- a/MdePkg/Library/BaseMemoryLibSse2/Ia32/CompareMem.asm +++ /dev/null @@ -1,56 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; CompareMem.Asm -; -; Abstract: -; -; CompareMem function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; INTN -; EFIAPI -; InternalMemCompareMem ( -; IN CONST VOID *DestinationBuffer, -; IN CONST VOID *SourceBuffer, -; IN UINTN Length -; ); -;------------------------------------------------------------------------------ -InternalMemCompareMem PROC USES esi edi - mov esi, [esp + 12] - mov edi, [esp + 16] - mov ecx, [esp + 20] - repe cmpsb - movzx eax, byte ptr [esi - 1] - movzx edx, byte ptr [edi - 1] - sub eax, edx - ret -InternalMemCompareMem ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibSse2/Ia32/CopyMem.asm b/MdePkg/Library/BaseMemoryLibSse2/Ia32/CopyMem.asm deleted file mode 100644 index a57a628bb2..0000000000 --- a/MdePkg/Library/BaseMemoryLibSse2/Ia32/CopyMem.asm +++ /dev/null @@ -1,84 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; CopyMem.asm -; -; Abstract: -; -; CopyMem function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .xmm - .code - -;------------------------------------------------------------------------------ -; VOID * -; InternalMemCopyMem ( -; IN VOID *Destination, -; IN VOID *Source, -; IN UINTN Count -; ); -;------------------------------------------------------------------------------ -InternalMemCopyMem PROC USES esi edi - mov esi, [esp + 16] ; esi <- Source - mov edi, [esp + 12] ; edi <- Destination - mov edx, [esp + 20] ; edx <- Count - lea eax, [esi + edx - 1] ; eax <- End of Source - cmp esi, edi - jae @F - cmp eax, edi ; Overlapped? - jae @CopyBackward ; Copy backward if overlapped -@@: - xor ecx, ecx - sub ecx, edi - and ecx, 15 ; ecx + edi aligns on 16-byte boundary - jz @F - cmp ecx, edx - cmova ecx, edx - sub edx, ecx ; edx <- remaining bytes to copy - rep movsb -@@: - mov ecx, edx - and edx, 15 - shr ecx, 4 ; ecx <- # of DQwords to copy - jz @CopyBytes - add esp, -16 - movdqu [esp], xmm0 ; save xmm0 -@@: - movdqu xmm0, [esi] ; esi may not be 16-bytes aligned - movntdq [edi], xmm0 ; edi should be 16-bytes aligned - add esi, 16 - add edi, 16 - loop @B - mfence - movdqu xmm0, [esp] ; restore xmm0 - add esp, 16 ; stack cleanup - jmp @CopyBytes -@CopyBackward: - mov esi, eax ; esi <- Last byte in Source - lea edi, [edi + edx - 1] ; edi <- Last byte in Destination - std -@CopyBytes: - mov ecx, edx - rep movsb - cld - mov eax, [esp + 12] ; eax <- Destination as return value - ret -InternalMemCopyMem ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibSse2/Ia32/ScanMem16.asm b/MdePkg/Library/BaseMemoryLibSse2/Ia32/ScanMem16.asm deleted file mode 100644 index 0ee190e46a..0000000000 --- a/MdePkg/Library/BaseMemoryLibSse2/Ia32/ScanMem16.asm +++ /dev/null @@ -1,55 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ScanMem16.Asm -; -; Abstract: -; -; ScanMem16 function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; CONST VOID * -; EFIAPI -; InternalMemScanMem16 ( -; IN CONST VOID *Buffer, -; IN UINTN Length, -; IN UINT16 Value -; ); -;------------------------------------------------------------------------------ -InternalMemScanMem16 PROC USES edi - mov ecx, [esp + 12] - mov edi, [esp + 8] - mov eax, [esp + 16] - repne scasw - lea eax, [edi - 2] - cmovnz eax, ecx - ret -InternalMemScanMem16 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibSse2/Ia32/ScanMem32.asm b/MdePkg/Library/BaseMemoryLibSse2/Ia32/ScanMem32.asm deleted file mode 100644 index adbf295621..0000000000 --- a/MdePkg/Library/BaseMemoryLibSse2/Ia32/ScanMem32.asm +++ /dev/null @@ -1,55 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ScanMem32.Asm -; -; Abstract: -; -; ScanMem32 function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; CONST VOID * -; EFIAPI -; InternalMemScanMem32 ( -; IN CONST VOID *Buffer, -; IN UINTN Length, -; IN UINT32 Value -; ); -;------------------------------------------------------------------------------ -InternalMemScanMem32 PROC USES edi - mov ecx, [esp + 12] - mov edi, [esp + 8] - mov eax, [esp + 16] - repne scasd - lea eax, [edi - 4] - cmovnz eax, ecx - ret -InternalMemScanMem32 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibSse2/Ia32/ScanMem64.asm b/MdePkg/Library/BaseMemoryLibSse2/Ia32/ScanMem64.asm deleted file mode 100644 index 0a0f5d0468..0000000000 --- a/MdePkg/Library/BaseMemoryLibSse2/Ia32/ScanMem64.asm +++ /dev/null @@ -1,64 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ScanMem64.Asm -; -; Abstract: -; -; ScanMem64 function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; CONST VOID * -; EFIAPI -; InternalMemScanMem64 ( -; IN CONST VOID *Buffer, -; IN UINTN Length, -; IN UINT64 Value -; ); -;------------------------------------------------------------------------------ -InternalMemScanMem64 PROC USES edi - mov ecx, [esp + 12] - mov eax, [esp + 16] - mov edx, [esp + 20] - mov edi, [esp + 8] -@@: - cmp eax, [edi] - lea edi, [edi + 8] - loopne @B - jne @F - cmp edx, [edi - 4] - jecxz @F - jne @B -@@: - lea eax, [edi - 8] - cmovne eax, ecx - ret -InternalMemScanMem64 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibSse2/Ia32/ScanMem8.asm b/MdePkg/Library/BaseMemoryLibSse2/Ia32/ScanMem8.asm deleted file mode 100644 index c64d41d6c1..0000000000 --- a/MdePkg/Library/BaseMemoryLibSse2/Ia32/ScanMem8.asm +++ /dev/null @@ -1,55 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ScanMem8.Asm -; -; Abstract: -; -; ScanMem8 function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; CONST VOID * -; EFIAPI -; InternalMemScanMem8 ( -; IN CONST VOID *Buffer, -; IN UINTN Length, -; IN UINT8 Value -; ); -;------------------------------------------------------------------------------ -InternalMemScanMem8 PROC USES edi - mov ecx, [esp + 12] - mov edi, [esp + 8] - mov al, [esp + 16] - repne scasb - lea eax, [edi - 1] - cmovnz eax, ecx - ret -InternalMemScanMem8 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem.asm b/MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem.asm deleted file mode 100644 index 369cc00b63..0000000000 --- a/MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem.asm +++ /dev/null @@ -1,75 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; SetMem.asm -; -; Abstract: -; -; SetMem function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .xmm - .code - -;------------------------------------------------------------------------------ -; VOID * -; EFIAPI -; InternalMemSetMem ( -; IN VOID *Buffer, -; IN UINTN Count, -; IN UINT8 Value -; ); -;------------------------------------------------------------------------------ -InternalMemSetMem PROC USES edi - mov edx, [esp + 12] ; edx <- Count - mov edi, [esp + 8] ; edi <- Buffer - mov al, [esp + 16] ; al <- Value - xor ecx, ecx - sub ecx, edi - and ecx, 15 ; ecx + edi aligns on 16-byte boundary - jz @F - cmp ecx, edx - cmova ecx, edx - sub edx, ecx - rep stosb -@@: - mov ecx, edx - and edx, 15 - shr ecx, 4 ; ecx <- # of DQwords to set - jz @SetBytes - mov ah, al ; ax <- Value | (Value << 8) - add esp, -16 - movdqu [esp], xmm0 ; save xmm0 - movd xmm0, eax - pshuflw xmm0, xmm0, 0 ; xmm0[0..63] <- Value repeats 8 times - movlhps xmm0, xmm0 ; xmm0 <- Value repeats 16 times -@@: - movntdq [edi], xmm0 ; edi should be 16-byte aligned - add edi, 16 - loop @B - mfence - movdqu xmm0, [esp] ; restore xmm0 - add esp, 16 ; stack cleanup -@SetBytes: - mov ecx, edx - rep stosb - mov eax, [esp + 8] ; eax <- Buffer as return value - ret -InternalMemSetMem ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem16.asm b/MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem16.asm deleted file mode 100644 index 3725512c0a..0000000000 --- a/MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem16.asm +++ /dev/null @@ -1,71 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; SetMem16.asm -; -; Abstract: -; -; SetMem16 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .xmm - .code - -;------------------------------------------------------------------------------ -; VOID * -; EFIAPI -; InternalMemSetMem16 ( -; IN VOID *Buffer, -; IN UINTN Count, -; IN UINT16 Value -; ); -;------------------------------------------------------------------------------ -InternalMemSetMem16 PROC USES edi - mov edx, [esp + 12] - mov edi, [esp + 8] - xor ecx, ecx - sub ecx, edi - and ecx, 15 ; ecx + edi aligns on 16-byte boundary - mov eax, [esp + 16] - jz @F - shr ecx, 1 - cmp ecx, edx - cmova ecx, edx - sub edx, ecx - rep stosw -@@: - mov ecx, edx - and edx, 7 - shr ecx, 3 - jz @SetWords - movd xmm0, eax - pshuflw xmm0, xmm0, 0 - movlhps xmm0, xmm0 -@@: - movntdq [edi], xmm0 ; edi should be 16-byte aligned - add edi, 16 - loop @B - mfence -@SetWords: - mov ecx, edx - rep stosw - mov eax, [esp + 8] - ret -InternalMemSetMem16 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem32.asm b/MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem32.asm deleted file mode 100644 index 4c3aa4249f..0000000000 --- a/MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem32.asm +++ /dev/null @@ -1,70 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; SetMem32.asm -; -; Abstract: -; -; SetMem32 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .xmm - .code - -;------------------------------------------------------------------------------ -; VOID * -; EFIAPI -; InternalMemSetMem32 ( -; IN VOID *Buffer, -; IN UINTN Count, -; IN UINT32 Value -; ); -;------------------------------------------------------------------------------ -InternalMemSetMem32 PROC USES edi - mov edx, [esp + 12] - mov edi, [esp + 8] - xor ecx, ecx - sub ecx, edi - and ecx, 15 ; ecx + edi aligns on 16-byte boundary - mov eax, [esp + 16] - jz @F - shr ecx, 2 - cmp ecx, edx - cmova ecx, edx - sub edx, ecx - rep stosd -@@: - mov ecx, edx - and edx, 3 - shr ecx, 2 - jz @SetDwords - movd xmm0, eax - pshufd xmm0, xmm0, 0 -@@: - movntdq [edi], xmm0 - add edi, 16 - loop @B - mfence -@SetDwords: - mov ecx, edx - rep stosd - mov eax, [esp + 8] - ret -InternalMemSetMem32 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem64.asm b/MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem64.asm deleted file mode 100644 index d6f52a0239..0000000000 --- a/MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem64.asm +++ /dev/null @@ -1,64 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; SetMem64.asm -; -; Abstract: -; -; SetMem64 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .xmm - .code - -;------------------------------------------------------------------------------ -; VOID * -; EFIAPI -; InternalMemSetMem64 ( -; IN VOID *Buffer, -; IN UINTN Count, -; IN UINT64 Value -; ) -;------------------------------------------------------------------------------ -InternalMemSetMem64 PROC - mov eax, [esp + 4] ; eax <- Buffer - mov ecx, [esp + 8] ; ecx <- Count - test al, 8 - mov edx, eax - movq xmm0, qword ptr [esp + 12] - jz @F - movq qword ptr [edx], xmm0 - add edx, 8 - dec ecx -@@: - shr ecx, 1 - jz @SetQwords - movlhps xmm0, xmm0 -@@: - movntdq [edx], xmm0 - lea edx, [edx + 16] - loop @B - mfence -@SetQwords: - jnc @F - movq qword ptr [edx], xmm0 -@@: - ret -InternalMemSetMem64 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibSse2/Ia32/ZeroMem.asm b/MdePkg/Library/BaseMemoryLibSse2/Ia32/ZeroMem.asm deleted file mode 100644 index 97252b145b..0000000000 --- a/MdePkg/Library/BaseMemoryLibSse2/Ia32/ZeroMem.asm +++ /dev/null @@ -1,67 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ZeroMem.asm -; -; Abstract: -; -; ZeroMem function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .686 - .model flat,C - .xmm - .code - -;------------------------------------------------------------------------------ -; VOID * -; EFIAPI -; InternalMemZeroMem ( -; IN VOID *Buffer, -; IN UINTN Count -; ); -;------------------------------------------------------------------------------ -InternalMemZeroMem PROC USES edi - mov edi, [esp + 8] - mov edx, [esp + 12] - xor ecx, ecx - sub ecx, edi - xor eax, eax - and ecx, 15 - jz @F - cmp ecx, edx - cmova ecx, edx - sub edx, ecx - rep stosb -@@: - mov ecx, edx - and edx, 15 - shr ecx, 4 - jz @ZeroBytes - pxor xmm0, xmm0 -@@: - movntdq [edi], xmm0 - add edi, 16 - loop @B - mfence -@ZeroBytes: - mov ecx, edx - rep stosb - mov eax, [esp + 8] - ret -InternalMemZeroMem ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibSse2/X64/CompareMem.asm b/MdePkg/Library/BaseMemoryLibSse2/X64/CompareMem.asm deleted file mode 100644 index 0ef05b2fa2..0000000000 --- a/MdePkg/Library/BaseMemoryLibSse2/X64/CompareMem.asm +++ /dev/null @@ -1,54 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; CompareMem.Asm -; -; Abstract: -; -; CompareMem function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; INTN -; EFIAPI -; InternalMemCompareMem ( -; IN CONST VOID *DestinationBuffer, -; IN CONST VOID *SourceBuffer, -; IN UINTN Length -; ); -;------------------------------------------------------------------------------ -InternalMemCompareMem PROC USES rsi rdi - mov rsi, rcx - mov rdi, rdx - mov rcx, r8 - repe cmpsb - movzx rax, byte ptr [rsi - 1] - movzx rdx, byte ptr [rdi - 1] - sub rax, rdx - ret -InternalMemCompareMem ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibSse2/X64/CopyMem.asm b/MdePkg/Library/BaseMemoryLibSse2/X64/CopyMem.asm deleted file mode 100644 index 8bcaca7cbe..0000000000 --- a/MdePkg/Library/BaseMemoryLibSse2/X64/CopyMem.asm +++ /dev/null @@ -1,79 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; CopyMem.asm -; -; Abstract: -; -; CopyMem function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID * -; EFIAPI -; InternalMemCopyMem ( -; IN VOID *Destination, -; IN VOID *Source, -; IN UINTN Count -; ); -;------------------------------------------------------------------------------ -InternalMemCopyMem PROC USES rsi rdi - mov rsi, rdx ; rsi <- Source - mov rdi, rcx ; rdi <- Destination - lea r9, [rsi + r8 - 1] ; r9 <- Last byte of Source - cmp rsi, rdi - mov rax, rdi ; rax <- Destination as return value - jae @F ; Copy forward if Source > Destination - cmp r9, rdi ; Overlapped? - jae @CopyBackward ; Copy backward if overlapped -@@: - xor rcx, rcx - sub rcx, rdi ; rcx <- -rdi - and rcx, 15 ; rcx + rsi should be 16 bytes aligned - jz @F ; skip if rcx == 0 - cmp rcx, r8 - cmova rcx, r8 - sub r8, rcx - rep movsb -@@: - mov rcx, r8 - and r8, 15 - shr rcx, 4 ; rcx <- # of DQwords to copy - jz @CopyBytes - movdqa [rsp + 18h], xmm0 ; save xmm0 on stack -@@: - movdqu xmm0, [rsi] ; rsi may not be 16-byte aligned - movntdq [rdi], xmm0 ; rdi should be 16-byte aligned - add rsi, 16 - add rdi, 16 - loop @B - mfence - movdqa xmm0, [rsp + 18h] ; restore xmm0 - jmp @CopyBytes ; copy remaining bytes -@CopyBackward: - mov rsi, r9 ; rsi <- Last byte of Source - lea rdi, [rdi + r8 - 1] ; rdi <- Last byte of Destination - std -@CopyBytes: - mov rcx, r8 - rep movsb - cld - ret -InternalMemCopyMem ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem16.asm b/MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem16.asm deleted file mode 100644 index a6114db134..0000000000 --- a/MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem16.asm +++ /dev/null @@ -1,53 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ScanMem16.Asm -; -; Abstract: -; -; ScanMem16 function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; CONST VOID * -; EFIAPI -; InternalMemScanMem16 ( -; IN CONST VOID *Buffer, -; IN UINTN Length, -; IN UINT16 Value -; ); -;------------------------------------------------------------------------------ -InternalMemScanMem16 PROC USES rdi - mov rdi, rcx - mov rax, r8 - mov rcx, rdx - repne scasw - lea rax, [rdi - 2] - cmovnz rax, rcx - ret -InternalMemScanMem16 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem32.asm b/MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem32.asm deleted file mode 100644 index 40ff6c9e93..0000000000 --- a/MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem32.asm +++ /dev/null @@ -1,53 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ScanMem32.Asm -; -; Abstract: -; -; ScanMem32 function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; CONST VOID * -; EFIAPI -; InternalMemScanMem32 ( -; IN CONST VOID *Buffer, -; IN UINTN Length, -; IN UINT32 Value -; ); -;------------------------------------------------------------------------------ -InternalMemScanMem32 PROC USES rdi - mov rdi, rcx - mov rax, r8 - mov rcx, rdx - repne scasd - lea rax, [rdi - 4] - cmovnz rax, rcx - ret -InternalMemScanMem32 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem64.asm b/MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem64.asm deleted file mode 100644 index e78da7d019..0000000000 --- a/MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem64.asm +++ /dev/null @@ -1,53 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ScanMem64.Asm -; -; Abstract: -; -; ScanMem64 function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; CONST VOID * -; EFIAPI -; InternalMemScanMem64 ( -; IN CONST VOID *Buffer, -; IN UINTN Length, -; IN UINT64 Value -; ); -;------------------------------------------------------------------------------ -InternalMemScanMem64 PROC USES rdi - mov rdi, rcx - mov rax, r8 - mov rcx, rdx - repne scasq - lea rax, [rdi - 8] - cmovnz rax, rcx - ret -InternalMemScanMem64 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem8.asm b/MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem8.asm deleted file mode 100644 index fee239701d..0000000000 --- a/MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem8.asm +++ /dev/null @@ -1,53 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ScanMem8.Asm -; -; Abstract: -; -; ScanMem8 function -; -; Notes: -; -; The following BaseMemoryLib instances contain the same copy of this file: -; -; BaseMemoryLibRepStr -; BaseMemoryLibMmx -; BaseMemoryLibSse2 -; BaseMemoryLibOptDxe -; BaseMemoryLibOptPei -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; CONST VOID * -; EFIAPI -; InternalMemScanMem8 ( -; IN CONST VOID *Buffer, -; IN UINTN Length, -; IN UINT8 Value -; ); -;------------------------------------------------------------------------------ -InternalMemScanMem8 PROC USES rdi - mov rdi, rcx - mov rcx, rdx - mov rax, r8 - repne scasb - lea rax, [rdi - 1] - cmovnz rax, rcx ; set rax to 0 if not found - ret -InternalMemScanMem8 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem.asm b/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem.asm deleted file mode 100644 index 52b069c2bc..0000000000 --- a/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem.asm +++ /dev/null @@ -1,69 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; SetMem.asm -; -; Abstract: -; -; SetMem function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID * -; InternalMemSetMem ( -; IN VOID *Buffer, -; IN UINTN Count, -; IN UINT8 Value -; ) -;------------------------------------------------------------------------------ -InternalMemSetMem PROC USES rdi - mov rdi, rcx ; rdi <- Buffer - mov al, r8b ; al <- Value - mov r9, rdi ; r9 <- Buffer as return value - xor rcx, rcx - sub rcx, rdi - and rcx, 15 ; rcx + rdi aligns on 16-byte boundary - jz @F - cmp rcx, rdx - cmova rcx, rdx - sub rdx, rcx - rep stosb -@@: - mov rcx, rdx - and rdx, 15 - shr rcx, 4 - jz @SetBytes - mov ah, al ; ax <- Value repeats twice - movdqa [rsp + 10h], xmm0 ; save xmm0 - movd xmm0, eax ; xmm0[0..16] <- Value repeats twice - pshuflw xmm0, xmm0, 0 ; xmm0[0..63] <- Value repeats 8 times - movlhps xmm0, xmm0 ; xmm0 <- Value repeats 16 times -@@: - movntdq [rdi], xmm0 ; rdi should be 16-byte aligned - add rdi, 16 - loop @B - mfence - movdqa xmm0, [rsp + 10h] ; restore xmm0 -@SetBytes: - mov ecx, edx ; high 32 bits of rcx are always zero - rep stosb - mov rax, r9 ; rax <- Return value - ret -InternalMemSetMem ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem16.asm b/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem16.asm deleted file mode 100644 index 8cb09acc45..0000000000 --- a/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem16.asm +++ /dev/null @@ -1,67 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; SetMem16.asm -; -; Abstract: -; -; SetMem16 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID * -; InternalMemSetMem16 ( -; IN VOID *Buffer, -; IN UINTN Count, -; IN UINT16 Value -; ) -;------------------------------------------------------------------------------ -InternalMemSetMem16 PROC USES rdi - mov rdi, rcx - mov r9, rdi - xor rcx, rcx - sub rcx, rdi - and rcx, 15 - mov rax, r8 - jz @F - shr rcx, 1 - cmp rcx, rdx - cmova rcx, rdx - sub rdx, rcx - rep stosw -@@: - mov rcx, rdx - and edx, 7 - shr rcx, 3 - jz @SetWords - movd xmm0, eax - pshuflw xmm0, xmm0, 0 - movlhps xmm0, xmm0 -@@: - movntdq [rdi], xmm0 - add rdi, 16 - loop @B - mfence -@SetWords: - mov ecx, edx - rep stosw - mov rax, r9 - ret -InternalMemSetMem16 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem32.asm b/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem32.asm deleted file mode 100644 index 92404a004d..0000000000 --- a/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem32.asm +++ /dev/null @@ -1,66 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; SetMem32.asm -; -; Abstract: -; -; SetMem32 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID * -; InternalMemSetMem32 ( -; IN VOID *Buffer, -; IN UINTN Count, -; IN UINT8 Value -; ) -;------------------------------------------------------------------------------ -InternalMemSetMem32 PROC USES rdi - mov rdi, rcx - mov r9, rdi - xor rcx, rcx - sub rcx, rdi - and rcx, 15 - mov rax, r8 - jz @F - shr rcx, 2 - cmp rcx, rdx - cmova rcx, rdx - sub rdx, rcx - rep stosd -@@: - mov rcx, rdx - and edx, 3 - shr rcx, 2 - jz @SetDwords - movd xmm0, eax - pshufd xmm0, xmm0, 0 -@@: - movntdq [rdi], xmm0 - add rdi, 16 - loop @B - mfence -@SetDwords: - mov ecx, edx - rep stosd - mov rax, r9 - ret -InternalMemSetMem32 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem64.asm b/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem64.asm deleted file mode 100644 index 5071f6771f..0000000000 --- a/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem64.asm +++ /dev/null @@ -1,59 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; SetMem64.asm -; -; Abstract: -; -; SetMem64 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID * -; InternalMemSetMem64 ( -; IN VOID *Buffer, -; IN UINTN Count, -; IN UINT64 Value -; ) -;------------------------------------------------------------------------------ -InternalMemSetMem64 PROC - mov rax, rcx ; rax <- Buffer - xchg rcx, rdx ; rcx <- Count & rdx <- Buffer - test dl, 8 - movd xmm0, r8 - jz @F - mov [rdx], r8 - add rdx, 8 - dec rcx -@@: - shr rcx, 1 - jz @SetQwords - movlhps xmm0, xmm0 -@@: - movntdq [rdx], xmm0 - lea rdx, [rdx + 16] - loop @B - mfence -@SetQwords: - jnc @F - mov [rdx], r8 -@@: - ret -InternalMemSetMem64 ENDP - - END diff --git a/MdePkg/Library/BaseMemoryLibSse2/X64/ZeroMem.asm b/MdePkg/Library/BaseMemoryLibSse2/X64/ZeroMem.asm deleted file mode 100644 index d304729068..0000000000 --- a/MdePkg/Library/BaseMemoryLibSse2/X64/ZeroMem.asm +++ /dev/null @@ -1,63 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; ZeroMem.asm -; -; Abstract: -; -; ZeroMem function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; VOID * -; InternalMemZeroMem ( -; IN VOID *Buffer, -; IN UINTN Count -; ) -;------------------------------------------------------------------------------ -InternalMemZeroMem PROC USES rdi - mov rdi, rcx - xor rcx, rcx - xor eax, eax - sub rcx, rdi - and rcx, 15 - mov r8, rdi - jz @F - cmp rcx, rdx - cmova rcx, rdx - sub rdx, rcx - rep stosb -@@: - mov rcx, rdx - and edx, 15 - shr rcx, 4 - jz @ZeroBytes - pxor xmm0, xmm0 -@@: - movntdq [rdi], xmm0 ; rdi should be 16-byte aligned - add rdi, 16 - loop @B - mfence -@ZeroBytes: - mov ecx, edx - rep stosb - mov rax, r8 - ret -InternalMemZeroMem ENDP - - END diff --git a/MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLib.inf b/MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLib.inf index 6fca7dd293..03562c6e56 100755 --- a/MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLib.inf +++ b/MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLib.inf @@ -1,7 +1,7 @@ ## @file # Base Synchronization Library implementation. # -# Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.
+# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
# Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
# # This program and the accompanying materials @@ -39,15 +39,10 @@ SynchronizationMsc.c | MSFT Ia32/InterlockedCompareExchange64.nasm| INTEL - Ia32/InterlockedCompareExchange64.asm | INTEL Ia32/InterlockedCompareExchange32.nasm| INTEL - Ia32/InterlockedCompareExchange32.asm | INTEL Ia32/InterlockedCompareExchange16.nasm| INTEL - Ia32/InterlockedCompareExchange16.asm | INTEL Ia32/InterlockedDecrement.nasm| INTEL - Ia32/InterlockedDecrement.asm | INTEL Ia32/InterlockedIncrement.nasm| INTEL - Ia32/InterlockedIncrement.asm | INTEL Synchronization.c | INTEL Ia32/InternalGetSpinLockProperties.c | GCC @@ -61,20 +56,15 @@ X64/InterlockedCompareExchange16.c | MSFT X64/InterlockedCompareExchange64.nasm| INTEL - X64/InterlockedCompareExchange64.asm | INTEL X64/InterlockedCompareExchange32.nasm| INTEL - X64/InterlockedCompareExchange32.asm | INTEL X64/InterlockedCompareExchange16.nasm| INTEL - X64/InterlockedCompareExchange16.asm | INTEL X64/InterlockedDecrement.c | MSFT X64/InterlockedIncrement.c | MSFT SynchronizationMsc.c | MSFT X64/InterlockedDecrement.nasm| INTEL - X64/InterlockedDecrement.asm | INTEL X64/InterlockedIncrement.nasm| INTEL - X64/InterlockedIncrement.asm | INTEL Synchronization.c | INTEL Ia32/InternalGetSpinLockProperties.c | GCC diff --git a/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange16.asm b/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange16.asm deleted file mode 100644 index 7362fe9960..0000000000 --- a/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange16.asm +++ /dev/null @@ -1,46 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
-; Copyright (c) 2015, Linaro Ltd. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; InterlockedCompareExchange16.Asm -; -; Abstract: -; -; InterlockedCompareExchange16 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .486 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINT16 -; EFIAPI -; InternalSyncCompareExchange16 ( -; IN volatile UINT16 *Value, -; IN UINT16 CompareValue, -; IN UINT16 ExchangeValue -; ); -;------------------------------------------------------------------------------ -InternalSyncCompareExchange16 PROC - mov ecx, [esp + 4] - mov ax, [esp + 8] - mov dx, [esp + 12] - lock cmpxchg [ecx], dx - ret -InternalSyncCompareExchange16 ENDP - - END diff --git a/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange32.asm b/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange32.asm deleted file mode 100644 index 1a4a611cc9..0000000000 --- a/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange32.asm +++ /dev/null @@ -1,45 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; InterlockedCompareExchange32.Asm -; -; Abstract: -; -; InterlockedCompareExchange32 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .486 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINT32 -; EFIAPI -; InternalSyncCompareExchange32 ( -; IN volatile UINT32 *Value, -; IN UINT32 CompareValue, -; IN UINT32 ExchangeValue -; ); -;------------------------------------------------------------------------------ -InternalSyncCompareExchange32 PROC - mov ecx, [esp + 4] - mov eax, [esp + 8] - mov edx, [esp + 12] - lock cmpxchg [ecx], edx - ret -InternalSyncCompareExchange32 ENDP - - END diff --git a/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange64.asm b/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange64.asm deleted file mode 100644 index e7b02dbf0c..0000000000 --- a/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange64.asm +++ /dev/null @@ -1,47 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; InterlockedCompareExchange64.Asm -; -; Abstract: -; -; InterlockedCompareExchange64 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .586P - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; InternalSyncCompareExchange64 ( -; IN volatile UINT64 *Value, -; IN UINT64 CompareValue, -; IN UINT64 ExchangeValue -; ); -;------------------------------------------------------------------------------ -InternalSyncCompareExchange64 PROC USES esi ebx - mov esi, [esp + 12] - mov eax, [esp + 16] - mov edx, [esp + 20] - mov ebx, [esp + 24] - mov ecx, [esp + 28] - lock cmpxchg8b qword ptr [esi] - ret -InternalSyncCompareExchange64 ENDP - - END diff --git a/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedDecrement.asm b/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedDecrement.asm deleted file mode 100644 index b5fa44796f..0000000000 --- a/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedDecrement.asm +++ /dev/null @@ -1,42 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; InterlockedDecrement.Asm -; -; Abstract: -; -; InterlockedDecrement function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINT32 -; EFIAPI -; InternalSyncDecrement ( -; IN volatile UINT32 *Value -; ); -;------------------------------------------------------------------------------ -InternalSyncDecrement PROC - mov eax, [esp + 4] - lock dec dword ptr [eax] - mov eax, [eax] - ret -InternalSyncDecrement ENDP - - END diff --git a/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedIncrement.asm b/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedIncrement.asm deleted file mode 100644 index 61c2533311..0000000000 --- a/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedIncrement.asm +++ /dev/null @@ -1,42 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; InterlockedIncrement.Asm -; -; Abstract: -; -; InterlockedIncrement function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .386 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINT32 -; EFIAPI -; InternalSyncIncrement ( -; IN volatile UINT32 *Value -; ); -;------------------------------------------------------------------------------ -InternalSyncIncrement PROC - mov eax, [esp + 4] - lock inc dword ptr [eax] - mov eax, [eax] - ret -InternalSyncIncrement ENDP - - END diff --git a/MdePkg/Library/BaseSynchronizationLib/X64/InterlockedCompareExchange16.asm b/MdePkg/Library/BaseSynchronizationLib/X64/InterlockedCompareExchange16.asm deleted file mode 100644 index 262adeb1a9..0000000000 --- a/MdePkg/Library/BaseSynchronizationLib/X64/InterlockedCompareExchange16.asm +++ /dev/null @@ -1,42 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
-; Copyright (c) 2015, Linaro Ltd. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; InterlockedCompareExchange16.Asm -; -; Abstract: -; -; InterlockedCompareExchange16 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINT16 -; EFIAPI -; InternalSyncCompareExchange16 ( -; IN volatile UINT16 *Value, -; IN UINT16 CompareValue, -; IN UINT16 ExchangeValue -; ); -;------------------------------------------------------------------------------ -InternalSyncCompareExchange16 PROC - mov ax, dx - lock cmpxchg [rcx], r8w - ret -InternalSyncCompareExchange16 ENDP - - END diff --git a/MdePkg/Library/BaseSynchronizationLib/X64/InterlockedCompareExchange32.asm b/MdePkg/Library/BaseSynchronizationLib/X64/InterlockedCompareExchange32.asm deleted file mode 100644 index 711b3996b2..0000000000 --- a/MdePkg/Library/BaseSynchronizationLib/X64/InterlockedCompareExchange32.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; InterlockedCompareExchange32.Asm -; -; Abstract: -; -; InterlockedCompareExchange32 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINT32 -; EFIAPI -; InternalSyncCompareExchange32 ( -; IN volatile UINT32 *Value, -; IN UINT32 CompareValue, -; IN UINT32 ExchangeValue -; ); -;------------------------------------------------------------------------------ -InternalSyncCompareExchange32 PROC - mov eax, edx - lock cmpxchg [rcx], r8d - ret -InternalSyncCompareExchange32 ENDP - - END diff --git a/MdePkg/Library/BaseSynchronizationLib/X64/InterlockedCompareExchange64.asm b/MdePkg/Library/BaseSynchronizationLib/X64/InterlockedCompareExchange64.asm deleted file mode 100644 index be429d8e8f..0000000000 --- a/MdePkg/Library/BaseSynchronizationLib/X64/InterlockedCompareExchange64.asm +++ /dev/null @@ -1,41 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; InterlockedCompareExchange64.Asm -; -; Abstract: -; -; InterlockedCompareExchange64 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINT64 -; EFIAPI -; InternalSyncCompareExchange64 ( -; IN volatile UINT64 *Value, -; IN UINT64 CompareValue, -; IN UINT64 ExchangeValue -; ); -;------------------------------------------------------------------------------ -InternalSyncCompareExchange64 PROC - mov rax, rdx - lock cmpxchg [rcx], r8 - ret -InternalSyncCompareExchange64 ENDP - - END diff --git a/MdePkg/Library/BaseSynchronizationLib/X64/InterlockedDecrement.asm b/MdePkg/Library/BaseSynchronizationLib/X64/InterlockedDecrement.asm deleted file mode 100644 index 4dc3886968..0000000000 --- a/MdePkg/Library/BaseSynchronizationLib/X64/InterlockedDecrement.asm +++ /dev/null @@ -1,39 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; InterlockedDecrement.Asm -; -; Abstract: -; -; InterlockedDecrement function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINT32 -; EFIAPI -; InternalSyncDecrement ( -; IN volatile UINT32 *Value -; ); -;------------------------------------------------------------------------------ -InternalSyncDecrement PROC - lock dec dword ptr [rcx] - mov eax, [rcx] - ret -InternalSyncDecrement ENDP - - END diff --git a/MdePkg/Library/BaseSynchronizationLib/X64/InterlockedIncrement.asm b/MdePkg/Library/BaseSynchronizationLib/X64/InterlockedIncrement.asm deleted file mode 100644 index fc086b6e87..0000000000 --- a/MdePkg/Library/BaseSynchronizationLib/X64/InterlockedIncrement.asm +++ /dev/null @@ -1,39 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
-; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -; -; Module Name: -; -; InterlockedIncrement.Asm -; -; Abstract: -; -; InterlockedIncrement function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINT32 -; EFIAPI -; InternalSyncIncrement ( -; IN volatile UINT32 *Value -; ); -;------------------------------------------------------------------------------ -InternalSyncIncrement PROC - lock inc dword ptr [rcx] - mov eax, [rcx] - ret -InternalSyncIncrement ENDP - - END -- 2.39.2