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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 Condition cond) { | 126 Condition cond) { |
127 // Set lr for return at current pc + 8. | 127 // Set lr for return at current pc + 8. |
128 mov(lr, Operand(pc), LeaveCC, cond); | 128 mov(lr, Operand(pc), LeaveCC, cond); |
129 // Emit a ldr<cond> pc, [pc + offset of target in constant pool]. | 129 // Emit a ldr<cond> pc, [pc + offset of target in constant pool]. |
130 mov(pc, Operand(target, rmode), LeaveCC, cond); | 130 mov(pc, Operand(target, rmode), LeaveCC, cond); |
131 // If USE_BLX is defined, we could emit a 'mov ip, target', followed by a | 131 // If USE_BLX is defined, we could emit a 'mov ip, target', followed by a |
132 // 'blx ip'; however, the code would not be shorter than the above sequence | 132 // 'blx ip'; however, the code would not be shorter than the above sequence |
133 // and the target address of the call would be referenced by the first | 133 // and the target address of the call would be referenced by the first |
134 // instruction rather than the second one, which would make it harder to patch | 134 // instruction rather than the second one, which would make it harder to patch |
135 // (two instructions before the return address, instead of one). | 135 // (two instructions before the return address, instead of one). |
136 ASSERT(kPatchReturnSequenceLength == sizeof(Instr)); | 136 ASSERT(kCallTargetAddressOffset == sizeof(Instr)); |
137 } | 137 } |
138 | 138 |
139 | 139 |
140 void MacroAssembler::Call(byte* target, RelocInfo::Mode rmode, | 140 void MacroAssembler::Call(byte* target, RelocInfo::Mode rmode, |
141 Condition cond) { | 141 Condition cond) { |
142 ASSERT(!RelocInfo::IsCodeTarget(rmode)); | 142 ASSERT(!RelocInfo::IsCodeTarget(rmode)); |
143 Call(reinterpret_cast<intptr_t>(target), rmode, cond); | 143 Call(reinterpret_cast<intptr_t>(target), rmode, cond); |
144 } | 144 } |
145 | 145 |
146 | 146 |
(...skipping 1000 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1147 mov(r0, Operand(p0)); | 1147 mov(r0, Operand(p0)); |
1148 push(r0); | 1148 push(r0); |
1149 mov(r0, Operand(Smi::FromInt(p1 - p0))); | 1149 mov(r0, Operand(Smi::FromInt(p1 - p0))); |
1150 push(r0); | 1150 push(r0); |
1151 CallRuntime(Runtime::kAbort, 2); | 1151 CallRuntime(Runtime::kAbort, 2); |
1152 // will not return here | 1152 // will not return here |
1153 } | 1153 } |
1154 | 1154 |
1155 | 1155 |
1156 } } // namespace v8::internal | 1156 } } // namespace v8::internal |
OLD | NEW |