Index: libmpcodecs/vf_fspp.c =================================================================== --- libmpcodecs/vf_fspp.c (Revision 26068) +++ libmpcodecs/vf_fspp.c (Arbeitskopie) @@ -702,8 +702,6 @@ #ifdef HAVE_MMX -static uint64_t attribute_used __attribute__((aligned(8))) temps[4];//!! - DECLARE_ASM_CONST(8, uint64_t, MM_FIX_0_382683433)=FIX64(0.382683433, 14); DECLARE_ASM_CONST(8, uint64_t, MM_FIX_0_541196100)=FIX64(0.541196100, 14); DECLARE_ASM_CONST(8, uint64_t, MM_FIX_0_707106781)=FIX64(0.707106781, 14); @@ -967,7 +965,8 @@ "pmulhw "MANGLE(MM_FIX_1_414213562_A)", %%mm1 \n\t" "paddw %%mm6, %%mm2 \n\t" //'t0 - "movq %%mm2, "MANGLE(temps)"+0*8 \n\t" //! + "subl $32, %%"REG_SP" \n\t" + "movq %%mm2, 0*8(%%"REG_SP") \n\t" "psubw %%mm6, %%mm7 \n\t" //'t3 "movq "DCTSIZE_S"*2*2(%%"REG_S"), %%mm2 \n\t" @@ -976,7 +975,7 @@ "psubw "DCTSIZE_S"*5*2(%%"REG_S"), %%mm2 \n\t" //t5 "movq %%mm5, %%mm6 \n\t" - "movq %%mm7, "MANGLE(temps)"+3*8 \n\t" + "movq %%mm7, 3*8(%%"REG_SP") \n\t" "paddw %%mm2, %%mm3 \n\t" //t10 "paddw %%mm4, %%mm2 \n\t" //t11 @@ -1003,13 +1002,13 @@ "paddw %%mm3, %%mm7 \n\t" //z2 - "movq %%mm5, "MANGLE(temps)"+1*8 \n\t" + "movq %%mm5, 1*8(%%"REG_SP") \n\t" "paddw %%mm3, %%mm4 \n\t" //z4 "movq 3*16(%%"REG_d"), %%mm3 \n\t" "movq %%mm0, %%mm1 \n\t" - "movq %%mm6, "MANGLE(temps)"+2*8 \n\t" + "movq %%mm6, 2*8(%%"REG_SP") \n\t" "psubw %%mm2, %%mm1 \n\t" //z13 //=== @@ -1069,7 +1068,7 @@ // t4 t5 - - - t6 t7 - //--- t4 (mm0) may be <>0; mm1, mm5, mm6 == 0 //Typical numbers: nondc - 19%%, dc - 26%%, zero - 55%%. zero case alone isn't worthwhile - "movq "MANGLE(temps)"+0*8, %%mm4 \n\t" + "movq 0*8(%%"REG_SP"), %%mm4 \n\t" "movq %%mm0, %%mm1 \n\t" "pmulhw "MANGLE(MM_FIX_0_847759065)", %%mm0 \n\t" //tmp6 @@ -1081,7 +1080,7 @@ "pmulhw "MANGLE(MM_FIX_0_566454497)", %%mm1 \n\t" //tmp5 "paddw %%mm4, %%mm5 \n\t" - "movq "MANGLE(temps)"+1*8, %%mm6 \n\t" + "movq 1*8(%%"REG_SP"), %%mm6 \n\t" //paddw mm3, MM_2 "psraw $2, %%mm3 \n\t" //tmp7 @@ -1094,7 +1093,7 @@ "movq %%mm4, "DCTSIZE_S"*7*2(%%"REG_D") \n\t" "paddw %%mm6, %%mm7 \n\t" - "movq "MANGLE(temps)"+2*8, %%mm3 \n\t" + "movq 2*8(%%"REG_SP"), %%mm3 \n\t" "psubw %%mm0, %%mm6 \n\t" "movq "DCTSIZE_S"*2*2(%%"REG_D"), %%mm4 \n\t" @@ -1112,7 +1111,8 @@ "movq "DCTSIZE_S"*3*2(%%"REG_D"), %%mm6 \n\t" "paddw %%mm3, %%mm5 \n\t" - "movq "MANGLE(temps)"+3*8, %%mm0 \n\t" + "movq 3*8(%%"REG_SP"), %%mm0 \n\t" + "add $32, %%"REG_SP" \n\t" "add $8, %%"REG_S" \n\t" "movq %%mm7, "DCTSIZE_S"*1*2(%%"REG_D") \n\t" @@ -1161,7 +1161,7 @@ "movq %%mm2, %%mm7 \n\t" //--- - "movq "MANGLE(temps)"+0*8, %%mm4 \n\t" + "movq 0*8(%%"REG_SP"), %%mm4 \n\t" "psubw %%mm3, %%mm2 \n\t" "psllw $1, %%mm2 \n\t" @@ -1175,7 +1175,7 @@ "paddw "DCTSIZE_S"*0*2(%%"REG_D"), %%mm4 \n\t" "psubw %%mm7, %%mm6 \n\t" - "movq "MANGLE(temps)"+1*8, %%mm3 \n\t" + "movq 1*8(%%"REG_SP"), %%mm3 \n\t" "paddw %%mm7, %%mm4 \n\t" "movq %%mm6, "DCTSIZE_S"*7*2(%%"REG_D") \n\t" @@ -1184,10 +1184,11 @@ "movq %%mm4, "DCTSIZE_S"*0*2(%%"REG_D") \n\t" "psubw %%mm7, %%mm1 \n\t" //'t6 - "movq "MANGLE(temps)"+2*8, %%mm7 \n\t" + "movq 2*8(%%"REG_SP"), %%mm7 \n\t" "psubw %%mm5, %%mm0 \n\t" //'t10 - "movq "MANGLE(temps)"+3*8, %%mm6 \n\t" + "movq 3*8(%%"REG_SP"), %%mm6 \n\t" + "addl $32, %%"REG_SP" \n\t" "movq %%mm3, %%mm5 \n\t" "paddw "DCTSIZE_S"*1*2(%%"REG_D"), %%mm3 \n\t" @@ -1325,7 +1326,8 @@ "pmulhw "MANGLE(MM_FIX_1_414213562_A)", %%mm1 \n\t" "paddw %%mm6, %%mm2 \n\t" //'t0 - "movq %%mm2, "MANGLE(temps)"+0*8 \n\t" //! + "subl $32, %%"REG_SP" \n\t" + "movq %%mm2, 0*8(%%"REG_SP") \n\t" "psubw %%mm6, %%mm7 \n\t" //'t3 "movq "DCTSIZE_S"*2*2(%%"REG_S"), %%mm2 \n\t" @@ -1334,7 +1336,7 @@ "psubw "DCTSIZE_S"*5*2(%%"REG_S"), %%mm2 \n\t" //t5 "movq %%mm5, %%mm6 \n\t" - "movq %%mm7, "MANGLE(temps)"+3*8 \n\t" + "movq %%mm7, 3*8(%%"REG_SP") \n\t" "paddw %%mm2, %%mm3 \n\t" //t10 "paddw %%mm4, %%mm2 \n\t" //t11 @@ -1361,13 +1363,13 @@ "paddw %%mm3, %%mm7 \n\t" //z2 - "movq %%mm5, "MANGLE(temps)"+1*8 \n\t" + "movq %%mm5, 1*8(%%"REG_SP") \n\t" "paddw %%mm3, %%mm4 \n\t" //z4 "movq 1*8+3*16(%%"REG_d"), %%mm3 \n\t" "movq %%mm0, %%mm1 \n\t" - "movq %%mm6, "MANGLE(temps)"+2*8 \n\t" + "movq %%mm6, 2*8(%%"REG_SP") \n\t" "psubw %%mm2, %%mm1 \n\t" //z13 //=== @@ -1427,7 +1429,7 @@ // t4 t5 - - - t6 t7 - //--- t4 (mm0) may be <>0; mm1, mm5, mm6 == 0 //Typical numbers: nondc - 19%%, dc - 26%%, zero - 55%%. zero case alone isn't worthwhile - "movq "MANGLE(temps)"+0*8, %%mm4 \n\t" + "movq 0*8(%%"REG_SP"), %%mm4 \n\t" "movq %%mm0, %%mm1 \n\t" "pmulhw "MANGLE(MM_FIX_0_847759065)", %%mm0 \n\t" //tmp6 @@ -1439,7 +1441,7 @@ "pmulhw "MANGLE(MM_FIX_0_566454497)", %%mm1 \n\t" //tmp5 "paddw %%mm4, %%mm5 \n\t" - "movq "MANGLE(temps)"+1*8, %%mm6 \n\t" + "movq 1*8(%%"REG_SP"), %%mm6 \n\t" //paddw mm3, MM_2 "psraw $2, %%mm3 \n\t" //tmp7 @@ -1452,7 +1454,7 @@ "movq %%mm4, "DCTSIZE_S"*7*2(%%"REG_D") \n\t" "paddw %%mm6, %%mm7 \n\t" - "movq "MANGLE(temps)"+2*8, %%mm3 \n\t" + "movq 2*8(%%"REG_SP"), %%mm3 \n\t" "psubw %%mm0, %%mm6 \n\t" "movq "DCTSIZE_S"*2*2(%%"REG_D"), %%mm4 \n\t" @@ -1470,7 +1472,8 @@ "movq "DCTSIZE_S"*3*2(%%"REG_D"), %%mm6 \n\t" "paddw %%mm3, %%mm5 \n\t" - "movq "MANGLE(temps)"+3*8, %%mm0 \n\t" + "movq 3*8(%%"REG_SP"), %%mm0 \n\t" + "add $32, %%"REG_SP" \n\t" "add $24, %%"REG_S" \n\t" "movq %%mm7, "DCTSIZE_S"*1*2(%%"REG_D") \n\t" @@ -1521,7 +1524,7 @@ "movq %%mm2, %%mm7 \n\t" //--- - "movq "MANGLE(temps)"+0*8, %%mm4 \n\t" + "movq 0*8(%%"REG_SP"), %%mm4 \n\t" "psubw %%mm3, %%mm2 \n\t" "psllw $1, %%mm2 \n\t" @@ -1535,7 +1538,7 @@ "paddw "DCTSIZE_S"*0*2(%%"REG_D"), %%mm4 \n\t" "psubw %%mm7, %%mm6 \n\t" - "movq "MANGLE(temps)"+1*8, %%mm3 \n\t" + "movq 1*8(%%"REG_SP"), %%mm3 \n\t" "paddw %%mm7, %%mm4 \n\t" "movq %%mm6, "DCTSIZE_S"*7*2(%%"REG_D") \n\t" @@ -1544,10 +1547,11 @@ "movq %%mm4, "DCTSIZE_S"*0*2(%%"REG_D") \n\t" "psubw %%mm7, %%mm1 \n\t" //'t6 - "movq "MANGLE(temps)"+2*8, %%mm7 \n\t" + "movq 2*8(%%"REG_SP"), %%mm7 \n\t" "psubw %%mm5, %%mm0 \n\t" //'t10 - "movq "MANGLE(temps)"+3*8, %%mm6 \n\t" + "movq 3*8(%%"REG_SP"), %%mm6 \n\t" + "addl $32, %%"REG_SP" \n\t" "movq %%mm3, %%mm5 \n\t" "paddw "DCTSIZE_S"*1*2(%%"REG_D"), %%mm3 \n\t" @@ -1722,10 +1726,11 @@ "movq "DCTSIZE_S"*2*2+"DCTSIZE_S"(%%"REG_S"), %%mm5 \n\t" "paddw %%mm0, %%mm1 \n\t" //t1 - "movq %%mm4, "MANGLE(temps)"+0*8 \n\t" //t0 + "subl $16, %%"REG_SP" \n\t" + "movq %%mm4, 0*8(%%"REG_SP") \n\t" //t0 "movq %%mm3, %%mm4 \n\t" - "movq %%mm6, "MANGLE(temps)"+1*8 \n\t" //t3 + "movq %%mm6, 1*8(%%"REG_SP") \n\t" //t3 "punpcklwd %%mm2, %%mm3 \n\t" //transpose 4x4 @@ -1775,7 +1780,7 @@ "psllw $3, %%mm0 \n\t" "psubw %%mm3, %%mm4 \n\t" //t10 - "movq "MANGLE(temps)"+0*8, %%mm6 \n\t" + "movq 0*8(%%"REG_SP"), %%mm6 \n\t" "movq %%mm1, %%mm3 \n\t" "psllw $3, %%mm4 \n\t" @@ -1796,7 +1801,7 @@ "movq "MANGLE(MM_DESCALE_RND)", %%mm2 \n\t" //4 "psubw %%mm5, %%mm6 \n\t" //d7 - "paddw "MANGLE(temps)"+0*8, %%mm5 \n\t" //d0 + "paddw 0*8(%%"REG_SP"), %%mm5 \n\t" //d0 "paddw %%mm2, %%mm1 \n\t" "paddw %%mm2, %%mm5 \n\t" @@ -1823,7 +1828,7 @@ "movq %%mm7, (%%"REG_D",%%"REG_a",2) \n\t" "add %%"REG_d", %%"REG_D" \n\t" //3*ls - "movq "MANGLE(temps)"+1*8, %%mm5 \n\t" //t3 + "movq 1*8(%%"REG_SP"), %%mm5 \n\t" //t3 "psraw $3, %%mm3 \n\t" "paddw (%%"REG_D",%%"REG_a",2), %%mm0 \n\t" @@ -1832,7 +1837,8 @@ "paddw (%%"REG_D",%%"REG_d",), %%mm3 \n\t" "psraw $3, %%mm6 \n\t" - "paddw "MANGLE(temps)"+1*8, %%mm4 \n\t" //d4 + "paddw 1*8(%%"REG_SP"), %%mm4 \n\t" //d4 + "addl $16, %%"REG_SP" \n\t" "paddw %%mm2, %%mm5 \n\t" "paddw (%%"REG_D",%%"REG_a",4), %%mm6 \n\t" @@ -1965,10 +1971,11 @@ "movd (%%"REG_S",%%"REG_a",2), %%mm3 \n\t" //5 "paddw %%mm4, %%mm1 \n\t" - "movq %%mm5, "MANGLE(temps)"+0*8 \n\t" //t7 + "subl $16, %%"REG_SP" \n\t" + "movq %%mm5, 0*8(%%"REG_SP") \n\t" //t7 "punpcklbw %%mm7, %%mm3 \n\t" - "movq %%mm6, "MANGLE(temps)"+1*8 \n\t" //t6 + "movq %%mm6, 1*8(%%"REG_SP") \n\t" //t6 "movq %%mm2, %%mm4 \n\t" "movd (%%"REG_S"), %%mm5 \n\t" //3 @@ -2014,7 +2021,7 @@ "psubw %%mm1, %%mm5 \n\t" //d1 "movq %%mm0, %%mm6 \n\t" - "movq "MANGLE(temps)"+1*8, %%mm1 \n\t" + "movq 1*8(%%"REG_SP"), %%mm1 \n\t" "punpcklwd %%mm5, %%mm0 \n\t" "punpckhwd %%mm5, %%mm6 \n\t" @@ -2038,7 +2045,8 @@ "movq %%mm7, "DCTSIZE_S"*3*2(%%"REG_D") \n\t" "psllw $2, %%mm3 \n\t" //t10 - "movq "MANGLE(temps)"+0*8, %%mm2 \n\t" + "movq 0*8(%%"REG_SP"), %%mm2 \n\t" + "addl $16, %%"REG_SP" \n\t" "psllw $2, %%mm4 \n\t" //t11 "pmulhw "MANGLE(MM_FIX_0_707106781)", %%mm4 \n\t" //z3