diff i386/flacdsp_mmx.c @ 6755:33896780c612 libavcodec

Do not misuse long as the size of a register in x86. typedef x86_reg as the appropriate size and use it instead.
author ramiro
date Thu, 08 May 2008 21:11:24 +0000
parents 0ea2b97aa9f6
children f7cbb7733146
line wrap: on
line diff
--- a/i386/flacdsp_mmx.c	Thu May 08 14:02:35 2008 +0000
+++ b/i386/flacdsp_mmx.c	Thu May 08 21:11:24 2008 +0000
@@ -20,13 +20,14 @@
  */
 
 #include "dsputil_mmx.h"
+#include "x86_cpu.h"
 
 static void apply_welch_window_sse2(const int32_t *data, int len, double *w_data)
 {
     double c = 2.0 / (len-1.0);
     int n2 = len>>1;
-    long i = -n2*sizeof(int32_t);
-    long j =  n2*sizeof(int32_t);
+    x86_reg i = -n2*sizeof(int32_t);
+    x86_reg j =  n2*sizeof(int32_t);
     asm volatile(
         "movsd   %0,     %%xmm7 \n\t"
         "movapd  %1,     %%xmm6 \n\t"
@@ -71,7 +72,7 @@
     double *data1 = tmp + lag;
     int j;
 
-    if((long)data1 & 15)
+    if((x86_reg)data1 & 15)
         data1++;
 
     apply_welch_window_sse2(data, len, data1);
@@ -81,7 +82,7 @@
     data1[len] = 0.0;
 
     for(j=0; j<lag; j+=2){
-        long i = -len*sizeof(double);
+        x86_reg i = -len*sizeof(double);
         if(j == lag-2) {
             asm volatile(
                 "movsd     %6,     %%xmm0 \n\t"