diff options
author | Ramiro Polla <ramiro.polla@gmail.com> | 2010-10-06 06:46:22 +0400 |
---|---|---|
committer | Ramiro Polla <ramiro.polla@gmail.com> | 2010-10-06 06:46:22 +0400 |
commit | 2344dc6bb6e3a14a1752f1774fd98eaca6568d86 (patch) | |
tree | 27d5529ee39fa0747f2412708920759b86e93385 /doc | |
parent | 326bf69accced8e86822904b31258d25025f8cdc (diff) |
doc: mention xmm clobber macros usage
Originally committed as revision 25364 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'doc')
-rw-r--r-- | doc/optimization.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/optimization.txt b/doc/optimization.txt index 3a5d85e62a..5d51235983 100644 --- a/doc/optimization.txt +++ b/doc/optimization.txt @@ -172,6 +172,12 @@ yasm), you do this by using: cglobal functon_name, num_args, num_regs, num_xmm_regs In inline asm, you specify clobbered registers at the end of your asm: __asm__(".." ::: "%eax"). +If gcc is not set to support sse (-msse) it will not accept xmm registers +in the clobber list. For that we use two macros to declare the clobbers. +XMM_CLOBBERS should be used when there are other clobbers, for example: +__asm__(".." ::: XMM_CLOBBERS("xmm0",) "eax"); +and XMM_CLOBBERS_ONLY should be used when the only clobbers are xmm registers: +__asm__(".." :: XMM_CLOBBERS_ONLY("xmm0")); Do not expect a compiler to maintain values in your registers between separate (inline) asm code blocks. It is not required to. For example, this is bad: |