Revert "Add support for long-to-int in the optimizing compiler."
This reverts commit 647b96f29cb81832e698f863884fdba06674c9de.
Change-Id: I552f23585463c676acbd547521b4d3ee5c0342eb
diff --git a/compiler/optimizing/code_generator_x86.cc b/compiler/optimizing/code_generator_x86.cc
index 4706274..d66180b 100644
--- a/compiler/optimizing/code_generator_x86.cc
+++ b/compiler/optimizing/code_generator_x86.cc
@@ -22,7 +22,6 @@
#include "mirror/art_method.h"
#include "mirror/class.h"
#include "thread.h"
-#include "utils.h"
#include "utils/assembler.h"
#include "utils/stack_checks.h"
#include "utils/x86/assembler_x86.h"
@@ -1262,26 +1261,6 @@
Primitive::Type result_type = conversion->GetResultType();
Primitive::Type input_type = conversion->GetInputType();
switch (result_type) {
- case Primitive::kPrimInt:
- switch (input_type) {
- case Primitive::kPrimLong:
- // long-to-int conversion.
- locations->SetInAt(0, Location::Any());
- locations->SetOut(Location::RequiresRegister(), Location::kNoOutputOverlap);
- break;
-
- case Primitive::kPrimFloat:
- case Primitive::kPrimDouble:
- LOG(FATAL) << "Type conversion from " << input_type
- << " to " << result_type << " not yet implemented";
- break;
-
- default:
- LOG(FATAL) << "Unexpected type conversion from " << input_type
- << " to " << result_type;
- }
- break;
-
case Primitive::kPrimLong:
switch (input_type) {
case Primitive::kPrimByte:
@@ -1305,6 +1284,7 @@
}
break;
+ case Primitive::kPrimInt:
case Primitive::kPrimFloat:
case Primitive::kPrimDouble:
LOG(FATAL) << "Type conversion from " << input_type
@@ -1324,34 +1304,6 @@
Primitive::Type result_type = conversion->GetResultType();
Primitive::Type input_type = conversion->GetInputType();
switch (result_type) {
- case Primitive::kPrimInt:
- switch (input_type) {
- case Primitive::kPrimLong:
- // long-to-int conversion.
- if (in.IsRegisterPair()) {
- __ movl(out.As<Register>(), in.AsRegisterPairLow<Register>());
- } else if (in.IsDoubleStackSlot()) {
- __ movl(out.As<Register>(), Address(ESP, in.GetStackIndex()));
- } else {
- DCHECK(in.IsConstant());
- DCHECK(in.GetConstant()->IsLongConstant());
- __ movl(out.As<Register>(),
- Immediate(Low32Bits(in.GetConstant()->AsLongConstant()->GetValue())));
- }
- break;
-
- case Primitive::kPrimFloat:
- case Primitive::kPrimDouble:
- LOG(FATAL) << "Type conversion from " << input_type
- << " to " << result_type << " not yet implemented";
- break;
-
- default:
- LOG(FATAL) << "Unexpected type conversion from " << input_type
- << " to " << result_type;
- }
- break;
-
case Primitive::kPrimLong:
switch (input_type) {
case Primitive::kPrimByte:
@@ -1377,6 +1329,7 @@
}
break;
+ case Primitive::kPrimInt:
case Primitive::kPrimFloat:
case Primitive::kPrimDouble:
LOG(FATAL) << "Type conversion from " << input_type