Use "movd" instruction to manipulate MMX register to support more GNU assemblers.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9055 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
qhuang8 2009-08-12 02:23:31 +00:00
parent 23f41e5601
commit 945f5f400b
6 changed files with 6 additions and 6 deletions

View File

@ -51,7 +51,7 @@ L0:
andq $7, %r8 andq $7, %r8
shrq $3, %rcx # rcx <- # of Qwords to copy shrq $3, %rcx # rcx <- # of Qwords to copy
jz L_CopyBytes jz L_CopyBytes
movq %mm0, %r10 # (Save mm0 in r10) ; Why just save 32 bits? movd %mm0, %r10 # (Save mm0 in r10)
L1: L1:
movq (%rsi), %mm0 movq (%rsi), %mm0
movntq %mm0, (%rdi) movntq %mm0, (%rdi)

View File

@ -39,7 +39,7 @@ ASM_PFX(InternalMemSetMem):
push %rdi push %rdi
movq %r8, %rax movq %r8, %rax
movb %al, %ah movb %al, %ah
movq %rax, %mm0 movd %rax, %mm0
movq %rcx, %r8 movq %rcx, %r8
movq %r8, %rdi # rdi <- Buffer movq %r8, %rdi # rdi <- Buffer
movq %rdx, %rcx movq %rdx, %rcx

View File

@ -38,7 +38,7 @@ ASM_GLOBAL ASM_PFX(InternalMemSetMem16)
ASM_PFX(InternalMemSetMem16): ASM_PFX(InternalMemSetMem16):
pushq %rdi pushq %rdi
movq %r8, %rax movq %r8, %rax
movq %rax, %mm0 movd %rax, %mm0
movq %rcx, %r8 movq %rcx, %r8
movq %r8, %rdi movq %r8, %rdi
movq %rdx, %rcx movq %rdx, %rcx

View File

@ -36,7 +36,7 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
ASM_GLOBAL ASM_PFX(InternalMemSetMem32) ASM_GLOBAL ASM_PFX(InternalMemSetMem32)
ASM_PFX(InternalMemSetMem32): ASM_PFX(InternalMemSetMem32):
movq %r8, %mm0 # mm0 <- Value movd %r8, %mm0 # mm0 <- Value
movq %rcx, %rax # rax <- Buffer movq %rcx, %rax # rax <- Buffer
xchgq %rdx, %rcx # rcx <- Count rdx <- Buffer xchgq %rdx, %rcx # rcx <- Count rdx <- Buffer
shrq $1, % rcx # rcx <- # of qwords to set shrq $1, % rcx # rcx <- # of qwords to set

View File

@ -35,7 +35,7 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
ASM_GLOBAL ASM_PFX(InternalMemSetMem64) ASM_GLOBAL ASM_PFX(InternalMemSetMem64)
ASM_PFX(InternalMemSetMem64): ASM_PFX(InternalMemSetMem64):
movq %r8, %mm0 #Value movd %r8, %mm0 #Value
movw %rcx, %rax #rax <- Buffer movw %rcx, %rax #rax <- Buffer
xchg %rdx, %rcx #rcx <- Count xchg %rdx, %rcx #rcx <- Count
L0: L0:

View File

@ -38,7 +38,7 @@ ASM_PFX(InternalMemSetMem64):
movq %rcx, %rax # rax <- Buffer movq %rcx, %rax # rax <- Buffer
xchgq %rdx, %rcx # rcx <- Count & rdx <- Buffer xchgq %rdx, %rcx # rcx <- Count & rdx <- Buffer
testb $8, %dl testb $8, %dl
movq %r8, %xmm0 movd %r8, %xmm0
jz L0 jz L0
movq %r8, (%rdx) movq %r8, (%rdx)
addq $8, %rdx addq $8, %rdx