From e31380534ba8bfd802e642f6ec9e0b256e005033 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Sun, 10 Jun 2007 20:29:44 +0000 Subject: [PATCH] * GCC4 compile fix by Fredrik Ekdahl git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21387 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../translators/wonderbrush/support/support.h | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src/add-ons/translators/wonderbrush/support/support.h b/src/add-ons/translators/wonderbrush/support/support.h index b5ef10d2d0..0a27bfb398 100644 --- a/src/add-ons/translators/wonderbrush/support/support.h +++ b/src/add-ons/translators/wonderbrush/support/support.h @@ -24,21 +24,22 @@ constrain(float& value, float min, float max) // constrain_int32_0_255_asm inline int32 constrain_int32_0_255_asm(int32 value) { - asm("movl $0, %%ecx; - movl $255, %%edx; - cmpl %%ecx, %%eax; - cmovl %%ecx, %%eax; - cmpl %%edx, %%eax; - cmovg %%edx, %%eax" - : "=a" (value) - : "a" (value) - : "%ecx", "%edx" ); - return value; + asm("movl $0, %%ecx\n\t" + "movl $255, %%edx\n\t" + "cmpl %%ecx, %%eax\n\t" + "cmovl %%ecx, %%eax\n\t" + "cmpl %%edx, %%eax\n\t" + "cmovg %%edx, %%eax" + : "=a" (value) + : "a" (value) + : "%ecx", "%edx" ); + return value; } inline int32 -constrain_int32_0_255_c(int32 value) { - return max_c(0, min_c(255, value)); +constrain_int32_0_255_c(int32 value) +{ + return max_c(0, min_c(255, value)); } #define constrain_int32_0_255 constrain_int32_0_255_asm