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

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

Issue 6670119: VM initialization refactoring. (Closed)
Patch Set: Created 9 years, 8 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
OLDNEW
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 24 matching lines...) Expand all
35 #include "runtime.h" 35 #include "runtime.h"
36 #include "serialize.h" 36 #include "serialize.h"
37 37
38 namespace v8 { 38 namespace v8 {
39 namespace internal { 39 namespace internal {
40 40
41 // ------------------------------------------------------------------------- 41 // -------------------------------------------------------------------------
42 // MacroAssembler implementation. 42 // MacroAssembler implementation.
43 43
44 MacroAssembler::MacroAssembler(void* buffer, int size) 44 MacroAssembler::MacroAssembler(void* buffer, int size)
45 : Assembler(buffer, size), 45 : Assembler(Isolate::Current(), buffer, size),
46 generating_stub_(false), 46 generating_stub_(false),
47 allow_stub_calls_(true), 47 allow_stub_calls_(true),
48 code_object_(isolate()->heap()->undefined_value()) { 48 code_object_(isolate()->heap()->undefined_value()) {
49 } 49 }
50 50
51 51
52 void MacroAssembler::RecordWriteHelper(Register object, 52 void MacroAssembler::RecordWriteHelper(Register object,
53 Register addr, 53 Register addr,
54 Register scratch) { 54 Register scratch) {
55 if (emit_debug_code()) { 55 if (emit_debug_code()) {
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 Register scratch, 224 Register scratch,
225 Label* fail) { 225 Label* fail) {
226 movzx_b(scratch, FieldOperand(map, Map::kInstanceTypeOffset)); 226 movzx_b(scratch, FieldOperand(map, Map::kInstanceTypeOffset));
227 sub(Operand(scratch), Immediate(FIRST_JS_OBJECT_TYPE)); 227 sub(Operand(scratch), Immediate(FIRST_JS_OBJECT_TYPE));
228 cmp(scratch, LAST_JS_OBJECT_TYPE - FIRST_JS_OBJECT_TYPE); 228 cmp(scratch, LAST_JS_OBJECT_TYPE - FIRST_JS_OBJECT_TYPE);
229 j(above, fail); 229 j(above, fail);
230 } 230 }
231 231
232 232
233 void MacroAssembler::FCmp() { 233 void MacroAssembler::FCmp() {
234 if (Isolate::Current()->cpu_features()->IsSupported(CMOV)) { 234 if (CpuFeatures::IsSupported(CMOV)) {
235 fucomip(); 235 fucomip();
236 ffree(0); 236 ffree(0);
237 fincstp(); 237 fincstp();
238 } else { 238 } else {
239 fucompp(); 239 fucompp();
240 push(eax); 240 push(eax);
241 fnstsw_ax(); 241 fnstsw_ax();
242 sahf(); 242 sahf();
243 pop(eax); 243 pop(eax);
244 } 244 }
(...skipping 1797 matching lines...) Expand 10 before | Expand all | Expand 10 after
2042 2042
2043 // Check that the code was patched as expected. 2043 // Check that the code was patched as expected.
2044 ASSERT(masm_.pc_ == address_ + size_); 2044 ASSERT(masm_.pc_ == address_ + size_);
2045 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); 2045 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap);
2046 } 2046 }
2047 2047
2048 2048
2049 } } // namespace v8::internal 2049 } } // namespace v8::internal
2050 2050
2051 #endif // V8_TARGET_ARCH_IA32 2051 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698