OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 } | 295 } |
296 } | 296 } |
297 | 297 |
298 | 298 |
299 void FullCodeGenerator::ClearAccumulator() { | 299 void FullCodeGenerator::ClearAccumulator() { |
300 __ Set(rax, 0); | 300 __ Set(rax, 0); |
301 } | 301 } |
302 | 302 |
303 | 303 |
304 void FullCodeGenerator::EmitProfilingCounterDecrement(int delta) { | 304 void FullCodeGenerator::EmitProfilingCounterDecrement(int delta) { |
305 __ movq(rbx, profiling_counter_, RelocInfo::EMBEDDED_OBJECT); | 305 __ Move(rbx, profiling_counter_, RelocInfo::EMBEDDED_OBJECT); |
306 __ SmiAddConstant(FieldOperand(rbx, Cell::kValueOffset), | 306 __ SmiAddConstant(FieldOperand(rbx, Cell::kValueOffset), |
307 Smi::FromInt(-delta)); | 307 Smi::FromInt(-delta)); |
308 } | 308 } |
309 | 309 |
310 | 310 |
311 void FullCodeGenerator::EmitProfilingCounterReset() { | 311 void FullCodeGenerator::EmitProfilingCounterReset() { |
312 int reset_value = FLAG_interrupt_budget; | 312 int reset_value = FLAG_interrupt_budget; |
313 if (info_->ShouldSelfOptimize() && !FLAG_retry_self_opt) { | 313 if (info_->ShouldSelfOptimize() && !FLAG_retry_self_opt) { |
314 // Self-optimization is a one-off thing; if it fails, don't try again. | 314 // Self-optimization is a one-off thing; if it fails, don't try again. |
315 reset_value = Smi::kMaxValue; | 315 reset_value = Smi::kMaxValue; |
316 } | 316 } |
317 __ movq(rbx, profiling_counter_, RelocInfo::EMBEDDED_OBJECT); | 317 __ Move(rbx, profiling_counter_, RelocInfo::EMBEDDED_OBJECT); |
318 __ Move(kScratchRegister, Smi::FromInt(reset_value)); | 318 __ Move(kScratchRegister, Smi::FromInt(reset_value)); |
319 __ movq(FieldOperand(rbx, Cell::kValueOffset), kScratchRegister); | 319 __ movq(FieldOperand(rbx, Cell::kValueOffset), kScratchRegister); |
320 } | 320 } |
321 | 321 |
322 | 322 |
323 void FullCodeGenerator::EmitBackEdgeBookkeeping(IterationStatement* stmt, | 323 void FullCodeGenerator::EmitBackEdgeBookkeeping(IterationStatement* stmt, |
324 Label* back_edge_target) { | 324 Label* back_edge_target) { |
325 Comment cmnt(masm_, "[ Back edge bookkeeping"); | 325 Comment cmnt(masm_, "[ Back edge bookkeeping"); |
326 Label ok; | 326 Label ok; |
327 | 327 |
(...skipping 3026 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3354 __ movq(scratch, stamp_operand); | 3354 __ movq(scratch, stamp_operand); |
3355 __ cmpq(scratch, FieldOperand(object, JSDate::kCacheStampOffset)); | 3355 __ cmpq(scratch, FieldOperand(object, JSDate::kCacheStampOffset)); |
3356 __ j(not_equal, &runtime, Label::kNear); | 3356 __ j(not_equal, &runtime, Label::kNear); |
3357 __ movq(result, FieldOperand(object, JSDate::kValueOffset + | 3357 __ movq(result, FieldOperand(object, JSDate::kValueOffset + |
3358 kPointerSize * index->value())); | 3358 kPointerSize * index->value())); |
3359 __ jmp(&done); | 3359 __ jmp(&done); |
3360 } | 3360 } |
3361 __ bind(&runtime); | 3361 __ bind(&runtime); |
3362 __ PrepareCallCFunction(2); | 3362 __ PrepareCallCFunction(2); |
3363 __ movq(arg_reg_1, object); | 3363 __ movq(arg_reg_1, object); |
3364 __ movq(arg_reg_2, index, RelocInfo::NONE64); | 3364 __ Move(arg_reg_2, index, RelocInfo::NONE64); |
3365 __ CallCFunction(ExternalReference::get_date_field_function(isolate()), 2); | 3365 __ CallCFunction(ExternalReference::get_date_field_function(isolate()), 2); |
3366 __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); | 3366 __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); |
3367 __ jmp(&done); | 3367 __ jmp(&done); |
3368 } | 3368 } |
3369 | 3369 |
3370 __ bind(¬_date_object); | 3370 __ bind(¬_date_object); |
3371 __ CallRuntime(Runtime::kThrowNotDateError, 0); | 3371 __ CallRuntime(Runtime::kThrowNotDateError, 0); |
3372 __ bind(&done); | 3372 __ bind(&done); |
3373 context()->Plug(rax); | 3373 context()->Plug(rax); |
3374 } | 3374 } |
(...skipping 1531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4906 | 4906 |
4907 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 4907 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
4908 Assembler::target_address_at(call_target_address)); | 4908 Assembler::target_address_at(call_target_address)); |
4909 return OSR_AFTER_STACK_CHECK; | 4909 return OSR_AFTER_STACK_CHECK; |
4910 } | 4910 } |
4911 | 4911 |
4912 | 4912 |
4913 } } // namespace v8::internal | 4913 } } // namespace v8::internal |
4914 | 4914 |
4915 #endif // V8_TARGET_ARCH_X64 | 4915 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |