History

sync yasm macros from x264

Originally committed as revision 24406 to svn://svn.ffmpeg.org/ffmpeg/trunk

Loren Merritt committed 16 years ago

Commit 532e7691 parent 8731dbd1 file · +23 −12Browse files

Unified · Split

libavcodec/x86/x86inc.asm+23−12
@@ -271,13 +271,21 @@ DECLARE_REG 6, rax, eax, ax, al, [rsp + stack_offset + 56] · 270 unmodified lines
271271 ASSERT %2 >= %1
272272 %assign regs_used %2
273273 ASSERT regs_used <= 7
274− %assign xmm_regs_used %3
275− ASSERT xmm_regs_used <= 16
276274 %if regs_used > 4
277275 push r4
278276 push r5
279277 %assign stack_offset stack_offset+16
280278 %endif
279+ WIN64_SPILL_XMM %3
280+ LOAD_IF_USED 4, %1
281+ LOAD_IF_USED 5, %1
282+ LOAD_IF_USED 6, %1
283+ DEFINE_ARGS %4
284+%endmacro
285+
286+%macro WIN64_SPILL_XMM 1
287+ %assign xmm_regs_used %1
288+ ASSERT xmm_regs_used <= 16
281289 %if xmm_regs_used > 6
282290 sub rsp, (xmm_regs_used-6)*16+16
283291 %assign stack_offset stack_offset+(xmm_regs_used-6)*16+16
@@ -287,13 +295,9 @@ DECLARE_REG 6, rax, eax, ax, al, [rsp + stack_offset + 56] · 3 unmodified lines
287295 movdqa [rsp + (%%i-6)*16+8], xmm %+ %%i
288296 %endrep
289297 %endif
290− LOAD_IF_USED 4, %1
291− LOAD_IF_USED 5, %1
292− LOAD_IF_USED 6, %1
293− DEFINE_ARGS %4
294298 %endmacro
295299
296−%macro RESTORE_XMM_INTERNAL 1
300+%macro WIN64_RESTORE_XMM_INTERNAL 1
297301 %if xmm_regs_used > 6
298302 %assign %%i xmm_regs_used
299303 %rep (xmm_regs_used-6)
@@ -304,14 +308,14 @@ DECLARE_REG 6, rax, eax, ax, al, [rsp + stack_offset + 56] · 4 unmodified lines
304308 %endif
305309 %endmacro
306310
307−%macro RESTORE_XMM 1
308− RESTORE_XMM_INTERNAL %1
311+%macro WIN64_RESTORE_XMM 1
312+ WIN64_RESTORE_XMM_INTERNAL %1
309313 %assign stack_offset stack_offset-(xmm_regs_used-6)*16+16
310314 %assign xmm_regs_used 0
311315 %endmacro
312316
313317 %macro RET 0
314− RESTORE_XMM_INTERNAL rsp
318+ WIN64_RESTORE_XMM_INTERNAL rsp
315319 %if regs_used > 4
316320 pop r5
317321 pop r4
@@ -428,6 +432,13 @@ DECLARE_REG 6, ebp, ebp, bp, null, [esp + stack_offset + 28] · 110 unmodified lines
428432
429433 %endif ;======================================================================
430434
435+%ifndef WIN64
436+%macro WIN64_SPILL_XMM 1
437+%endmacro
438+%macro WIN64_RESTORE_XMM 1
439+%endmacro
440+%endif
441+
431442
432443
433444 ;=============================================================================
@@ -494,7 +505,7 @@ SECTION .note.GNU-stack noalloc noexec nowrite progbits · 60 unmodified lines
494505 %define mova movq
495506 %define movu movq
496507 %define movh movd
497− %define movnt movntq
508+ %define movnta movntq
498509 %assign %%i 0
499510 %rep 8
500511 CAT_XDEFINE m, %%i, mm %+ %%i
@@ -518,7 +529,7 @@ SECTION .note.GNU-stack noalloc noexec nowrite progbits · 17 unmodified lines
518529 %define mova movdqa
519530 %define movu movdqu
520531 %define movh movq
521− %define movnt movntdq
532+ %define movnta movntdq
522533 %assign %%i 0
523534 %rep num_mmregs
524535 CAT_XDEFINE m, %%i, xmm %+ %%i

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