[vlc-devel] [PATCH 3/19] packetizer/startcode_helper: minor tweaks
Lyndon Brown
jnqnfe at gmail.com
Thu Sep 24 21:35:21 CEST 2020
From: Lyndon Brown <jnqnfe at gmail.com>
Date: Thu, 24 Sep 2020 16:45:19 +0100
Subject: packetizer/startcode_helper: minor tweaks
- use `__asm__` rather than `asm`.
- better align a few asm statements.
diff --git a/modules/packetizer/startcode_helper.h b/modules/packetizer/startcode_helper.h
index c867ee41ea..b01a56e238 100644
--- a/modules/packetizer/startcode_helper.h
+++ b/modules/packetizer/startcode_helper.h
@@ -1,7 +1,7 @@
/*****************************************************************************
* startcode_helper.h: Startcodes helpers
*****************************************************************************
- * Copyright (C) 2016 VideoLAN Authors
+ * Copyright (C) 2016, 2020 VideoLAN Authors
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
@@ -23,7 +23,7 @@
#include <vlc_cpu.h>
#ifdef CAN_COMPILE_SSE2
-# if defined __has_attribute
+# ifdef __has_attribute
# if __has_attribute(__vector_size__)
# define HAS_ATTRIBUTE_VECTORSIZE
# endif
@@ -79,17 +79,17 @@ static inline const uint8_t * startcode_FindAnnexB_SSE2( const uint8_t *p, const
{
uint32_t match;
# ifdef HAS_ATTRIBUTE_VECTORSIZE
- asm volatile(
- "movdqa 0(%[v]), %%xmm0\n"
- "pcmpeqb %[czero], %%xmm0\n"
- "pmovmskb %%xmm0, %[match]\n" /* mask will be in reversed match order */
+ __asm__ volatile(
+ "movdqa 0(%[v]), %%xmm0\n"
+ "pcmpeqb %[czero], %%xmm0\n"
+ "pmovmskb %%xmm0, %[match]\n" /* mask will be in reversed match order */
: [match]"=r"(match)
: [v]"r"(p), [czero]"x"(zeros)
: "xmm0"
);
# else
- asm volatile(
- "movdqa 0(%[v]), %%xmm0\n"
+ __asm__ volatile(
+ "movdqa 0(%[v]), %%xmm0\n"
"pxor %%xmm1, %%xmm1\n"
"pcmpeqb %%xmm1, %%xmm0\n"
"pmovmskb %%xmm0, %[match]\n" /* mask will be in reversed match order */
More information about the vlc-devel
mailing list