[FFmpeg-cvslog] r12188 - in trunk/libavcodec: armv4l/dsputil_iwmmxt.c dsputil.h i386/cputest.c i386/dsputil_mmx.c
reimar
subversion
Sun Feb 24 15:46:23 CET 2008
Author: reimar
Date: Sun Feb 24 15:46:22 2008
New Revision: 12188
Log:
__asm __volatile -> asm volatile, improves code consistency and works
(as far as that is possible) with the Sun C compiler.
Modified:
trunk/libavcodec/armv4l/dsputil_iwmmxt.c
trunk/libavcodec/dsputil.h
trunk/libavcodec/i386/cputest.c
trunk/libavcodec/i386/dsputil_mmx.c
Modified: trunk/libavcodec/armv4l/dsputil_iwmmxt.c
==============================================================================
--- trunk/libavcodec/armv4l/dsputil_iwmmxt.c (original)
+++ trunk/libavcodec/armv4l/dsputil_iwmmxt.c Sun Feb 24 15:46:22 2008
@@ -125,7 +125,7 @@ void add_pixels_clamped_iwmmxt(const DCT
static void clear_blocks_iwmmxt(DCTELEM *blocks)
{
- __asm __volatile(
+ asm volatile(
"wzero wr0 \n\t"
"mov r1, #(128 * 6 / 32) \n\t"
"1: \n\t"
Modified: trunk/libavcodec/dsputil.h
==============================================================================
--- trunk/libavcodec/dsputil.h (original)
+++ trunk/libavcodec/dsputil.h Sun Feb 24 15:46:22 2008
@@ -520,7 +520,7 @@ void put_signed_pixels_clamped_mmx(const
static inline void emms(void)
{
- __asm __volatile ("emms;":::"memory");
+ asm volatile ("emms;":::"memory");
}
Modified: trunk/libavcodec/i386/cputest.c
==============================================================================
--- trunk/libavcodec/i386/cputest.c (original)
+++ trunk/libavcodec/i386/cputest.c Sun Feb 24 15:46:22 2008
@@ -35,7 +35,7 @@
/* ebx saving is necessary for PIC. gcc seems unable to see it alone */
#define cpuid(index,eax,ebx,ecx,edx)\
- __asm __volatile\
+ asm volatile\
("mov %%"REG_b", %%"REG_S"\n\t"\
"cpuid\n\t"\
"xchg %%"REG_b", %%"REG_S\
Modified: trunk/libavcodec/i386/dsputil_mmx.c
==============================================================================
--- trunk/libavcodec/i386/dsputil_mmx.c (original)
+++ trunk/libavcodec/i386/dsputil_mmx.c Sun Feb 24 15:46:22 2008
@@ -71,33 +71,33 @@ DECLARE_ALIGNED_8 (const uint64_t, ff_pb
DECLARE_ALIGNED_16(const double, ff_pd_1[2]) = { 1.0, 1.0 };
DECLARE_ALIGNED_16(const double, ff_pd_2[2]) = { 2.0, 2.0 };
-#define JUMPALIGN() __asm __volatile (ASMALIGN(3)::)
-#define MOVQ_ZERO(regd) __asm __volatile ("pxor %%" #regd ", %%" #regd ::)
+#define JUMPALIGN() asm volatile (ASMALIGN(3)::)
+#define MOVQ_ZERO(regd) asm volatile ("pxor %%" #regd ", %%" #regd ::)
#define MOVQ_WONE(regd) \
- __asm __volatile ( \
+ asm volatile ( \
"pcmpeqd %%" #regd ", %%" #regd " \n\t" \
"psrlw $15, %%" #regd ::)
#define MOVQ_BFE(regd) \
- __asm __volatile ( \
+ asm volatile ( \
"pcmpeqd %%" #regd ", %%" #regd " \n\t"\
"paddb %%" #regd ", %%" #regd " \n\t" ::)
#ifndef PIC
-#define MOVQ_BONE(regd) __asm __volatile ("movq %0, %%" #regd " \n\t" ::"m"(ff_bone))
-#define MOVQ_WTWO(regd) __asm __volatile ("movq %0, %%" #regd " \n\t" ::"m"(ff_wtwo))
+#define MOVQ_BONE(regd) asm volatile ("movq %0, %%" #regd " \n\t" ::"m"(ff_bone))
+#define MOVQ_WTWO(regd) asm volatile ("movq %0, %%" #regd " \n\t" ::"m"(ff_wtwo))
#else
// for shared library it's better to use this way for accessing constants
// pcmpeqd -> -1
#define MOVQ_BONE(regd) \
- __asm __volatile ( \
+ asm volatile ( \
"pcmpeqd %%" #regd ", %%" #regd " \n\t" \
"psrlw $15, %%" #regd " \n\t" \
"packuswb %%" #regd ", %%" #regd " \n\t" ::)
#define MOVQ_WTWO(regd) \
- __asm __volatile ( \
+ asm volatile ( \
"pcmpeqd %%" #regd ", %%" #regd " \n\t" \
"psrlw $15, %%" #regd " \n\t" \
"psllw $1, %%" #regd " \n\t"::)
@@ -288,7 +288,7 @@ void put_pixels_clamped_mmx(const DCTELE
p = block;
pix = pixels;
/* unrolled loop */
- __asm __volatile(
+ asm volatile(
"movq %3, %%mm0 \n\t"
"movq 8%3, %%mm1 \n\t"
"movq 16%3, %%mm2 \n\t"
@@ -313,7 +313,7 @@ void put_pixels_clamped_mmx(const DCTELE
// if here would be an exact copy of the code above
// compiler would generate some very strange code
// thus using "r"
- __asm __volatile(
+ asm volatile(
"movq (%3), %%mm0 \n\t"
"movq 8(%3), %%mm1 \n\t"
"movq 16(%3), %%mm2 \n\t"
@@ -364,7 +364,7 @@ void add_pixels_clamped_mmx(const DCTELE
MOVQ_ZERO(mm7);
i = 4;
do {
- __asm __volatile(
+ asm volatile(
"movq (%2), %%mm0 \n\t"
"movq 8(%2), %%mm1 \n\t"
"movq 16(%2), %%mm2 \n\t"
@@ -395,7 +395,7 @@ void add_pixels_clamped_mmx(const DCTELE
static void put_pixels4_mmx(uint8_t *block, const uint8_t *pixels, int line_size, int h)
{
- __asm __volatile(
+ asm volatile(
"lea (%3, %3), %%"REG_a" \n\t"
ASMALIGN(3)
"1: \n\t"
@@ -421,7 +421,7 @@ static void put_pixels4_mmx(uint8_t *blo
static void put_pixels8_mmx(uint8_t *block, const uint8_t *pixels, int line_size, int h)
{
- __asm __volatile(
+ asm volatile(
"lea (%3, %3), %%"REG_a" \n\t"
ASMALIGN(3)
"1: \n\t"
@@ -447,7 +447,7 @@ static void put_pixels8_mmx(uint8_t *blo
static void put_pixels16_mmx(uint8_t *block, const uint8_t *pixels, int line_size, int h)
{
- __asm __volatile(
+ asm volatile(
"lea (%3, %3), %%"REG_a" \n\t"
ASMALIGN(3)
"1: \n\t"
@@ -481,7 +481,7 @@ static void put_pixels16_mmx(uint8_t *bl
static void put_pixels16_sse2(uint8_t *block, const uint8_t *pixels, int line_size, int h)
{
- __asm __volatile(
+ asm volatile(
"1: \n\t"
"movdqu (%1), %%xmm0 \n\t"
"movdqu (%1,%3), %%xmm1 \n\t"
@@ -503,7 +503,7 @@ static void put_pixels16_sse2(uint8_t *b
static void avg_pixels16_sse2(uint8_t *block, const uint8_t *pixels, int line_size, int h)
{
- __asm __volatile(
+ asm volatile(
"1: \n\t"
"movdqu (%1), %%xmm0 \n\t"
"movdqu (%1,%3), %%xmm1 \n\t"
@@ -529,7 +529,7 @@ static void avg_pixels16_sse2(uint8_t *b
static void clear_blocks_mmx(DCTELEM *blocks)
{
- __asm __volatile(
+ asm volatile(
"pxor %%mm7, %%mm7 \n\t"
"mov $-128*6, %%"REG_a" \n\t"
"1: \n\t"
@@ -550,7 +550,7 @@ static int pix_sum16_mmx(uint8_t * pix,
int sum;
long index= -line_size*h;
- __asm __volatile(
+ asm volatile(
"pxor %%mm7, %%mm7 \n\t"
"pxor %%mm6, %%mm6 \n\t"
"1: \n\t"
More information about the ffmpeg-cvslog
mailing list