Commit d0e30307 by Nicolas Capens Committed by Nicolas Capens

Assert that PNaCl bitcode only uses 128-bit vector casts.

Change-Id: I5aee2c998842f95ccc44d5c0fed90aa289bdf67b Reviewed-on: https://chromium-review.googlesource.com/401639Tested-by: 's avatarNicolas Capens <nicolascapens@google.com> Reviewed-by: 's avatarJim Stichnoth <stichnot@chromium.org>
parent e3cabdaf
...@@ -3216,6 +3216,8 @@ void TargetX86Base<TraitsType>::lowerCast(const InstCast *Instr) { ...@@ -3216,6 +3216,8 @@ void TargetX86Base<TraitsType>::lowerCast(const InstCast *Instr) {
// Bitcast requires equal type sizes, which isn't strictly the case // Bitcast requires equal type sizes, which isn't strictly the case
// between scalars and vectors, but to emulate v4i8 vectors one has to // between scalars and vectors, but to emulate v4i8 vectors one has to
// use v16i8 vectors. // use v16i8 vectors.
assert(getFlags().getApplicationBinaryInterface() != ABI_PNaCl &&
"PNaCl only supports real 128-bit vectors");
_movd(Dest, legalize(Src0, Legal_Reg | Legal_Mem)); _movd(Dest, legalize(Src0, Legal_Reg | Legal_Mem));
} else { } else {
_movp(Dest, legalizeToReg(Src0)); _movp(Dest, legalizeToReg(Src0));
......
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