Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Unified Diff: runtime/vm/assembler_ia32.cc

Issue 48743002: Do not directly load smi constants larger than a 16 bit payload on ia32. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/vm/assembler_ia32.cc
diff --git a/runtime/vm/assembler_ia32.cc b/runtime/vm/assembler_ia32.cc
index 6a7af21729e638e7aedf9f3532f7644fba8078b6..8f6164fcfef9614c1d1274517dbbf0993e02246e 100644
--- a/runtime/vm/assembler_ia32.cc
+++ b/runtime/vm/assembler_ia32.cc
@@ -1945,6 +1945,17 @@ void Assembler::LoadObject(Register dst, const Object& object) {
}
+void Assembler::LoadObjectSafely(Register dst, const Object& object) {
+ if (Assembler::IsSafe(object)) {
+ LoadObject(dst, object);
+ } else {
+ movl(dst,
+ Immediate(reinterpret_cast<int32_t>(object.raw()) ^ jit_cookie_));
+ xorl(dst, Immediate(jit_cookie_));
+ }
+}
+
+
void Assembler::PushObject(const Object& object) {
if (object.IsSmi() || object.InVMHeap()) {
pushl(Immediate(reinterpret_cast<int32_t>(object.raw())));

Powered by Google App Engine
This is Rietveld 408576698