Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 86 Heap::RootListIndex index, | 86 Heap::RootListIndex index, |
| 87 Condition cond = al); | 87 Condition cond = al); |
| 88 | 88 |
| 89 // Sets the remembered set bit for [address+offset], where address is the | 89 // Sets the remembered set bit for [address+offset], where address is the |
| 90 // address of the heap object 'object'. The address must be in the first 8K | 90 // address of the heap object 'object'. The address must be in the first 8K |
| 91 // of an allocated page. The 'scratch' register is used in the | 91 // of an allocated page. The 'scratch' register is used in the |
| 92 // implementation and all 3 registers are clobbered by the operation, as | 92 // implementation and all 3 registers are clobbered by the operation, as |
| 93 // well as the ip register. | 93 // well as the ip register. |
| 94 void RecordWrite(Register object, Register offset, Register scratch); | 94 void RecordWrite(Register object, Register offset, Register scratch); |
| 95 | 95 |
| 96 // Push two registers. Pushes leftmost register first (to highest address). | |
| 97 void Push(Register src1, Register src2, Condition cond = al) { | |
| 98 ASSERT(!src1.is(src2)); | |
| 99 if (src1.code() > src2.code()) { | |
| 100 stm(db_w, sp, src1.bit() | src2.bit(), cond); | |
| 101 } else { | |
| 102 str(src1, MemOperand(sp, 4, NegPreIndex), cond); | |
|
Søren Thygesen Gjesse
2010/04/26 14:08:15
Why not use push (from arm-assembler) for this?
| |
| 103 str(src2, MemOperand(sp, 4, NegPreIndex), cond); | |
| 104 } | |
| 105 } | |
| 106 | |
| 107 // Push three registers. Pushes leftmost register first (to highest address). | |
| 108 void Push(Register src1, Register src2, Register src3, Condition cond = al) { | |
| 109 ASSERT(!src1.is(src2)); | |
| 110 ASSERT(!src2.is(src3)); | |
| 111 ASSERT(!src1.is(src3)); | |
| 112 if (src1.code() > src2.code()) { | |
| 113 if (src2.code() > src3.code()) { | |
| 114 stm(db_w, sp, src1.bit() | src2.bit() | src3.bit(), cond); | |
| 115 } else { | |
| 116 stm(db_w, sp, src1.bit() | src2.bit(), cond); | |
| 117 str(src3, MemOperand(sp, 4, NegPreIndex), cond); | |
| 118 } | |
| 119 } else { | |
| 120 str(src1, MemOperand(sp, 4, NegPreIndex), cond); | |
| 121 Push(src2, src3, cond); | |
| 122 } | |
| 123 } | |
| 124 | |
| 125 // Push four registers. Pushes leftmost register first (to highest address). | |
| 126 void Push(Register src1, Register src2, | |
| 127 Register src3, Register src4, Condition cond = al) { | |
| 128 ASSERT(!src1.is(src2)); | |
| 129 ASSERT(!src2.is(src3)); | |
| 130 ASSERT(!src1.is(src3)); | |
| 131 ASSERT(!src1.is(src4)); | |
| 132 ASSERT(!src2.is(src4)); | |
| 133 ASSERT(!src3.is(src4)); | |
| 134 if (src1.code() > src2.code()) { | |
| 135 if (src2.code() > src3.code()) { | |
| 136 if (src3.code() > src4.code()) { | |
| 137 stm(db_w, | |
| 138 sp, | |
| 139 src1.bit() | src2.bit() | src3.bit() | src4.bit(), | |
| 140 cond); | |
| 141 } else { | |
| 142 stm(db_w, sp, src1.bit() | src2.bit() | src3.bit(), cond); | |
| 143 str(src4, MemOperand(sp, 4, NegPreIndex), cond); | |
| 144 } | |
| 145 } else { | |
| 146 stm(db_w, sp, src1.bit() | src2.bit(), cond); | |
| 147 Push(src3, src4, cond); | |
| 148 } | |
| 149 } else { | |
| 150 str(src1, MemOperand(sp, 4, NegPreIndex), cond); | |
| 151 Push(src2, src3, src4, cond); | |
| 152 } | |
| 153 } | |
| 154 | |
| 96 // --------------------------------------------------------------------------- | 155 // --------------------------------------------------------------------------- |
| 97 // Stack limit support | 156 // Stack limit support |
| 98 | 157 |
| 99 void StackLimitCheck(Label* on_stack_limit_hit); | 158 void StackLimitCheck(Label* on_stack_limit_hit); |
| 100 | 159 |
| 101 // --------------------------------------------------------------------------- | 160 // --------------------------------------------------------------------------- |
| 102 // Activation frames | 161 // Activation frames |
| 103 | 162 |
| 104 void EnterInternalFrame() { EnterFrame(StackFrame::INTERNAL); } | 163 void EnterInternalFrame() { EnterFrame(StackFrame::INTERNAL); } |
| 105 void LeaveInternalFrame() { LeaveFrame(StackFrame::INTERNAL); } | 164 void LeaveInternalFrame() { LeaveFrame(StackFrame::INTERNAL); } |
| (...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 539 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) | 598 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) |
| 540 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> | 599 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> |
| 541 #else | 600 #else |
| 542 #define ACCESS_MASM(masm) masm-> | 601 #define ACCESS_MASM(masm) masm-> |
| 543 #endif | 602 #endif |
| 544 | 603 |
| 545 | 604 |
| 546 } } // namespace v8::internal | 605 } } // namespace v8::internal |
| 547 | 606 |
| 548 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ | 607 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ |
| OLD | NEW |