Removed textrels from hermes code. SDL-1.2
authorRyan C. Gordon
Wed, 27 Jun 2007 10:12:49 +0000
branchSDL-1.2
changeset 3983540466e900db
parent 3982 0a0f8cccc77c
child 3984 b74530a1dad6
Removed textrels from hermes code.

Partially fixes Bugzilla #418.
src/hermes/mmx_main.asm
src/hermes/mmxp2_32.asm
src/hermes/x86_main.asm
src/hermes/x86p_16.asm
src/hermes/x86p_32.asm
     1.1 --- a/src/hermes/mmx_main.asm	Tue Jun 26 20:04:15 2007 +0000
     1.2 +++ b/src/hermes/mmx_main.asm	Wed Jun 27 10:12:49 2007 +0000
     1.3 @@ -12,7 +12,6 @@
     1.4  %include "common.inc"
     1.5  
     1.6  SDL_FUNC _ConvertMMX
     1.7 -SDL_FUNC _mmxreturn
     1.8  
     1.9  SECTION .text
    1.10  		
    1.11 @@ -51,9 +50,8 @@
    1.12  y_loop:	
    1.13  	mov ecx,[ebp+4]
    1.14  
    1.15 -	jmp [ebp+32]
    1.16 +	call [ebp+32]
    1.17  
    1.18 -_mmxreturn:	
    1.19  	add esi,[ebp+12]
    1.20  	add edi,[ebp+28]
    1.21  	
     2.1 --- a/src/hermes/mmxp2_32.asm	Tue Jun 26 20:04:15 2007 +0000
     2.2 +++ b/src/hermes/mmxp2_32.asm	Wed Jun 27 10:12:49 2007 +0000
     2.3 @@ -28,8 +28,6 @@
     2.4  SDL_FUNC _ConvertMMXpII32_16RGB555
     2.5  SDL_FUNC _ConvertMMXpII32_16BGR555
     2.6  
     2.7 -EXTERN _mmxreturn
     2.8 - 
     2.9  ;; Macros for conversion routines
    2.10  
    2.11  %macro _push_immq_mask 1
    2.12 @@ -121,7 +119,7 @@
    2.13          dec ecx
    2.14          jnz .L3
    2.15  .L4:
    2.16 -        jmp _mmxreturn
    2.17 +        return
    2.18  
    2.19  
    2.20  
    2.21 @@ -190,7 +188,7 @@
    2.22          jnz .L3
    2.23  
    2.24  .L4:
    2.25 -	jmp _mmxreturn
    2.26 +	retn
    2.27  
    2.28  	
    2.29  _ConvertMMXpII32_16BGR565:
    2.30 @@ -260,7 +258,7 @@
    2.31          jnz .L3
    2.32  
    2.33  .L4:
    2.34 -        jmp _mmxreturn
    2.35 +        retn
    2.36  
    2.37  _ConvertMMXpII32_16BGR555:
    2.38  
    2.39 @@ -400,7 +398,7 @@
    2.40  	jnz .L3	
    2.41  
    2.42  .L4:		
    2.43 -	jmp _mmxreturn
    2.44 +	retn
    2.45  
    2.46  %ifidn __OUTPUT_FORMAT__,elf
    2.47  section .note.GNU-stack noalloc noexec nowrite progbits
     3.1 --- a/src/hermes/x86_main.asm	Tue Jun 26 20:04:15 2007 +0000
     3.2 +++ b/src/hermes/x86_main.asm	Wed Jun 27 10:12:49 2007 +0000
     3.3 @@ -14,9 +14,6 @@
     3.4  %include "common.inc"
     3.5  
     3.6  SDL_FUNC _ConvertX86
     3.7 -SDL_FUNC _x86return
     3.8 -	
     3.9 -SDL_FUNC _Hermes_X86_CPU
    3.10  
    3.11  SECTION .text
    3.12  		
    3.13 @@ -55,9 +52,8 @@
    3.14  y_loop:	
    3.15  	mov ecx,[ebp+4]
    3.16  
    3.17 -	jmp [ebp+32]
    3.18 +	call [ebp+32]
    3.19  
    3.20 -_x86return:	
    3.21  	add esi,[ebp+12]
    3.22  	add edi,[ebp+28]
    3.23  	
    3.24 @@ -74,49 +70,6 @@
    3.25  
    3.26  
    3.27  
    3.28 -;; Hermes_X86_CPU returns the CPUID flags in eax
    3.29 -	
    3.30 -_Hermes_X86_CPU:
    3.31 -	pushfd
    3.32 -	pop eax
    3.33 -	
    3.34 -	mov ecx,eax
    3.35 -	
    3.36 -	xor eax,040000h
    3.37 -	push eax
    3.38 -	
    3.39 -	popfd
    3.40 -	pushfd
    3.41 -
    3.42 -	pop eax
    3.43 -	xor eax,ecx
    3.44 -	jz .L1			; Processor is 386
    3.45 -
    3.46 -	push ecx
    3.47 -	popfd
    3.48 -
    3.49 -	mov eax,ecx
    3.50 -	xor eax,200000h
    3.51 -
    3.52 -	push eax
    3.53 -	popfd
    3.54 -	pushfd
    3.55 -
    3.56 -	pop eax
    3.57 -	xor eax,ecx
    3.58 -	je .L1
    3.59 -	
    3.60 -	push ebx
    3.61 -
    3.62 -	mov eax,1
    3.63 -	cpuid
    3.64 -	mov eax,edx
    3.65 -
    3.66 -	pop ebx
    3.67 -
    3.68 -.L1:	
    3.69 -	ret
    3.70 -
    3.71  %ifidn __OUTPUT_FORMAT__,elf
    3.72  section .note.GNU-stack noalloc noexec nowrite progbits
    3.73  %endif
     4.1 --- a/src/hermes/x86p_16.asm	Tue Jun 26 20:04:15 2007 +0000
     4.2 +++ b/src/hermes/x86p_16.asm	Wed Jun 27 10:12:49 2007 +0000
     4.3 @@ -20,7 +20,6 @@
     4.4  SDL_FUNC _ConvertX86p16_8RGB332
     4.5  
     4.6  EXTERN _ConvertX86
     4.7 -EXTERN _x86return
     4.8  
     4.9  SECTION .text
    4.10  
    4.11 @@ -49,7 +48,7 @@
    4.12      dec ecx
    4.13      jnz .L1
    4.14  .L2
    4.15 -    jmp _x86return
    4.16 +    retn
    4.17  
    4.18  .L3 ; head
    4.19      mov eax,edi
    4.20 @@ -127,7 +126,7 @@
    4.21      add edi,BYTE 2
    4.22  
    4.23  .L7
    4.24 -    jmp _x86return
    4.25 +    retn
    4.26  
    4.27  
    4.28  
    4.29 @@ -156,7 +155,7 @@
    4.30      dec ecx
    4.31      jnz .L1
    4.32  .L2
    4.33 -    jmp _x86return
    4.34 +    retn
    4.35  
    4.36  .L3 ; head
    4.37      mov eax,edi
    4.38 @@ -235,7 +234,7 @@
    4.39      jmp SHORT .L6
    4.40  
    4.41  .L7 pop ebp
    4.42 -    jmp _x86return
    4.43 +    retn
    4.44  
    4.45  
    4.46  
    4.47 @@ -269,7 +268,7 @@
    4.48      dec ecx
    4.49      jnz .L1
    4.50  .L2
    4.51 -    jmp _x86return
    4.52 +    retn
    4.53  
    4.54  .L3 ; head
    4.55      mov eax,edi
    4.56 @@ -353,7 +352,7 @@
    4.57      add edi,BYTE 2
    4.58  
    4.59  .L7
    4.60 -    jmp _x86return
    4.61 +    retn
    4.62  
    4.63  
    4.64  
    4.65 @@ -386,7 +385,7 @@
    4.66      dec ecx
    4.67      jnz .L1
    4.68  .L2
    4.69 -    jmp _x86return
    4.70 +    retn
    4.71  
    4.72  .L3 mov eax,edi
    4.73      and eax,BYTE 11b
    4.74 @@ -484,7 +483,7 @@
    4.75      jnz .L6
    4.76  
    4.77  .L7 pop ebp
    4.78 -    jmp _x86return
    4.79 +    retn
    4.80  
    4.81  %ifidn __OUTPUT_FORMAT__,elf
    4.82  section .note.GNU-stack noalloc noexec nowrite progbits
     5.1 --- a/src/hermes/x86p_32.asm	Tue Jun 26 20:04:15 2007 +0000
     5.2 +++ b/src/hermes/x86p_32.asm	Wed Jun 27 10:12:49 2007 +0000
     5.3 @@ -24,8 +24,6 @@
     5.4  SDL_FUNC _ConvertX86p32_16BGR555
     5.5  SDL_FUNC _ConvertX86p32_8RGB332
     5.6  
     5.7 -EXTERN _x86return
     5.8 -	
     5.9  SECTION .text
    5.10  
    5.11  ;; _Convert_*
    5.12 @@ -53,7 +51,7 @@
    5.13      dec ecx
    5.14      jnz .L1
    5.15  .L2
    5.16 -    jmp _x86return
    5.17 +    retn
    5.18  
    5.19  .L3 ; save ebp
    5.20      push ebp
    5.21 @@ -113,7 +111,7 @@
    5.22      jnz .L5
    5.23  
    5.24  .L6 pop ebp
    5.25 -    jmp _x86return
    5.26 +    retn
    5.27  	
    5.28  
    5.29  	
    5.30 @@ -133,7 +131,7 @@
    5.31      dec ecx
    5.32      jnz .L1
    5.33  .L2
    5.34 -    jmp _x86return
    5.35 +    retn
    5.36  
    5.37  .L3 ; save ebp
    5.38      push ebp
    5.39 @@ -184,7 +182,7 @@
    5.40      jnz .L5
    5.41  
    5.42  .L6 pop ebp
    5.43 -    jmp _x86return
    5.44 +    retn
    5.45  
    5.46  	
    5.47  
    5.48 @@ -204,7 +202,7 @@
    5.49      dec ecx
    5.50      jnz .L1
    5.51  .L2
    5.52 -    jmp _x86return
    5.53 +    retn
    5.54  
    5.55  .L3 ; save ebp
    5.56      push ebp
    5.57 @@ -257,7 +255,7 @@
    5.58      jnz .L5
    5.59  
    5.60  .L6 pop ebp
    5.61 -    jmp _x86return
    5.62 +    retn
    5.63  
    5.64  
    5.65  	
    5.66 @@ -282,7 +280,7 @@
    5.67  	dec ecx
    5.68  	jnz .L1
    5.69  .L2 
    5.70 -	jmp _x86return
    5.71 +	retn
    5.72  
    5.73  .L3	;	 head
    5.74  	mov edx,edi
    5.75 @@ -354,7 +352,7 @@
    5.76  	jnz .L6
    5.77  
    5.78  .L7	pop ebp
    5.79 -	jmp _x86return
    5.80 +	retn
    5.81  
    5.82  
    5.83  
    5.84 @@ -380,7 +378,7 @@
    5.85  	dec ecx
    5.86  	jnz .L1
    5.87  .L2
    5.88 -	jmp _x86return
    5.89 +	retn
    5.90  
    5.91  .L3 ; head
    5.92  	mov edx,edi
    5.93 @@ -455,7 +453,7 @@
    5.94  
    5.95  .L7 
    5.96  	pop ebp
    5.97 -	jmp _x86return
    5.98 +	retn
    5.99   
   5.100  
   5.101  	
   5.102 @@ -484,7 +482,7 @@
   5.103  	jnz .L1
   5.104  
   5.105  .L2:				; End of short loop
   5.106 -	jmp _x86return
   5.107 +	retn
   5.108  
   5.109  	
   5.110  .L3	; head
   5.111 @@ -570,7 +568,7 @@
   5.112  	add edi,BYTE 2
   5.113  
   5.114  .L7:	
   5.115 -	jmp _x86return
   5.116 +	retn
   5.117  
   5.118  
   5.119  
   5.120 @@ -599,7 +597,7 @@
   5.121  	dec ecx
   5.122  	jnz .L1
   5.123  .L2
   5.124 -	jmp _x86return
   5.125 +	retn
   5.126  
   5.127  .L3	; head
   5.128  	mov ebx,edi
   5.129 @@ -684,7 +682,7 @@
   5.130  	add edi,BYTE 2
   5.131  
   5.132  .L7 
   5.133 -	jmp _x86return
   5.134 +	retn
   5.135  
   5.136  
   5.137  	
   5.138 @@ -713,7 +711,7 @@
   5.139  	dec ecx
   5.140  	jnz .L1
   5.141  .L2
   5.142 -	jmp _x86return
   5.143 +	retn
   5.144  
   5.145  .L3	; head
   5.146  	mov ebx,edi
   5.147 @@ -795,7 +793,7 @@
   5.148  	add edi,BYTE 2
   5.149  
   5.150  .L7
   5.151 -	jmp _x86return
   5.152 +	retn
   5.153  
   5.154  
   5.155  
   5.156 @@ -825,7 +823,7 @@
   5.157  	dec ecx
   5.158  	jnz .L1
   5.159  .L2 
   5.160 -	jmp _x86return
   5.161 +	retn
   5.162  
   5.163  .L3	; head
   5.164  	mov ebx,edi
   5.165 @@ -910,7 +908,7 @@
   5.166  	add edi,BYTE 2
   5.167  
   5.168  .L7
   5.169 -	jmp _x86return
   5.170 +	retn
   5.171  
   5.172  
   5.173  
   5.174 @@ -1040,7 +1038,7 @@
   5.175  	jnz .L3
   5.176  	
   5.177  .L4:	
   5.178 -	jmp _x86return
   5.179 +	retn
   5.180  
   5.181  %ifidn __OUTPUT_FORMAT__,elf
   5.182  section .note.GNU-stack noalloc noexec nowrite progbits