* GCC4 compile fix by Fredrik Ekdahl
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21387 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
a9c2d6b320
commit
e31380534b
@ -24,12 +24,12 @@ 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"
|
||||
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" );
|
||||
@ -37,7 +37,8 @@ constrain_int32_0_255_asm(int32 value) {
|
||||
}
|
||||
|
||||
inline int32
|
||||
constrain_int32_0_255_c(int32 value) {
|
||||
constrain_int32_0_255_c(int32 value)
|
||||
{
|
||||
return max_c(0, min_c(255, value));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user