diff --git a/MdePkg/Library/BaseIoLibIntrinsic/Ia32/IoFifoSev.nasm b/MdePkg/Library/BaseIoLibIntrinsic/Ia32/IoFifoSev.nasm index 3e80c17d04..4b2af807cf 100644 --- a/MdePkg/Library/BaseIoLibIntrinsic/Ia32/IoFifoSev.nasm +++ b/MdePkg/Library/BaseIoLibIntrinsic/Ia32/IoFifoSev.nasm @@ -212,7 +212,7 @@ ASM_PFX(IoWriteFifo8): jecxz @IoWriteFifo8_Done @IoWriteFifo8_Loop: - mov byte [esi], al + mov al, byte [esi] out dx, al inc esi loop @IoWriteFifo8_Loop @@ -250,7 +250,7 @@ ASM_PFX(IoWriteFifo16): jecxz @IoWriteFifo16_Done @IoWriteFifo16_Loop: - mov word [esi], ax + mov ax, word [esi] out dx, ax add esi, 2 loop @IoWriteFifo16_Loop @@ -288,7 +288,7 @@ ASM_PFX(IoWriteFifo32): jecxz @IoWriteFifo32_Done @IoWriteFifo32_Loop: - mov dword [esi], eax + mov eax, dword [esi] out dx, eax add esi, 4 loop @IoWriteFifo32_Loop diff --git a/MdePkg/Library/BaseIoLibIntrinsic/X64/IoFifoSev.nasm b/MdePkg/Library/BaseIoLibIntrinsic/X64/IoFifoSev.nasm index 26e016625b..4d86a6cd53 100644 --- a/MdePkg/Library/BaseIoLibIntrinsic/X64/IoFifoSev.nasm +++ b/MdePkg/Library/BaseIoLibIntrinsic/X64/IoFifoSev.nasm @@ -205,7 +205,7 @@ ASM_PFX(IoWriteFifo8): jrcxz @IoWriteFifo8_Done @IoWriteFifo8_Loop: - mov byte [rsi], al + mov al, byte [rsi] out dx, al inc rsi loop @IoWriteFifo8_Loop @@ -241,7 +241,7 @@ ASM_PFX(IoWriteFifo16): jrcxz @IoWriteFifo16_Done @IoWriteFifo16_Loop: - mov word [rsi], ax + mov ax, word [rsi] out dx, ax add rsi, 2 loop @IoWriteFifo16_Loop @@ -277,7 +277,7 @@ ASM_PFX(IoWriteFifo32): jrcxz @IoWriteFifo32_Done @IoWriteFifo32_Loop: - mov dword [rsi], eax + mov eax, dword [rsi] out dx, eax add rsi, 4 loop @IoWriteFifo32_Loop