diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2017-07-24 14:18:53 +0100 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2017-07-24 15:01:56 +0100 |
commit | 786120815be223290f1cb24e88c1be9d044c8dca (patch) | |
tree | 556be2e1337a82ed7c7b4b419520bef6569e2fd7 /compiler/optimizing/code_generator.h | |
parent | ad76ef641d8570affb2e3c728b40876c4ed53fac (diff) |
Fix x86 and x64 codegens for 8/16 stores.
Test: 660-store-8-16
Change-Id: I6124818894205ebeed83929f3ff00bf2733292bf
Diffstat (limited to 'compiler/optimizing/code_generator.h')
-rw-r--r-- | compiler/optimizing/code_generator.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/compiler/optimizing/code_generator.h b/compiler/optimizing/code_generator.h index 73202b4fd1..51a0bae799 100644 --- a/compiler/optimizing/code_generator.h +++ b/compiler/optimizing/code_generator.h @@ -446,6 +446,16 @@ class CodeGenerator : public DeletableArenaObject<kArenaAllocCodeGenerator> { return GetFrameSize() == (CallPushesPC() ? GetWordSize() : 0); } + static int8_t GetInt8ValueOf(HConstant* constant) { + DCHECK(constant->IsIntConstant()); + return constant->AsIntConstant()->GetValue(); + } + + static int16_t GetInt16ValueOf(HConstant* constant) { + DCHECK(constant->IsIntConstant()); + return constant->AsIntConstant()->GetValue(); + } + static int32_t GetInt32ValueOf(HConstant* constant) { if (constant->IsIntConstant()) { return constant->AsIntConstant()->GetValue(); |