OpenCores
URL https://opencores.org/ocsvn/1664/1664/trunk

Subversion Repositories 1664

[/] [1664/] [trunk/] [arci/] [x86/] [fonte/] [memoria/] [memoria_copia.asm] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 mrdmkg
%include "../../macro/macro.inc"
2
 
3
bits 32
4
;==============================================================================
5
codigi_global memoria_copia
6
;==============================================================================
7
push edi
8
push esi
9
mov edi,[esp+0x0c]
10
mov esi,[esp+0x10]
11
mov edx,[esp+0x14]
12
 
13
.itera
14
cmp edx,0x20
15
jae .prefasa
16
mov ecx,edx
17
rep movsb
18
pop esi
19
pop edi
20
ret
21
 
22
.prefasa
23
mov eax,esi
24
mov ecx,0x10
25
and eax,0x0f
26
jz .fonte_aliniada
27
sub ecx,eax
28
sub edx,ecx
29
rep movsb
30
 
31
.fonte_aliniada
32
cmp edx,0x80
33
hwnt jae .copia_0x80_prefasa
34
 
35
.copia_0x10_prefasa
36
mov ecx,edx
37
and ecx,0x0f
38
sub edx,ecx
39
mov eax,edi
40
and eax,0x0f
41
jz .copia_0x10_aliniada
42
 
43
.copia_0x10
44
movaps xmm0,[esi]
45
movups [edi],xmm0
46
add esi,0x10
47
add edi,0x10
48
sub edx,0x10
49
hst jnz .copia_0x10
50
rep movsb
51
pop esi
52
pop edi
53
ret
54
 
55
.copia_0x10_aliniada
56
movaps xmm0,[esi]
57
movaps [edi],xmm0
58
add esi,0x10
59
add edi,0x10
60
sub edx,0x10
61
hst jnz .copia_0x10_aliniada
62
rep movsb
63
pop esi
64
pop edi
65
ret
66
 
67
.copia_0x80_prefasa
68
mov ecx,edx
69
and ecx,0x7f
70
mov eax,edi
71
sub edx,ecx
72
and eax,0x0f
73
jz .copia_0x80_aliniada
74
 
75
.copia_0x80
76
movaps xmm0,[esi+0x00]
77
movaps xmm1,[esi+0x10]
78
movaps xmm2,[esi+0x20]
79
movaps xmm3,[esi+0x30]
80
movaps xmm4,[esi+0x40]
81
movaps xmm5,[esi+0x50]
82
movaps xmm6,[esi+0x60]
83
movaps xmm7,[esi+0x70]
84
movups [edi+0x00],xmm0
85
movups [edi+0x10],xmm1
86
movups [edi+0x20],xmm2
87
movups [edi+0x30],xmm3
88
movups [edi+0x40],xmm4
89
movups [edi+0x50],xmm5
90
movups [edi+0x60],xmm6
91
movups [edi+0x70],xmm7
92
add esi,0x80
93
add edi,0x80
94
sub edx,0x80
95
hst jnz .copia_0x80
96
mov edx,ecx
97
jmp .itera
98
 
99
.copia_0x80_aliniada
100
movaps xmm0,[esi+0x00]
101
movaps xmm1,[esi+0x10]
102
movaps xmm2,[esi+0x20]
103
movaps xmm3,[esi+0x30]
104
movaps xmm4,[esi+0x40]
105
movaps xmm5,[esi+0x50]
106
movaps xmm6,[esi+0x60]
107
movaps xmm7,[esi+0x70]
108
movaps [edi+0x00],xmm0
109
movaps [edi+0x10],xmm1
110
movaps [edi+0x20],xmm2
111
movaps [edi+0x30],xmm3
112
movaps [edi+0x40],xmm4
113
movaps [edi+0x50],xmm5
114
movaps [edi+0x60],xmm6
115
movaps [edi+0x70],xmm7
116
add esi,0x80
117
add edi,0x80
118
sub edx,0x80
119
hst jnz .copia_0x80_aliniada
120
mov edx,ecx
121
jmp .itera

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.