diff options
| author | 2017-07-25 08:31:12 +0000 | |
|---|---|---|
| committer | 2017-07-25 08:31:12 +0000 | |
| commit | 03ce1df8f9b1b8d207fc685fd084b96697a50182 (patch) | |
| tree | 226b0b4a98af714d848796b8c083f134f6a80fd4 /compiler/optimizing/code_generator.h | |
| parent | ff80dfc82a3e5177d45099c090e33f1a060f9152 (diff) | |
| parent | 786120815be223290f1cb24e88c1be9d044c8dca (diff) | |
Merge "Fix x86 and x64 codegens for 8/16 stores."
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(); |