author Ryan C. Gordon <>
Mon, 12 Dec 2005 09:13:12 +0000
changeset 1199 2d6dc7de1145
parent 1166 da33b7e6d181
child 1697 393092a3ebf6
permissions -rw-r--r--
From: Mike Frysinger <> To: Date: Sun, 11 Dec 2005 22:57:37 -0500 Subject: [SDL] exec stack in libsdl update i posted back in September a patch to remove executable stacks: later in November, a similar patch was merged it seems: however, this lacks the additional output format checks that i posted in my patch ... this isnt a problem if the hermes asm code is only ever used to produce ELF objects, but if this is not true, then the additional checks in my original patch will need to be merged -mike

; mmx format converter main loops for HERMES
; Some routines Copyright (c) 1998 Christian Nentwich (
; This source code is licensed under the GNU LGPL
; Please refer to the file COPYING.LIB contained in the distribution for
; licensing conditions		


GLOBAL _mmxreturn

;; _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
	push ebp
	mov ebp,esp

; Save the registers used by the blitters, necessary for optimized code

	mov eax,[ebp+8]

        cmp dword [eax+4],BYTE 0
	je endconvert
	mov ebp,eax
	mov esi,[ebp+0]
	mov edi,[ebp+16]
	mov ecx,[ebp+4]

	jmp [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

	pop ebp


%ifidn __OUTPUT_FORMAT__,elf
section .note.GNU-stack noalloc noexec nowrite progbits