Skip to content

Commit

Permalink
Free the ebx register from use by the assembly code
Browse files Browse the repository at this point in the history
  • Loading branch information
mirabilos committed Jan 26, 2017
1 parent cfffce7 commit f3f1c88
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
24 changes: 12 additions & 12 deletions src/x86/rfxcodec_encode_dwt_shift_x86_sse2.asm
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ loop1c:
paddw xmm5, xmm1

psrldq xmm2, 14
movd ebx, xmm2 ; save hi
movd ebp, xmm2 ; save hi

movdqa xmm6, xmm5 ; out lo
paddw xmm6, LLO_ADD
Expand Down Expand Up @@ -395,7 +395,7 @@ loop1c:
; l[n] = src[2n] + ((h[n - 1] + h[n]) >> 1)
movdqa xmm7, xmm5
pslldq xmm7, 2
movd xmm6, ebx
movd xmm6, ebp
por xmm7, xmm6
paddw xmm5, xmm7
psraw xmm5, 1
Expand Down Expand Up @@ -500,7 +500,7 @@ loop1c1:
paddw xmm5, xmm1

psrldq xmm2, 14
movd ebx, xmm2 ; save hi
movd ebp, xmm2 ; save hi

movdqa [edx], xmm5 ; out lo

Expand Down Expand Up @@ -568,7 +568,7 @@ loop1c1:
; l[n] = src[2n] + ((h[n - 1] + h[n]) >> 1)
movdqa xmm7, xmm5
pslldq xmm7, 2
movd xmm6, ebx
movd xmm6, ebp
por xmm7, xmm6
paddw xmm5, xmm7
psraw xmm5, 1
Expand Down Expand Up @@ -767,7 +767,7 @@ loop1e:
paddw xmm5, xmm1

psrldq xmm2, 14
movd ebx, xmm2 ; save hi
movd ebp, xmm2 ; save hi

movdqa xmm6, xmm5 ; out lo
paddw xmm6, LLO_ADD
Expand Down Expand Up @@ -842,14 +842,14 @@ loop2e:
; l[n] = src[2n] + ((h[n - 1] + h[n]) >> 1)
movdqa xmm7, xmm5
pslldq xmm7, 2
movd xmm6, ebx
movd xmm6, ebp
por xmm7, xmm6
paddw xmm5, xmm7
psraw xmm5, 1
paddw xmm5, xmm1

psrldq xmm2, 14
movd ebx, xmm2 ; save hi
movd ebp, xmm2 ; save hi

movdqa xmm6, xmm5 ; out lo
paddw xmm6, LLO_ADD
Expand Down Expand Up @@ -924,7 +924,7 @@ loop2e:
; l[n] = src[2n] + ((h[n - 1] + h[n]) >> 1)
movdqa xmm7, xmm5
pslldq xmm7, 2
movd xmm6, ebx
movd xmm6, ebp
por xmm7, xmm6
paddw xmm5, xmm7
psraw xmm5, 1
Expand Down Expand Up @@ -1029,7 +1029,7 @@ loop1e1:
paddw xmm5, xmm1

psrldq xmm2, 14
movd ebx, xmm2 ; save hi
movd ebp, xmm2 ; save hi

movdqa [edx], xmm5 ; out lo

Expand Down Expand Up @@ -1101,14 +1101,14 @@ loop2e1:
; l[n] = src[2n] + ((h[n - 1] + h[n]) >> 1)
movdqa xmm7, xmm5
pslldq xmm7, 2
movd xmm6, ebx
movd xmm6, ebp
por xmm7, xmm6
paddw xmm5, xmm7
psraw xmm5, 1
paddw xmm5, xmm1

psrldq xmm2, 14
movd ebx, xmm2 ; save hi
movd ebp, xmm2 ; save hi

movdqa [edx], xmm5 ; out lo

Expand Down Expand Up @@ -1180,7 +1180,7 @@ loop2e1:
; l[n] = src[2n] + ((h[n - 1] + h[n]) >> 1)
movdqa xmm7, xmm5
pslldq xmm7, 2
movd xmm6, ebx
movd xmm6, ebp
por xmm7, xmm6
paddw xmm5, xmm7
psraw xmm5, 1
Expand Down
24 changes: 12 additions & 12 deletions src/x86/rfxcodec_encode_dwt_shift_x86_sse41.asm
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ loop1c:
paddw xmm5, xmm1

psrldq xmm2, 14
movd ebx, xmm2 ; save hi
movd ebp, xmm2 ; save hi

movdqa xmm6, xmm5 ; out lo
paddw xmm6, LLO_ADD
Expand Down Expand Up @@ -359,7 +359,7 @@ loop1c:
; l[n] = src[2n] + ((h[n - 1] + h[n]) >> 1)
movdqa xmm7, xmm5
pslldq xmm7, 2
movd xmm6, ebx
movd xmm6, ebp
por xmm7, xmm6
paddw xmm5, xmm7
psraw xmm5, 1
Expand Down Expand Up @@ -452,7 +452,7 @@ loop1c1:
paddw xmm5, xmm1

psrldq xmm2, 14
movd ebx, xmm2 ; save hi
movd ebp, xmm2 ; save hi

movdqa [edx], xmm5 ; out lo

Expand Down Expand Up @@ -508,7 +508,7 @@ loop1c1:
; l[n] = src[2n] + ((h[n - 1] + h[n]) >> 1)
movdqa xmm7, xmm5
pslldq xmm7, 2
movd xmm6, ebx
movd xmm6, ebp
por xmm7, xmm6
paddw xmm5, xmm7
psraw xmm5, 1
Expand Down Expand Up @@ -695,7 +695,7 @@ loop1e:
paddw xmm5, xmm1

psrldq xmm2, 14
movd ebx, xmm2 ; save hi
movd ebp, xmm2 ; save hi

movdqa xmm6, xmm5 ; out lo
paddw xmm6, LLO_ADD
Expand Down Expand Up @@ -758,14 +758,14 @@ loop2e:
; l[n] = src[2n] + ((h[n - 1] + h[n]) >> 1)
movdqa xmm7, xmm5
pslldq xmm7, 2
movd xmm6, ebx
movd xmm6, ebp
por xmm7, xmm6
paddw xmm5, xmm7
psraw xmm5, 1
paddw xmm5, xmm1

psrldq xmm2, 14
movd ebx, xmm2 ; save hi
movd ebp, xmm2 ; save hi

movdqa xmm6, xmm5 ; out lo
paddw xmm6, LLO_ADD
Expand Down Expand Up @@ -828,7 +828,7 @@ loop2e:
; l[n] = src[2n] + ((h[n - 1] + h[n]) >> 1)
movdqa xmm7, xmm5
pslldq xmm7, 2
movd xmm6, ebx
movd xmm6, ebp
por xmm7, xmm6
paddw xmm5, xmm7
psraw xmm5, 1
Expand Down Expand Up @@ -921,7 +921,7 @@ loop1e1:
paddw xmm5, xmm1

psrldq xmm2, 14
movd ebx, xmm2 ; save hi
movd ebp, xmm2 ; save hi

movdqa [edx], xmm5 ; out lo

Expand Down Expand Up @@ -981,14 +981,14 @@ loop2e1:
; l[n] = src[2n] + ((h[n - 1] + h[n]) >> 1)
movdqa xmm7, xmm5
pslldq xmm7, 2
movd xmm6, ebx
movd xmm6, ebp
por xmm7, xmm6
paddw xmm5, xmm7
psraw xmm5, 1
paddw xmm5, xmm1

psrldq xmm2, 14
movd ebx, xmm2 ; save hi
movd ebp, xmm2 ; save hi

movdqa [edx], xmm5 ; out lo

Expand Down Expand Up @@ -1048,7 +1048,7 @@ loop2e1:
; l[n] = src[2n] + ((h[n - 1] + h[n]) >> 1)
movdqa xmm7, xmm5
pslldq xmm7, 2
movd xmm6, ebx
movd xmm6, ebp
por xmm7, xmm6
paddw xmm5, xmm7
psraw xmm5, 1
Expand Down

0 comments on commit f3f1c88

Please sign in to comment.