]> git.sesse.net Git - qscale/commitdiff
Use local labels instead of hardcoded names, so we can theoretically
authorsgunderson@bigfoot.com <>
Sun, 3 Feb 2008 19:37:46 +0000 (20:37 +0100)
committersgunderson@bigfoot.com <>
Sun, 3 Feb 2008 19:37:46 +0000 (20:37 +0100)
compile with unrolled loops.

qscale.c

index 0f9598f32a29de1fed6b8ba694802a4dae1810a1..5c5ee09448e6cff919825d2ab7f2972a3015cf4c 100644 (file)
--- a/qscale.c
+++ b/qscale.c
@@ -108,14 +108,14 @@ void hscale(float *pix, unsigned char *npix, unsigned w, unsigned h, unsigned nw
                        asm (
                                "pxor %1, %1               \n"
                                "xor %2, %2                \n"
-                               ".lbl2:                    \n"
+                               "0:                        \n"
                                "movups (%4,%2),%%xmm1     \n"
                                "movups (%3,%2),%%xmm2     \n"
                                "mulps %%xmm2,%%xmm1       \n"
                                "addps %%xmm1,%1           \n"
                                "add $16,%2                \n"
                                "dec %5                    \n"
-                               "jnz .lbl2                 \n"
+                               "jnz 0b                    \n"
                                "haddps %1,%1              \n"
                                "haddps %1,%1              \n"
                                "maxss %6,%1               \n"
@@ -231,7 +231,7 @@ void vscale(unsigned char *pix, float *npix, unsigned w, unsigned h, unsigned nh
                                "pxor %%xmm3, %%xmm3          \n"
 
                                /* main loop */
-                               ".lbl:                        \n"
+                               "0:                           \n"
                                
                                /* a zero is useful during unpacking */
                                "pxor %%xmm4, %%xmm4          \n"
@@ -290,7 +290,7 @@ void vscale(unsigned char *pix, float *npix, unsigned w, unsigned h, unsigned nh
                                "add $4, %2                   \n"
                                "add %3, %0                   \n"
                                "dec %1                       \n"
-                               "jnz .lbl                     \n"
+                               "jnz 0b                       \n"
 
                                /* store the values */
                                "movaps %%xmm0, (%4)          \n"