diff options
author | Vladimir Marko <vmarko@google.com> | 2014-05-02 11:53:22 +0100 |
---|---|---|
committer | Vladimir Marko <vmarko@google.com> | 2014-05-02 12:21:02 +0100 |
commit | 8194963098247be6bca9cc4a54dbfa65c73e8ccc (patch) | |
tree | 547cc708e06e6541676b17066023ae6f07b2049b /runtime/stack.h | |
parent | 56a341a82ece9aa4f2a071629f3e1fd1adf988ae (diff) | |
download | art-8194963098247be6bca9cc4a54dbfa65c73e8ccc.zip art-8194963098247be6bca9cc4a54dbfa65c73e8ccc.tar.gz art-8194963098247be6bca9cc4a54dbfa65c73e8ccc.tar.bz2 |
Replace CountOneBits and __builtin_popcount with POPCOUNT.
Clean up utils.h, make some functions constexpr.
Change-Id: I2399100280cbce81c3c4f5765f0680c1ddcb5883
Diffstat (limited to 'runtime/stack.h')
-rw-r--r-- | runtime/stack.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/runtime/stack.h b/runtime/stack.h index afc4f25..73a823a 100644 --- a/runtime/stack.h +++ b/runtime/stack.h @@ -25,6 +25,7 @@ #include "instruction_set.h" #include "mirror/object.h" #include "mirror/object_reference.h" +#include "utils.h" #include "verify_object.h" #include <stdint.h> @@ -638,8 +639,8 @@ class StackVisitor { size_t frame_size, int reg, InstructionSet isa) { DCHECK_EQ(frame_size & (kStackAlignment - 1), 0U); DCHECK_NE(reg, static_cast<int>(kVRegInvalid)); - int spill_size = __builtin_popcount(core_spills) * GetBytesPerGprSpillLocation(isa) - + __builtin_popcount(fp_spills) * GetBytesPerFprSpillLocation(isa) + int spill_size = POPCOUNT(core_spills) * GetBytesPerGprSpillLocation(isa) + + POPCOUNT(fp_spills) * GetBytesPerFprSpillLocation(isa) + sizeof(uint32_t); // Filler. int num_ins = code_item->ins_size_; int num_regs = code_item->registers_size_ - num_ins; |