Skip to content
Snippets Groups Projects
Commit c54f5b79 authored by Lyndon Brown's avatar Lyndon Brown
Browse files

packetizer/startcode_helper: disable AVX2 vector-size implementation

generates the following errors on some platforms (android-x86;
android-x86_64; macos; ios-simulator-x86_64):

../../modules/packetizer/startcode_helper.h:91:41: error: invalid input size for constraint 'x'
                : [v]"r"(p), [czero]"x"(zeros)

'x' is supposedly the right constraint for both xmm and ymm registers, and
this compiles fine on other platforms. googling got me nowhere.
parent 5aa06eed
No related branches found
No related tags found
1 merge request!1test
Pipeline #28836 canceled with stage
in 33 seconds
......@@ -75,23 +75,24 @@ static inline const uint8_t * startcode_FindAnnexB_AVX2( const uint8_t *p, const
alignedend = end - ((intptr_t) end & 31);
if( alignedend > p )
{
# ifdef HAS_ATTRIBUTE_VECTORSIZE
const v32qu zeros = { 0 };
# endif
//# ifdef HAS_ATTRIBUTE_VECTORSIZE
// const v32qu zeros = { 0 };
//# endif
for( ; p < alignedend; p += 32)
{
uint32_t match;
# ifdef HAS_ATTRIBUTE_VECTORSIZE
__asm__ volatile(
"vmovdqa 0(%[v]), %%ymm0\n"
"vpcmpeqb %[czero], %%ymm0, %%ymm0\n"
"vpmovmskb %%ymm0, %[match]\n" /* mask will be in reversed match order */
: [match]"=r"(match)
: [v]"r"(p), [czero]"x"(zeros)
: "ymm0"
);
# else
//FIXME: This gives this error on some platforms: "invalid input size for constraint 'x'"
//# ifdef HAS_ATTRIBUTE_VECTORSIZE
// __asm__ volatile(
// "vmovdqa 0(%[v]), %%ymm0\n"
// "vpcmpeqb %[czero], %%ymm0, %%ymm0\n"
// "vpmovmskb %%ymm0, %[match]\n" /* mask will be in reversed match order */
// : [match]"=r"(match)
// : [v]"r"(p), [czero]"x"(zeros)
// : "ymm0"
// );
//# else
__asm__ volatile(
"vmovdqa 0(%[v]), %%ymm0\n"
"vpxor %%ymm1, %%ymm1, %%ymm1\n"
......@@ -101,7 +102,7 @@ static inline const uint8_t * startcode_FindAnnexB_AVX2( const uint8_t *p, const
: [v]"r"(p)
: "ymm0", "ymm1"
);
# endif
//# endif
if( match & 0x0000000F )
TRY_MATCH(p, 0);
if( match & 0x000000F0 )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment