History

[Processing/x86] Simplify denoisefilter X86_32_PICASM handling

Utilize program counter-relative offsets to simplify X86_32_PICASM code. In order for this to work with nasm, data constants are placed in the text segment.

Sindre Aamås committed 9 years ago

Commit 4769d4d1 parent 17eed991 file · +7 −14Browse files

Showing the changes to codec/processing/src (1 of 1 file). Show all

Unified · Split

codec/processing/src/x86/denoisefilter.asm+7−14
@@ -44,7 +44,11 @@ · 43 unmodified lines
4444 ;***********************************************************************
4545 ; Constant
4646 ;***********************************************************************
47+%ifdef X86_32_PICASM
48+SECTION .text align=16
49+%else
4750 SECTION .rodata align=16
51+%endif
4852
4953 sse2_32 times 8 dw 32
5054 sse2_20 times 8 dw 20
@@ -147,20 +151,7 @@ SECTION .text · 96 unmodified lines
147151 movdqa %2, %1
148152 psrldq %2, 2
149153 punpcklbw %2, %4
150−%ifdef X86_32_PICASM
151− push r0
152− mov r0, esp
153− and esp, 0xfffffff0
154− push 0x00140014
155− push 0x00140014
156− push 0x00140014
157− push 0x00140014
158− pmullw %2, [esp]
159− mov esp, r0
160− pop r0
161−%else
162− pmullw %2, [sse2_20]
163−%endif
154+ pmullw %2, [pic(sse2_20)]
164155 paddw %3, %2
165156
166157 movdqa %2, %1
@@ -254,6 +245,7 @@ WELS_EXTERN WaverageChromaFilter8_sse2 · 87 unmodified lines
254245
255246 %assign push_num 1
256247
248+ INIT_X86_32_PIC r4
257249 LOAD_2_PARA
258250
259251 mov r3, r1
@@ -285,6 +277,7 @@ WELS_EXTERN WaverageChromaFilter8_sse2 · 25 unmodified lines
285277 movq [r0 + 2], xmm3
286278
287279
280+ DEINIT_X86_32_PIC
288281 pop r3
289282
290283 %assign push_num 0

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t