Skip to content

Commit

Permalink
Fixed build warnings from nasm on some Hermes blitters.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Sep 11, 2011
1 parent e8e6600 commit 849b2a2
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 86 deletions.
56 changes: 28 additions & 28 deletions src/hermes/x86p_16.asm
Expand Up @@ -30,7 +30,7 @@ _ConvertX86p16_16BGR565:
ja .L3


.L1 ; short loop
.L1: ; short loop
mov al,[esi]
mov ah,[esi+1]
mov ebx,eax
Expand All @@ -47,10 +47,10 @@ _ConvertX86p16_16BGR565:
add edi,BYTE 2
dec ecx
jnz .L1
.L2
.L2:
retn

.L3 ; head
.L3: ; head
mov eax,edi
and eax,BYTE 11b
jz .L4
Expand All @@ -70,7 +70,7 @@ _ConvertX86p16_16BGR565:
add edi,BYTE 2
dec ecx

.L4 ; save count
.L4: ; save count
push ecx

; unroll twice
Expand All @@ -84,8 +84,8 @@ _ConvertX86p16_16BGR565:
neg ecx
jmp SHORT .L6
.L5 mov [edi+ecx*4-4],eax
.L6 mov eax,[esi+ecx*4]
.L5: mov [edi+ecx*4-4],eax
.L6: mov eax,[esi+ecx*4]

mov ebx,[esi+ecx*4]
and eax,07E007E0h
Expand Down Expand Up @@ -125,7 +125,7 @@ _ConvertX86p16_16BGR565:
add esi,BYTE 2
add edi,BYTE 2

.L7
.L7:
retn


Expand All @@ -140,7 +140,7 @@ _ConvertX86p16_16RGB555:
ja .L3


.L1 ; short loop
.L1: ; short loop
mov al,[esi]
mov ah,[esi+1]
mov ebx,eax
Expand All @@ -154,10 +154,10 @@ _ConvertX86p16_16RGB555:
add edi,BYTE 2
dec ecx
jnz .L1
.L2
.L2:
retn

.L3 ; head
.L3: ; head
mov eax,edi
and eax,BYTE 11b
jz .L4
Expand All @@ -174,7 +174,7 @@ _ConvertX86p16_16RGB555:
add edi,BYTE 2
dec ecx

.L4 ; save ebp
.L4: ; save ebp
push ebp

; save count
Expand All @@ -191,7 +191,7 @@ _ConvertX86p16_16RGB555:
xor ebp,ebp
sub ebp,ecx

.L5 mov eax,[esi+ebp*8] ; agi?
.L5: mov eax,[esi+ebp*8] ; agi?
mov ecx,[esi+ebp*8+4]
mov ebx,eax
Expand All @@ -217,7 +217,7 @@ _ConvertX86p16_16RGB555:

; tail
pop ecx
.L6 and ecx,BYTE 11b
.L6: and ecx,BYTE 11b
jz .L7
mov al,[esi]
mov ah,[esi+1]
Expand All @@ -233,7 +233,7 @@ _ConvertX86p16_16RGB555:
dec ecx
jmp SHORT .L6

.L7 pop ebp
.L7: pop ebp
retn


Expand All @@ -248,7 +248,7 @@ _ConvertX86p16_16BGR555:
ja .L3

.L1 ; short loop
.L1: ; short loop
mov al,[esi]
mov ah,[esi+1]
mov ebx,eax
Expand All @@ -267,10 +267,10 @@ _ConvertX86p16_16BGR555:
add edi,BYTE 2
dec ecx
jnz .L1
.L2
.L2:
retn

.L3 ; head
.L3: ; head
mov eax,edi
and eax,BYTE 11b
jz .L4
Expand All @@ -292,7 +292,7 @@ _ConvertX86p16_16BGR555:
add edi,BYTE 2
dec ecx

.L4 ; save count
.L4: ; save count
push ecx

; unroll twice
Expand All @@ -306,8 +306,8 @@ _ConvertX86p16_16BGR555:
neg ecx
jmp SHORT .L6
.L5 mov [edi+ecx*4-4],eax
.L6 mov eax,[esi+ecx*4]
.L5: mov [edi+ecx*4-4],eax
.L6: mov eax,[esi+ecx*4]

shr eax,1
mov ebx,[esi+ecx*4]
Expand Down Expand Up @@ -351,7 +351,7 @@ _ConvertX86p16_16BGR555:
add esi,BYTE 2
add edi,BYTE 2

.L7
.L7:
retn


Expand All @@ -366,7 +366,7 @@ _ConvertX86p16_8RGB332:
ja .L3


.L1 ; short loop
.L1: ; short loop
mov al,[esi+0]
mov ah,[esi+1]
mov ebx,eax
Expand All @@ -384,10 +384,10 @@ _ConvertX86p16_8RGB332:
inc edi
dec ecx
jnz .L1
.L2
.L2:
retn

.L3 mov eax,edi
.L3: mov eax,edi
and eax,BYTE 11b
jz .L4
mov al,[esi+0]
Expand All @@ -408,7 +408,7 @@ _ConvertX86p16_8RGB332:
dec ecx
jmp SHORT .L3

.L4 ; save ebp
.L4: ; save ebp
push ebp

; save count
Expand All @@ -422,7 +422,7 @@ _ConvertX86p16_8RGB332:
mov bl,[esi+1]
mov dh,[esi+2]
.L5 shl edx,16
.L5: shl edx,16
mov bh,[esi+3]
shl ebx,16
Expand Down Expand Up @@ -463,7 +463,7 @@ _ConvertX86p16_8RGB332:
and ecx,BYTE 11b
jz .L7

.L6 ; tail
.L6: ; tail
mov al,[esi+0]
mov ah,[esi+1]
mov ebx,eax
Expand All @@ -482,7 +482,7 @@ _ConvertX86p16_8RGB332:
dec ecx
jnz .L6

.L7 pop ebp
.L7: pop ebp
retn

%ifidn __OUTPUT_FORMAT__,elf32
Expand Down

0 comments on commit 849b2a2

Please sign in to comment.