Commit 698633a8 by Nicolas Capens

Disallow assigning to an RValue.

Change-Id: I539fcaa5b7853ac618f3d27027d3357bc6e620ba Reviewed-on: https://swiftshader-review.googlesource.com/1960Tested-by: 's avatarNicolas Capens <capn@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <capn@google.com>
parent 8757dead
......@@ -3086,9 +3086,9 @@ namespace sw
RValue<Short4> RoundShort4(RValue<Float4> cast)
{
RValue<Int4> v4i32 = x86::cvtps2dq(cast);
v4i32 = As<Int4>(x86::packssdw(v4i32, v4i32));
RValue<Short8> v8i16 = x86::packssdw(v4i32, v4i32);
return As<Short4>(Int2(v4i32));
return As<Short4>(Int2(As<Int4>(v8i16)));
}
RValue<Short4> Max(RValue<Short4> x, RValue<Short4> y)
......
......@@ -363,6 +363,8 @@ namespace sw
RValue(typename FloatLiteral<T>::type f);
RValue(const Reference<T> &rhs);
RValue<T> &operator=(const RValue<T>&) = delete;
llvm::Value *value; // FIXME: Make private
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment