From 00508f213b35422d176956f12910be5662f53272 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Sun, 5 Apr 2009 00:19:10 -0700 Subject: [PATCH] Fix some opcodes --- orc/orcopcodes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/orc/orcopcodes.c b/orc/orcopcodes.c index e02f6f0..763c5ae 100644 --- a/orc/orcopcodes.c +++ b/orc/orcopcodes.c @@ -381,11 +381,11 @@ BINARY_SW(xorw, a ^ b) UNARY_SL(absl, (a<0)?-a:a) BINARY_SL(addl, a + b) BINARY_SL(addssl, ORC_CLAMP_SL((int64_t)a + (int64_t)b)) -BINARY_UL(addusl, ORC_CLAMP_UL((uint64_t)a + (uint64_t)b)) +BINARY_UL(addusl, ORC_CLAMP_UL((uint64_t)(uint32_t)a + (uint64_t)(uint32_t)b)) BINARY_SL(andl, a & b) BINARY_SL(andnl, (~a) & b) BINARY_SL(avgsl, ((int64_t)a + (int64_t)b + 1)>>1) -BINARY_UL(avgul, ((uint64_t)a + (uint64_t)b + 1)>>1) +BINARY_UL(avgul, ((uint64_t)(uint32_t)a + (uint64_t)(uint32_t)b + 1)>>1) BINARY_SL(cmpeql, (a == b) ? (~0) : 0) BINARY_SL(cmpgtsl, (a > b) ? (~0) : 0) UNARY_SL(copyl, a) -- 2.7.4