Change some tests to be valid PNaCl IR (parameter type from i1 -> i32).
Change the i1 zeroext parameter to an explicit zext and
i32. Add an assert in lowerCall that the type is at least
32-bits.
I ended up putting the assert in lowerCall instead of
InstX8632Push, since technically there are quite a few
modes that push allows: 16-bit reg/mem (just not 8-bit
reg/mem) and 8/16/32 bit constants.
BUG=none
R=stichnot@chromium.org
Review URL: https://codereview.chromium.org/339933004
diff --git a/src/IceTargetLoweringX8632.cpp b/src/IceTargetLoweringX8632.cpp
index 1e51047..dbfe60f 100644
--- a/src/IceTargetLoweringX8632.cpp
+++ b/src/IceTargetLoweringX8632.cpp
@@ -1281,6 +1281,8 @@
_mov(T, Arg);
_push(T);
} else {
+ // Otherwise PNaCl requires parameter types to be at least 32-bits.
+ assert(Arg->getType() == IceType_f32 || Arg->getType() == IceType_i32);
_push(Arg);
}
StackOffset += typeWidthInBytesOnStack(Arg->getType());