diff options
author | Andreas Gampe <agampe@google.com> | 2014-04-11 12:07:48 -0700 |
---|---|---|
committer | Andreas Gampe <agampe@google.com> | 2014-04-14 11:39:45 -0700 |
commit | af13ad9fd18b6f75fe82e7995224c55654594f93 (patch) | |
tree | 11c1fcb73bd31f90216cb1b588f56ff6abf74b85 /compiler/compiled_method.cc | |
parent | 9b417e4f0f87da6bfe8dc5f02c987acfcb6dca31 (diff) | |
download | android_art-af13ad9fd18b6f75fe82e7995224c55654594f93.tar.gz android_art-af13ad9fd18b6f75fe82e7995224c55654594f93.tar.bz2 android_art-af13ad9fd18b6f75fe82e7995224c55654594f93.zip |
Centralize instruction-set pointer-size, alignment, 64b-width code
in instruction_set.h/cc
This allows to clean up some places that currently make explicit
comparisons.
Change-Id: I0dcc924c52fa53306f706aceea93a2d4a655c5df
Diffstat (limited to 'compiler/compiled_method.cc')
-rw-r--r-- | compiler/compiled_method.cc | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/compiler/compiled_method.cc b/compiler/compiled_method.cc index 8e013c1ece..59ed8277d0 100644 --- a/compiler/compiled_method.cc +++ b/compiler/compiled_method.cc @@ -82,21 +82,7 @@ uint32_t CompiledCode::AlignCode(uint32_t offset) const { } uint32_t CompiledCode::AlignCode(uint32_t offset, InstructionSet instruction_set) { - switch (instruction_set) { - case kArm: - case kThumb2: - return RoundUp(offset, kArmAlignment); - case kArm64: - return RoundUp(offset, kArm64Alignment); - case kMips: - return RoundUp(offset, kMipsAlignment); - case kX86: // Fall-through. - case kX86_64: - return RoundUp(offset, kX86Alignment); - default: - LOG(FATAL) << "Unknown InstructionSet: " << instruction_set; - return 0; - } + return RoundUp(offset, GetInstructionSetAlignment(instruction_set)); } size_t CompiledCode::CodeDelta() const { |