OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 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 28 matching lines...) Expand all Loading... |
39 | 39 |
40 MacroAssembler::MacroAssembler(void* buffer, int size) | 40 MacroAssembler::MacroAssembler(void* buffer, int size) |
41 : Assembler(buffer, size), | 41 : Assembler(buffer, size), |
42 generating_stub_(false), | 42 generating_stub_(false), |
43 allow_stub_calls_(true), | 43 allow_stub_calls_(true), |
44 code_object_(Heap::undefined_value()) { | 44 code_object_(Heap::undefined_value()) { |
45 } | 45 } |
46 | 46 |
47 | 47 |
48 void MacroAssembler::LoadRoot(Register destination, Heap::RootListIndex index) { | 48 void MacroAssembler::LoadRoot(Register destination, Heap::RootListIndex index) { |
49 movq(destination, Operand(r13, index << kPointerSizeLog2)); | 49 movq(destination, Operand(kRootRegister, index << kPointerSizeLog2)); |
50 } | 50 } |
51 | 51 |
52 | 52 |
53 void MacroAssembler::PushRoot(Heap::RootListIndex index) { | 53 void MacroAssembler::PushRoot(Heap::RootListIndex index) { |
54 push(Operand(r13, index << kPointerSizeLog2)); | 54 push(Operand(kRootRegister, index << kPointerSizeLog2)); |
55 } | 55 } |
56 | 56 |
57 | 57 |
58 void MacroAssembler::CompareRoot(Register with, Heap::RootListIndex index) { | 58 void MacroAssembler::CompareRoot(Register with, Heap::RootListIndex index) { |
59 cmpq(with, Operand(r13, index << kPointerSizeLog2)); | 59 cmpq(with, Operand(kRootRegister, index << kPointerSizeLog2)); |
60 } | 60 } |
61 | 61 |
62 | 62 |
63 void MacroAssembler::CompareRoot(Operand with, Heap::RootListIndex index) { | 63 void MacroAssembler::CompareRoot(Operand with, Heap::RootListIndex index) { |
64 LoadRoot(kScratchRegister, index); | 64 LoadRoot(kScratchRegister, index); |
65 cmpq(with, kScratchRegister); | 65 cmpq(with, kScratchRegister); |
66 } | 66 } |
67 | 67 |
68 | 68 |
69 void MacroAssembler::StackLimitCheck(Label* on_stack_overflow) { | 69 void MacroAssembler::StackLimitCheck(Label* on_stack_overflow) { |
(...skipping 2567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2637 CodePatcher::~CodePatcher() { | 2637 CodePatcher::~CodePatcher() { |
2638 // Indicate that code has changed. | 2638 // Indicate that code has changed. |
2639 CPU::FlushICache(address_, size_); | 2639 CPU::FlushICache(address_, size_); |
2640 | 2640 |
2641 // Check that the code was patched as expected. | 2641 // Check that the code was patched as expected. |
2642 ASSERT(masm_.pc_ == address_ + size_); | 2642 ASSERT(masm_.pc_ == address_ + size_); |
2643 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); | 2643 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); |
2644 } | 2644 } |
2645 | 2645 |
2646 } } // namespace v8::internal | 2646 } } // namespace v8::internal |
OLD | NEW |