diff options
| author | Vladimir Marko <vmarko@google.com> | 2017-09-21 22:50:39 +0100 |
|---|---|---|
| committer | Vladimir Marko <vmarko@google.com> | 2017-09-25 15:45:01 +0100 |
| commit | 0ebe0d83138bba1996e9c8007969b5381d972b32 (patch) | |
| tree | a5ee66ebc5b587ade97e56ac8fc7d832fbbed4af /compiler/optimizing/code_generator_x86.h | |
| parent | e1e347dace0ded83774999bb26c37527dcdb1d5a (diff) | |
| download | art-0ebe0d83138bba1996e9c8007969b5381d972b32.tar.gz art-0ebe0d83138bba1996e9c8007969b5381d972b32.tar.bz2 art-0ebe0d83138bba1996e9c8007969b5381d972b32.zip | |
ART: Introduce compiler data type.
Replace most uses of the runtime's Primitive in compiler
with a new class DataType. This prepares for introducing
new types, such as Uint8, that the runtime does not need
to know about.
Test: m test-art-host-gtest
Test: testrunner.py --host
Bug: 23964345
Change-Id: Iec2ad82454eec678fffcd8279a9746b90feb9b0c
Diffstat (limited to 'compiler/optimizing/code_generator_x86.h')
| -rw-r--r-- | compiler/optimizing/code_generator_x86.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/compiler/optimizing/code_generator_x86.h b/compiler/optimizing/code_generator_x86.h index e8f919d122..fb61e75d73 100644 --- a/compiler/optimizing/code_generator_x86.h +++ b/compiler/optimizing/code_generator_x86.h @@ -83,8 +83,8 @@ class InvokeDexCallingConventionVisitorX86 : public InvokeDexCallingConventionVi InvokeDexCallingConventionVisitorX86() {} virtual ~InvokeDexCallingConventionVisitorX86() {} - Location GetNextLocation(Primitive::Type type) OVERRIDE; - Location GetReturnLocation(Primitive::Type type) const OVERRIDE; + Location GetNextLocation(DataType::Type type) OVERRIDE; + Location GetReturnLocation(DataType::Type type) const OVERRIDE; Location GetMethodLocation() const OVERRIDE; private: @@ -103,13 +103,13 @@ class FieldAccessCallingConventionX86 : public FieldAccessCallingConvention { Location GetFieldIndexLocation() const OVERRIDE { return Location::RegisterLocation(EAX); } - Location GetReturnLocation(Primitive::Type type) const OVERRIDE { - return Primitive::Is64BitType(type) + Location GetReturnLocation(DataType::Type type) const OVERRIDE { + return DataType::Is64BitType(type) ? Location::RegisterPairLocation(EAX, EDX) : Location::RegisterLocation(EAX); } - Location GetSetValueLocation(Primitive::Type type, bool is_instance) const OVERRIDE { - return Primitive::Is64BitType(type) + Location GetSetValueLocation(DataType::Type type, bool is_instance) const OVERRIDE { + return DataType::Is64BitType(type) ? (is_instance ? Location::RegisterPairLocation(EDX, EBX) : Location::RegisterPairLocation(ECX, EDX)) @@ -117,7 +117,7 @@ class FieldAccessCallingConventionX86 : public FieldAccessCallingConvention { ? Location::RegisterLocation(EDX) : Location::RegisterLocation(ECX)); } - Location GetFpuLocation(Primitive::Type type ATTRIBUTE_UNUSED) const OVERRIDE { + Location GetFpuLocation(DataType::Type type ATTRIBUTE_UNUSED) const OVERRIDE { return Location::FpuRegisterLocation(XMM0); } @@ -321,7 +321,7 @@ class CodeGeneratorX86 : public CodeGenerator { void GenerateFrameExit() OVERRIDE; void Bind(HBasicBlock* block) OVERRIDE; void MoveConstant(Location destination, int32_t value) OVERRIDE; - void MoveLocation(Location dst, Location src, Primitive::Type dst_type) OVERRIDE; + void MoveLocation(Location dst, Location src, DataType::Type dst_type) OVERRIDE; void AddLocationAsTemp(Location location, LocationSummary* locations) OVERRIDE; size_t SaveCoreRegister(size_t stack_index, uint32_t reg_id) OVERRIDE; @@ -428,7 +428,7 @@ class CodeGeneratorX86 : public CodeGenerator { dex::TypeIndex dex_index, Handle<mirror::Class> handle); - void MoveFromReturnRegister(Location trg, Primitive::Type type) OVERRIDE; + void MoveFromReturnRegister(Location trg, DataType::Type type) OVERRIDE; // Emit linker patches. void EmitLinkerPatches(ArenaVector<linker::LinkerPatch>* linker_patches) OVERRIDE; @@ -456,8 +456,8 @@ class CodeGeneratorX86 : public CodeGenerator { block_labels_ = CommonInitializeLabels<Label>(); } - bool NeedsTwoRegisters(Primitive::Type type) const OVERRIDE { - return type == Primitive::kPrimLong; + bool NeedsTwoRegisters(DataType::Type type) const OVERRIDE { + return type == DataType::Type::kInt64; } bool ShouldSplitLongMoves() const OVERRIDE { return true; } |
