diff options
Diffstat (limited to 'runtime/instruction_set.cc')
-rw-r--r-- | runtime/instruction_set.cc | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/runtime/instruction_set.cc b/runtime/instruction_set.cc index cbcd2e063b..c1931a9414 100644 --- a/runtime/instruction_set.cc +++ b/runtime/instruction_set.cc @@ -86,6 +86,52 @@ size_t GetInstructionSetPointerSize(InstructionSet isa) { } } +size_t GetBytesPerGprSpillLocation(InstructionSet isa) { + switch (isa) { + case kArm: + // Fall-through. + case kThumb2: + return 4; + case kArm64: + return 8; + case kX86: + return 4; + case kX86_64: + return 8; + case kMips: + return 4; + case kNone: + LOG(FATAL) << "ISA kNone does not have spills."; + return 0; + default: + LOG(FATAL) << "Unknown ISA " << isa; + return 0; + } +} + +size_t GetBytesPerFprSpillLocation(InstructionSet isa) { + switch (isa) { + case kArm: + // Fall-through. + case kThumb2: + return 4; + case kArm64: + return 8; + case kX86: + return 8; + case kX86_64: + return 8; + case kMips: + return 4; + case kNone: + LOG(FATAL) << "ISA kNone does not have spills."; + return 0; + default: + LOG(FATAL) << "Unknown ISA " << isa; + return 0; + } +} + size_t GetInstructionSetAlignment(InstructionSet isa) { switch (isa) { case kArm: |