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

Side by Side Diff: src/ia32/macro-assembler-ia32.cc

Issue 652227: Allow snapshots built without -DANDROID to work on Android.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/fast-codegen.h ('k') | src/serialize.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 Label done; 157 Label done;
158 158
159 // Skip barrier if writing a smi. 159 // Skip barrier if writing a smi.
160 ASSERT_EQ(0, kSmiTag); 160 ASSERT_EQ(0, kSmiTag);
161 test(value, Immediate(kSmiTagMask)); 161 test(value, Immediate(kSmiTagMask));
162 j(zero, &done); 162 j(zero, &done);
163 163
164 if (Serializer::enabled()) { 164 if (Serializer::enabled()) {
165 // Can't do arithmetic on external references if it might get serialized. 165 // Can't do arithmetic on external references if it might get serialized.
166 mov(value, Operand(object)); 166 mov(value, Operand(object));
167 and_(value, Heap::NewSpaceMask()); 167 // The mask isn't really an address. We load it as an external reference in
168 // case the size of the new space is different between the snapshot maker
169 // and the running system.
170 and_(Operand(value), Immediate(ExternalReference::new_space_mask()));
168 cmp(Operand(value), Immediate(ExternalReference::new_space_start())); 171 cmp(Operand(value), Immediate(ExternalReference::new_space_start()));
169 j(equal, &done); 172 j(equal, &done);
170 } else { 173 } else {
171 int32_t new_space_start = reinterpret_cast<int32_t>( 174 int32_t new_space_start = reinterpret_cast<int32_t>(
172 ExternalReference::new_space_start().address()); 175 ExternalReference::new_space_start().address());
173 lea(value, Operand(object, -new_space_start)); 176 lea(value, Operand(object, -new_space_start));
174 and_(value, Heap::NewSpaceMask()); 177 and_(value, Heap::NewSpaceMask());
175 j(equal, &done); 178 j(equal, &done);
176 } 179 }
177 180
(...skipping 1450 matching lines...) Expand 10 before | Expand all | Expand 10 after
1628 // Indicate that code has changed. 1631 // Indicate that code has changed.
1629 CPU::FlushICache(address_, size_); 1632 CPU::FlushICache(address_, size_);
1630 1633
1631 // Check that the code was patched as expected. 1634 // Check that the code was patched as expected.
1632 ASSERT(masm_.pc_ == address_ + size_); 1635 ASSERT(masm_.pc_ == address_ + size_);
1633 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); 1636 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap);
1634 } 1637 }
1635 1638
1636 1639
1637 } } // namespace v8::internal 1640 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/fast-codegen.h ('k') | src/serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698