From 58c0ea9ac7080a847fe2dd97ff35c9548d3daa65 Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Mon, 27 Jan 2014 09:25:48 -0800 Subject: [PATCH] Fixing bad vector compare. --- src/alloy/backend/ivm/ivm_intcode.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/alloy/backend/ivm/ivm_intcode.cc b/src/alloy/backend/ivm/ivm_intcode.cc index 7100deaa8..cef1e7930 100644 --- a/src/alloy/backend/ivm/ivm_intcode.cc +++ b/src/alloy/backend/ivm/ivm_intcode.cc @@ -2098,7 +2098,7 @@ int Translate_DID_SATURATE(TranslationContext& ctx, Instr* i) { const vec128_t& src2 = ics.rf[i->src2_reg].v128; \ vec128_t& dest = ics.rf[i->dest_reg].v128; \ for (int n = 0; n < count; n++) { \ - dest.value[n] = (type)src1.value[n] op (type)src2.value[n]; \ + dest.value[n] = ((type)src1.value[n] op (type)src2.value[n]) ? (type)0xFFFFFFFF : 0; \ } \ return IA_NEXT;