Index: source/scale_gcc.cc |
diff --git a/source/scale_gcc.cc b/source/scale_gcc.cc |
index a1ae4e2773fc5ba56208b0cba5247a39017c60de..400f2fde9b5acdfb4a672fdc2ebbd361ad4cdc6a 100644 |
--- a/source/scale_gcc.cc |
+++ b/source/scale_gcc.cc |
@@ -316,7 +316,7 @@ void ScaleRowDown4_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride, |
void ScaleRowDown4Box_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride, |
uint8* dst_ptr, int dst_width) { |
- intptr_t stridex3 = 0; |
+ intptr_t stridex3; |
asm volatile ( |
"pcmpeqb %%xmm4,%%xmm4 \n" |
"psrlw $0xf,%%xmm4 \n" |
@@ -361,7 +361,7 @@ void ScaleRowDown4Box_SSSE3(const uint8* src_ptr, ptrdiff_t src_stride, |
: "+r"(src_ptr), // %0 |
"+r"(dst_ptr), // %1 |
"+r"(dst_width), // %2 |
- "+r"(stridex3) // %3 |
+ "=&r"(stridex3) // %3 |
: "r"((intptr_t)(src_stride)) // %4 |
: "memory", "cc", NACL_R14 |
"xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5" |
@@ -824,7 +824,7 @@ void ScaleAddRow_AVX2(const uint8* src_ptr, uint16* dst_ptr, int src_width) { |
// Bilinear column filtering. SSSE3 version. |
void ScaleFilterCols_SSSE3(uint8* dst_ptr, const uint8* src_ptr, |
int dst_width, int x, int dx) { |
- intptr_t x0 = 0, x1 = 0, temp_pixel = 0; |
+ intptr_t x0, x1, temp_pixel; |
asm volatile ( |
"movd %6,%%xmm2 \n" |
"movd %7,%%xmm3 \n" |
@@ -880,14 +880,14 @@ void ScaleFilterCols_SSSE3(uint8* dst_ptr, const uint8* src_ptr, |
"movd %%xmm0,%k2 \n" |
"mov %b2," MEMACCESS(0) " \n" |
"99: \n" |
- : "+r"(dst_ptr), // %0 |
- "+r"(src_ptr), // %1 |
- "+a"(temp_pixel), // %2 |
- "+r"(x0), // %3 |
- "+r"(x1), // %4 |
- "+rm"(dst_width) // %5 |
- : "rm"(x), // %6 |
- "rm"(dx) // %7 |
+ : "+r"(dst_ptr), // %0 |
+ "+r"(src_ptr), // %1 |
+ "=&a"(temp_pixel), // %2 |
+ "=&r"(x0), // %3 |
+ "=&r"(x1), // %4 |
+ "+rm"(dst_width) // %5 |
+ : "rm"(x), // %6 |
+ "rm"(dx) // %7 |
: "memory", "cc", NACL_R14 |
"xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6" |
); |
@@ -998,7 +998,7 @@ void ScaleARGBRowDown2Box_SSE2(const uint8* src_argb, |
void ScaleARGBRowDownEven_SSE2(const uint8* src_argb, ptrdiff_t src_stride, |
int src_stepx, uint8* dst_argb, int dst_width) { |
intptr_t src_stepx_x4 = (intptr_t)(src_stepx); |
- intptr_t src_stepx_x12 = 0; |
+ intptr_t src_stepx_x12; |
asm volatile ( |
"lea " MEMLEA3(0x00,1,4) ",%1 \n" |
"lea " MEMLEA4(0x00,1,1,2) ",%4 \n" |
@@ -1016,11 +1016,11 @@ void ScaleARGBRowDownEven_SSE2(const uint8* src_argb, ptrdiff_t src_stride, |
"lea " MEMLEA(0x10,2) ",%2 \n" |
"sub $0x4,%3 \n" |
"jg 1b \n" |
- : "+r"(src_argb), // %0 |
- "+r"(src_stepx_x4), // %1 |
- "+r"(dst_argb), // %2 |
- "+r"(dst_width), // %3 |
- "+r"(src_stepx_x12) // %4 |
+ : "+r"(src_argb), // %0 |
+ "+r"(src_stepx_x4), // %1 |
+ "+r"(dst_argb), // %2 |
+ "+r"(dst_width), // %3 |
+ "=&r"(src_stepx_x12) // %4 |
:: "memory", "cc", NACL_R14 |
"xmm0", "xmm1", "xmm2", "xmm3" |
); |
@@ -1032,7 +1032,7 @@ void ScaleARGBRowDownEvenBox_SSE2(const uint8* src_argb, |
ptrdiff_t src_stride, int src_stepx, |
uint8* dst_argb, int dst_width) { |
intptr_t src_stepx_x4 = (intptr_t)(src_stepx); |
- intptr_t src_stepx_x12 = 0; |
+ intptr_t src_stepx_x12; |
intptr_t row1 = (intptr_t)(src_stride); |
asm volatile ( |
"lea " MEMLEA3(0x00,1,4) ",%1 \n" |
@@ -1061,12 +1061,12 @@ void ScaleARGBRowDownEvenBox_SSE2(const uint8* src_argb, |
"lea " MEMLEA(0x10,2) ",%2 \n" |
"sub $0x4,%3 \n" |
"jg 1b \n" |
- : "+r"(src_argb), // %0 |
- "+r"(src_stepx_x4), // %1 |
- "+r"(dst_argb), // %2 |
- "+rm"(dst_width), // %3 |
- "+r"(src_stepx_x12), // %4 |
- "+r"(row1) // %5 |
+ : "+r"(src_argb), // %0 |
+ "+r"(src_stepx_x4), // %1 |
+ "+r"(dst_argb), // %2 |
+ "+rm"(dst_width), // %3 |
+ "=&r"(src_stepx_x12), // %4 |
+ "+r"(row1) // %5 |
:: "memory", "cc", NACL_R14 |
"xmm0", "xmm1", "xmm2", "xmm3" |
); |
@@ -1074,7 +1074,7 @@ void ScaleARGBRowDownEvenBox_SSE2(const uint8* src_argb, |
void ScaleARGBCols_SSE2(uint8* dst_argb, const uint8* src_argb, |
int dst_width, int x, int dx) { |
- intptr_t x0 = 0, x1 = 0; |
+ intptr_t x0, x1; |
asm volatile ( |
"movd %5,%%xmm2 \n" |
"movd %6,%%xmm3 \n" |
@@ -1127,8 +1127,8 @@ void ScaleARGBCols_SSE2(uint8* dst_argb, const uint8* src_argb, |
MEMOPREG(movd,0x00,3,0,4,xmm0) // movd (%3,%0,4),%%xmm0 |
"movd %%xmm0," MEMACCESS(2) " \n" |
"99: \n" |
- : "+a"(x0), // %0 |
- "+d"(x1), // %1 |
+ : "=&a"(x0), // %0 |
+ "=&d"(x1), // %1 |
"+r"(dst_argb), // %2 |
"+r"(src_argb), // %3 |
"+r"(dst_width) // %4 |
@@ -1179,7 +1179,7 @@ static uvec8 kShuffleFractions = { |
// Bilinear row filtering combines 4x2 -> 4x1. SSSE3 version |
void ScaleARGBFilterCols_SSSE3(uint8* dst_argb, const uint8* src_argb, |
int dst_width, int x, int dx) { |
- intptr_t x0 = 0, x1 = 0; |
+ intptr_t x0, x1; |
asm volatile ( |
"movdqa %0,%%xmm4 \n" |
"movdqa %1,%%xmm5 \n" |
@@ -1242,8 +1242,8 @@ void ScaleARGBFilterCols_SSSE3(uint8* dst_argb, const uint8* src_argb, |
: "+r"(dst_argb), // %0 |
"+r"(src_argb), // %1 |
"+rm"(dst_width), // %2 |
- "+r"(x0), // %3 |
- "+r"(x1) // %4 |
+ "=&r"(x0), // %3 |
+ "=&r"(x1) // %4 |
: "rm"(x), // %5 |
"rm"(dx) // %6 |
: "memory", "cc", NACL_R14 |