aboutsummaryrefslogtreecommitdiff
path: root/graphics/scaler/scale2x.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/scaler/scale2x.cpp')
-rw-r--r--graphics/scaler/scale2x.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/graphics/scaler/scale2x.cpp b/graphics/scaler/scale2x.cpp
index 226d379c91..877bbb9509 100644
--- a/graphics/scaler/scale2x.cpp
+++ b/graphics/scaler/scale2x.cpp
@@ -158,7 +158,7 @@ void scale2x_32_def(scale2x_uint32* dst0, scale2x_uint32* dst1, const scale2x_ui
/***************************************************************************/
/* Scale2x MMX implementation */
-#if defined(__GNUC__) && defined(__i386__)
+#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
/*
* Apply the Scale2x effect at a single row.
@@ -205,7 +205,7 @@ static inline void scale2x_8_mmx_single(scale2x_uint8* dst, const scale2x_uint8*
__asm__ __volatile__(
/* central runs */
- "shrl $3, %4\n"
+ "shr $3, %4\n"
"jz 1f\n"
"0:\n"
@@ -261,12 +261,12 @@ static inline void scale2x_8_mmx_single(scale2x_uint8* dst, const scale2x_uint8*
"movq %%mm3, 8(%3)\n"
/* next */
- "addl $8, %0\n"
- "addl $8, %1\n"
- "addl $8, %2\n"
- "addl $16, %3\n"
+ "add $8, %0\n"
+ "add $8, %1\n"
+ "add $8, %2\n"
+ "add $16, %3\n"
- "decl %4\n"
+ "dec %4\n"
"jnz 0b\n"
"1:\n"
@@ -283,7 +283,7 @@ static inline void scale2x_16_mmx_single(scale2x_uint16* dst, const scale2x_uint
__asm__ __volatile__(
/* central runs */
- "shrl $2, %4\n"
+ "shr $2, %4\n"
"jz 1f\n"
"0:\n"
@@ -339,12 +339,12 @@ static inline void scale2x_16_mmx_single(scale2x_uint16* dst, const scale2x_uint
"movq %%mm3, 8(%3)\n"
/* next */
- "addl $8, %0\n"
- "addl $8, %1\n"
- "addl $8, %2\n"
- "addl $16, %3\n"
+ "add $8, %0\n"
+ "add $8, %1\n"
+ "add $8, %2\n"
+ "add $16, %3\n"
- "decl %4\n"
+ "dec %4\n"
"jnz 0b\n"
"1:\n"
@@ -361,7 +361,7 @@ static inline void scale2x_32_mmx_single(scale2x_uint32* dst, const scale2x_uint
__asm__ __volatile__(
/* central runs */
- "shrl $1, %4\n"
+ "shr $1, %4\n"
"jz 1f\n"
"0:\n"
@@ -417,12 +417,12 @@ static inline void scale2x_32_mmx_single(scale2x_uint32* dst, const scale2x_uint
"movq %%mm3, 8(%3)\n"
/* next */
- "addl $8, %0\n"
- "addl $8, %1\n"
- "addl $8, %2\n"
- "addl $16, %3\n"
+ "add $8, %0\n"
+ "add $8, %1\n"
+ "add $8, %2\n"
+ "add $16, %3\n"
- "decl %4\n"
+ "dec %4\n"
"jnz 0b\n"
"1:\n"