| Index: src/compiler/x64/instruction-selector-x64-unittest.cc
|
| diff --git a/src/compiler/x64/instruction-selector-x64-unittest.cc b/src/compiler/x64/instruction-selector-x64-unittest.cc
|
| index 22f0bce6a089033f0a1c3ec8c6cdddb1887aec15..7204abdd5f0281d8aab9acaee376d5338d74fe75 100644
|
| --- a/src/compiler/x64/instruction-selector-x64-unittest.cc
|
| +++ b/src/compiler/x64/instruction-selector-x64-unittest.cc
|
| @@ -12,6 +12,17 @@ namespace compiler {
|
| // Conversions.
|
|
|
|
|
| +TEST_F(InstructionSelectorTest, ChangeFloat32ToFloat64WithParameter) {
|
| + StreamBuilder m(this, kMachFloat32, kMachFloat64);
|
| + m.Return(m.ChangeFloat32ToFloat64(m.Parameter(0)));
|
| + Stream s = m.Build();
|
| + ASSERT_EQ(1U, s.size());
|
| + EXPECT_EQ(kSSECvtss2sd, s[0]->arch_opcode());
|
| + EXPECT_EQ(1U, s[0]->InputCount());
|
| + EXPECT_EQ(1U, s[0]->OutputCount());
|
| +}
|
| +
|
| +
|
| TEST_F(InstructionSelectorTest, ChangeInt32ToInt64WithParameter) {
|
| StreamBuilder m(this, kMachInt64, kMachInt32);
|
| m.Return(m.ChangeInt32ToInt64(m.Parameter(0)));
|
| @@ -30,6 +41,17 @@ TEST_F(InstructionSelectorTest, ChangeUint32ToUint64WithParameter) {
|
| }
|
|
|
|
|
| +TEST_F(InstructionSelectorTest, TruncateFloat64ToFloat32WithParameter) {
|
| + StreamBuilder m(this, kMachFloat64, kMachFloat32);
|
| + m.Return(m.TruncateFloat64ToFloat32(m.Parameter(0)));
|
| + Stream s = m.Build();
|
| + ASSERT_EQ(1U, s.size());
|
| + EXPECT_EQ(kSSECvtsd2ss, s[0]->arch_opcode());
|
| + EXPECT_EQ(1U, s[0]->InputCount());
|
| + EXPECT_EQ(1U, s[0]->OutputCount());
|
| +}
|
| +
|
| +
|
| TEST_F(InstructionSelectorTest, TruncateInt64ToInt32WithParameter) {
|
| StreamBuilder m(this, kMachInt32, kMachInt64);
|
| m.Return(m.TruncateInt64ToInt32(m.Parameter(0)));
|
|
|