diff options
author | Jesse Hall <jessehall@google.com> | 2012-07-09 11:27:07 -0700 |
---|---|---|
committer | Jesse Hall <jessehall@google.com> | 2012-07-22 00:35:08 -0700 |
commit | 9682c8870b8ff5e4ac2e4c70b759f791c6f38c1f (patch) | |
tree | ded6ee18c4e1f33df235e53615a6d65e2d64f4ef /distrib/sdl-1.2.15/src/hermes/mmx_main.asm | |
parent | 74b55003f76dbca96e4a26d98fe464081ca5341f (diff) | |
download | external_qemu-9682c8870b8ff5e4ac2e4c70b759f791c6f38c1f.zip external_qemu-9682c8870b8ff5e4ac2e4c70b759f791c6f38c1f.tar.gz external_qemu-9682c8870b8ff5e4ac2e4c70b759f791c6f38c1f.tar.bz2 |
Import SDL release-1.2.15
Change-Id: I505c4aea24325cad475f217db5589814b4c75dbf
Diffstat (limited to 'distrib/sdl-1.2.15/src/hermes/mmx_main.asm')
-rw-r--r-- | distrib/sdl-1.2.15/src/hermes/mmx_main.asm | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/distrib/sdl-1.2.15/src/hermes/mmx_main.asm b/distrib/sdl-1.2.15/src/hermes/mmx_main.asm new file mode 100644 index 0000000..00032b9 --- /dev/null +++ b/distrib/sdl-1.2.15/src/hermes/mmx_main.asm @@ -0,0 +1,74 @@ +; +; mmx format converter main loops for HERMES +; Some routines Copyright (c) 1998 Christian Nentwich (c.nentwich@cs.ucl.ac.uk) +; This source code is licensed under the GNU LGPL +; +; Please refer to the file COPYING.LIB contained in the distribution for +; licensing conditions +; + +BITS 32 + +%include "common.inc" + +SDL_FUNC _ConvertMMX + +SECTION .text + +;; _ConvertMMX: +;; [ESP+8] ConverterInfo* +;; -------------------------------------------------------------------------- +;; ConverterInfo (ebp+..) +;; 0: void *s_pixels +;; 4: int s_width +;; 8: int s_height +;; 12: int s_add +;; 16: void *d_pixels +;; 20: int d_width +;; 24: int d_height +;; 28: int d_add +;; 32: void (*converter_function)() +;; 36: int32 *lookup + +_ConvertMMX: + push ebp + mov ebp,esp + +; Save the registers used by the blitters, necessary for optimized code + pusha + + mov eax,[ebp+8] + + cmp dword [eax+4],BYTE 0 + je endconvert + + mov ebp,eax + + mov esi,[ebp+0] + mov edi,[ebp+16] + +y_loop: + mov ecx,[ebp+4] + + call [ebp+32] + + add esi,[ebp+12] + add edi,[ebp+28] + + dec dword [ebp+8] + jnz y_loop + + +; Restore the registers used by the blitters, necessary for optimized code + popa + + pop ebp + +endconvert: + emms + + ret + +%ifidn __OUTPUT_FORMAT__,elf32 +section .note.GNU-stack noalloc noexec nowrite progbits +%endif |