Fix x86 and x64 codegens for 8/16 stores.
Test: 660-store-8-16
Change-Id: I6124818894205ebeed83929f3ff00bf2733292bf
diff --git a/compiler/optimizing/code_generator.h b/compiler/optimizing/code_generator.h
index 73202b4..51a0bae 100644
--- a/compiler/optimizing/code_generator.h
+++ b/compiler/optimizing/code_generator.h
@@ -446,6 +446,16 @@
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();