Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 362502 Details for
Bug 490276
=media-libs/x264-0.0.20130912 with =sys-devel/gcc-4.8.1-r1 - error: 'asm' operand has impossible constraints
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch register spilling mvc_max when x264_ultrahardened is defined
x264_allow_stack_check.patch (text/plain), 2.69 KB, created by
Francisco Blas Izquierdo Riera
on 2013-11-03 19:43:30 UTC
(
hide
)
Description:
Patch register spilling mvc_max when x264_ultrahardened is defined
Filename:
MIME Type:
Creator:
Francisco Blas Izquierdo Riera
Created:
2013-11-03 19:43:30 UTC
Size:
2.69 KB
patch
obsolete
>This patch register spills the mvc_max variable when x264_ultrahardened is defined. >The work in this patch is released under whichever license the x264 project has now or on the future. >Patch is: © (c) 2013 Francisco Blas Izquierdo Riera (klondike) klondike (a t ) gentoo.org >--- common/x86/util.h 2013-09-12 22:45:04.000000000 +0200 >+++ common/x86/util.h 2013-11-03 20:35:18.646888328 +0100 >@@ -121,11 +121,18 @@ > return amvd; > } > >+/*Some hardened systems only have available 4 registers on x86 systems. If that's he case we have to register spill mvc_max*/ >+#ifdef x264_ultrahardened >+#define mvc_max_mode "=m" >+#else >+#define mvc_max_mode "+r" >+#endif >+ > #define x264_predictor_clip x264_predictor_clip_mmx2 > static int ALWAYS_INLINE x264_predictor_clip_mmx2( int16_t (*dst)[2], int16_t (*mvc)[2], int i_mvc, int16_t mv_limit[2][2], uint32_t pmv ) > { > static const uint32_t pd_32 = 0x20; >- intptr_t tmp = (intptr_t)mv_limit, mvc_max = i_mvc, i = 0; >+ intptr_t tmp = (intptr_t)mv_limit, mvc_max = ((uint32_t *)mvc)+i_mvc, i = 0; > > asm( > "movq (%2), %%mm5 \n" >@@ -137,7 +145,6 @@ > "punpckldq %%mm3, %%mm3 \n" > "punpckldq %%mm5, %%mm5 \n" > "movd %7, %%mm4 \n" >- "lea (%0,%3,4), %3 \n" > "1: \n" > "movq (%0), %%mm0 \n" > "add $8, %0 \n" >@@ -176,7 +183,7 @@ > "and $1, %k2 \n" > "sub %2, %4 \n" // output += !(mv == pmv || mv == 0) > "3: \n" >- :"+r"(mvc), "=m"(M64( dst )), "+r"(tmp), "+r"(mvc_max), "+r"(i) >+ :"+r"(mvc), "=m"(M64( dst )), "+r"(tmp), mvc_max_mode(mvc_max), "+r"(i) > :"r"(dst), "g"(pmv), "m"(pd_32), "m"(M64( mvc )) > ); > return i; >@@ -188,7 +195,7 @@ > { > static const uint64_t pw_2 = 0x0002000200020002ULL; > static const uint32_t pd_32 = 0x20; >- intptr_t tmp = (intptr_t)mv_limit, mvc_max = i_mvc, i = 0; >+ intptr_t tmp = (intptr_t)mv_limit, mvc_max = ((uint32_t *)mvc)+i_mvc, i = 0; > > asm( > "movq (%2), %%mm5 \n" >@@ -200,7 +207,6 @@ > "punpckldq %%mm3, %%mm3 \n" > "punpckldq %%mm5, %%mm5 \n" > "movd %8, %%mm4 \n" >- "lea (%0,%3,4), %3 \n" > "1: \n" > "movq (%0), %%mm0 \n" > "add $8, %0 \n" >@@ -243,7 +249,7 @@ > "and $1, %k2 \n" > "sub %2, %4 \n" > "3: \n" >- :"+r"(mvc), "=m"(M64( dst )), "+r"(tmp), "+r"(mvc_max), "+r"(i) >+ :"+r"(mvc), "=m"(M64( dst )), "+r"(tmp), mvc_max_mode(mvc_max), "+r"(i) > :"r"(dst), "m"(pw_2), "g"(pmv), "m"(pd_32), "m"(M64( mvc )) > ); > return i;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 490276
:
362488
| 362502