pixman: Branch 'master' - 2 commits
Søren Sandmann Pedersen
sandmann at kemper.freedesktop.org
Sun Jul 19 19:51:43 PDT 2009
pixman/pixman-access.c | 28 ++++++++++++++--------------
pixman/pixman-arm-simd.c | 2 +-
pixman/pixman-cpu.c | 12 +++++++-----
pixman/pixman-sse2.c | 8 +++++---
4 files changed, 27 insertions(+), 23 deletions(-)
New commits:
commit 854ec2ea4d0fc940e91c4ec1c419fb4e5635dc95
Author: Søren Sandmann Pedersen <sandmann at redhat.com>
Date: Sun Jul 19 12:29:42 2009 -0400
Replace // comments with /* */ comments in various places
diff --git a/pixman/pixman-access.c b/pixman/pixman-access.c
index 19f70d7..a5e1c0f 100644
--- a/pixman/pixman-access.c
+++ b/pixman/pixman-access.c
@@ -2425,10 +2425,10 @@ store_scanline_a2r10g10b10 (bits_image_t * image,
for (i = 0; i < width; ++i)
{
WRITE (image, pixel++,
- ((values[i] >> 32) & 0xc0000000) | // A
- ((values[i] >> 18) & 0x3ff00000) | // R
- ((values[i] >> 12) & 0xffc00) | // G
- ((values[i] >> 6) & 0x3ff)); // B
+ ((values[i] >> 32) & 0xc0000000) |
+ ((values[i] >> 18) & 0x3ff00000) |
+ ((values[i] >> 12) & 0xffc00) |
+ ((values[i] >> 6) & 0x3ff));
}
}
@@ -2447,9 +2447,9 @@ store_scanline_x2r10g10b10 (bits_image_t * image,
for (i = 0; i < width; ++i)
{
WRITE (image, pixel++,
- ((values[i] >> 18) & 0x3ff00000) | // R
- ((values[i] >> 12) & 0xffc00) | // G
- ((values[i] >> 6) & 0x3ff)); // B
+ ((values[i] >> 18) & 0x3ff00000) |
+ ((values[i] >> 12) & 0xffc00) |
+ ((values[i] >> 6) & 0x3ff));
}
}
@@ -2468,10 +2468,10 @@ store_scanline_a2b10g10r10 (bits_image_t * image,
for (i = 0; i < width; ++i)
{
WRITE (image, pixel++,
- ((values[i] >> 32) & 0xc0000000) | // A
- ((values[i] >> 38) & 0x3ff) | // R
- ((values[i] >> 12) & 0xffc00) | // G
- ((values[i] << 14) & 0x3ff00000)); // B
+ ((values[i] >> 32) & 0xc0000000) |
+ ((values[i] >> 38) & 0x3ff) |
+ ((values[i] >> 12) & 0xffc00) |
+ ((values[i] << 14) & 0x3ff00000));
}
}
@@ -2490,9 +2490,9 @@ store_scanline_x2b10g10r10 (bits_image_t * image,
for (i = 0; i < width; ++i)
{
WRITE (image, pixel++,
- ((values[i] >> 38) & 0x3ff) | // R
- ((values[i] >> 12) & 0xffc00) | // G
- ((values[i] << 14) & 0x3ff00000)); // B
+ ((values[i] >> 38) & 0x3ff) |
+ ((values[i] >> 12) & 0xffc00) |
+ ((values[i] << 14) & 0x3ff00000));
}
}
diff --git a/pixman/pixman-arm-simd.c b/pixman/pixman-arm-simd.c
index b7912b6..fb7bf3d 100644
--- a/pixman/pixman-arm-simd.c
+++ b/pixman/pixman-arm-simd.c
@@ -135,7 +135,7 @@ arm_composite_over_8888_8888 (pixman_implementation_t * impl,
src_line += src_stride;
w = width;
-//#define inner_branch
+/* #define inner_branch */
asm volatile (
"cmp %[w], #0\n\t"
"beq 2f\n\t"
diff --git a/pixman/pixman-cpu.c b/pixman/pixman-cpu.c
index 73e94c1..a2a7b8a 100644
--- a/pixman/pixman-cpu.c
+++ b/pixman/pixman-cpu.c
@@ -255,11 +255,12 @@ pixman_arm_read_auxv ()
uint32_t hwcap = aux.a_un.a_val;
if (getenv ("ARM_FORCE_HWCAP"))
hwcap = strtoul (getenv ("ARM_FORCE_HWCAP"), NULL, 0);
- // hardcode these values to avoid depending on specific versions
- // of the hwcap header, e.g. HWCAP_NEON
+ /* hardcode these values to avoid depending on specific
+ * versions of the hwcap header, e.g. HWCAP_NEON
+ */
arm_has_vfp = (hwcap & 64) != 0;
arm_has_iwmmxt = (hwcap & 512) != 0;
- // this flag is only present on kernel 2.6.29
+ /* this flag is only present on kernel 2.6.29 */
arm_has_neon = (hwcap & 4096) != 0;
}
else if (aux.a_type == AT_PLATFORM)
@@ -280,8 +281,9 @@ pixman_arm_read_auxv ()
}
close (fd);
- // if we don't have 2.6.29, we have to do this hack; set
- // the env var to trust HWCAP.
+ /* if we don't have 2.6.29, we have to do this hack; set
+ * the env var to trust HWCAP.
+ */
if (!getenv ("ARM_TRUST_HWCAP") && arm_has_v7)
arm_has_neon = TRUE;
}
diff --git a/pixman/pixman-sse2.c b/pixman/pixman-sse2.c
index 6ee333f..7e938df 100644
--- a/pixman/pixman-sse2.c
+++ b/pixman/pixman-sse2.c
@@ -361,7 +361,7 @@ cache_prefetch (__m128i* addr)
static force_inline void
cache_prefetch_next (__m128i* addr)
{
- _mm_prefetch (addr + 4, _MM_HINT_T0); // 64 bytes ahead
+ _mm_prefetch (addr + 4, _MM_HINT_T0); /* 64 bytes ahead */
}
/* load 4 pixels from a 16-byte boundary aligned address */
commit 54cad29dc55fc0a670bf87abacd5f45e1289db54
Author: Søren Sandmann Pedersen <sandmann at redhat.com>
Date: Sat Jul 18 17:59:43 2009 -0400
Align the stack in _pixman_implementation_create_sse2()
When compiled without optimization, GCC will place various temporaries
on the stack. Since Firefox sometimes causes the stack to be aligned
to four bytes, this causes movdqa to generate faults.
diff --git a/pixman/pixman-sse2.c b/pixman/pixman-sse2.c
index cb3daf2..6ee333f 100644
--- a/pixman/pixman-sse2.c
+++ b/pixman/pixman-sse2.c
@@ -629,8 +629,7 @@ core_combine_over_u_sse2 (uint32_t* pd,
cache_prefetch ((__m128i*)pm);
/* Align dst on a 16-byte boundary */
- while (w &&
- ((unsigned long)pd & 15))
+ while (w && ((unsigned long)pd & 15))
{
d = *pd;
s = combine1 (ps, pm);
@@ -5625,6 +5624,9 @@ sse2_fill (pixman_implementation_t *imp,
return TRUE;
}
+#if defined(__GNUC__) && !defined(__x86_64__) && !defined(__amd64__)
+__attribute__((__force_align_arg_pointer__))
+#endif
pixman_implementation_t *
_pixman_implementation_create_sse2 (void)
{
More information about the xorg-commit
mailing list