OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 void MacroAssembler::SafePush(const Immediate& x) { | 256 void MacroAssembler::SafePush(const Immediate& x) { |
257 if (IsUnsafeImmediate(x) && jit_cookie() != 0) { | 257 if (IsUnsafeImmediate(x) && jit_cookie() != 0) { |
258 push(Immediate(x.x_ ^ jit_cookie())); | 258 push(Immediate(x.x_ ^ jit_cookie())); |
259 xor_(Operand(esp, 0), Immediate(jit_cookie())); | 259 xor_(Operand(esp, 0), Immediate(jit_cookie())); |
260 } else { | 260 } else { |
261 push(x); | 261 push(x); |
262 } | 262 } |
263 } | 263 } |
264 | 264 |
265 | 265 |
| 266 void MacroAssembler::CompareRoot(Register with, Heap::RootListIndex index) { |
| 267 // see ROOT_ACCESSOR macro in factory.h |
| 268 Handle<Object> value(&isolate()->heap()->roots_address()[index]); |
| 269 cmp(with, value); |
| 270 } |
| 271 |
| 272 |
266 void MacroAssembler::CmpObjectType(Register heap_object, | 273 void MacroAssembler::CmpObjectType(Register heap_object, |
267 InstanceType type, | 274 InstanceType type, |
268 Register map) { | 275 Register map) { |
269 mov(map, FieldOperand(heap_object, HeapObject::kMapOffset)); | 276 mov(map, FieldOperand(heap_object, HeapObject::kMapOffset)); |
270 CmpInstanceType(map, type); | 277 CmpInstanceType(map, type); |
271 } | 278 } |
272 | 279 |
273 | 280 |
274 void MacroAssembler::CmpInstanceType(Register map, InstanceType type) { | 281 void MacroAssembler::CmpInstanceType(Register map, InstanceType type) { |
275 cmpb(FieldOperand(map, Map::kInstanceTypeOffset), | 282 cmpb(FieldOperand(map, Map::kInstanceTypeOffset), |
(...skipping 1954 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2230 | 2237 |
2231 // Check that the code was patched as expected. | 2238 // Check that the code was patched as expected. |
2232 ASSERT(masm_.pc_ == address_ + size_); | 2239 ASSERT(masm_.pc_ == address_ + size_); |
2233 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); | 2240 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); |
2234 } | 2241 } |
2235 | 2242 |
2236 | 2243 |
2237 } } // namespace v8::internal | 2244 } } // namespace v8::internal |
2238 | 2245 |
2239 #endif // V8_TARGET_ARCH_IA32 | 2246 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |