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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 int size = 2 * kInstrSize; | 100 int size = 2 * kInstrSize; |
101 Instr mov_instr = cond | MOV | LeaveCC; | 101 Instr mov_instr = cond | MOV | LeaveCC; |
102 intptr_t immediate = reinterpret_cast<intptr_t>(target); | 102 intptr_t immediate = reinterpret_cast<intptr_t>(target); |
103 if (!Operand(immediate, rmode).is_single_instruction(this, mov_instr)) { | 103 if (!Operand(immediate, rmode).is_single_instruction(this, mov_instr)) { |
104 size += kInstrSize; | 104 size += kInstrSize; |
105 } | 105 } |
106 return size; | 106 return size; |
107 } | 107 } |
108 | 108 |
109 | 109 |
| 110 int MacroAssembler::CallStubSize( |
| 111 CodeStub* stub, TypeFeedbackId ast_id, Condition cond) { |
| 112 return CallSize( |
| 113 stub->GetCode(isolate()), RelocInfo::CODE_TARGET, ast_id, cond); |
| 114 } |
| 115 |
| 116 |
110 int MacroAssembler::CallSizeNotPredictableCodeSize( | 117 int MacroAssembler::CallSizeNotPredictableCodeSize( |
111 Address target, RelocInfo::Mode rmode, Condition cond) { | 118 Address target, RelocInfo::Mode rmode, Condition cond) { |
112 int size = 2 * kInstrSize; | 119 int size = 2 * kInstrSize; |
113 Instr mov_instr = cond | MOV | LeaveCC; | 120 Instr mov_instr = cond | MOV | LeaveCC; |
114 intptr_t immediate = reinterpret_cast<intptr_t>(target); | 121 intptr_t immediate = reinterpret_cast<intptr_t>(target); |
115 if (!Operand(immediate, rmode).is_single_instruction(NULL, mov_instr)) { | 122 if (!Operand(immediate, rmode).is_single_instruction(NULL, mov_instr)) { |
116 size += kInstrSize; | 123 size += kInstrSize; |
117 } | 124 } |
118 return size; | 125 return size; |
119 } | 126 } |
(...skipping 3971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4091 sub(result, result, Operand(dividend)); | 4098 sub(result, result, Operand(dividend)); |
4092 } | 4099 } |
4093 if (ms.shift() > 0) mov(result, Operand(result, ASR, ms.shift())); | 4100 if (ms.shift() > 0) mov(result, Operand(result, ASR, ms.shift())); |
4094 add(result, result, Operand(dividend, LSR, 31)); | 4101 add(result, result, Operand(dividend, LSR, 31)); |
4095 } | 4102 } |
4096 | 4103 |
4097 | 4104 |
4098 } } // namespace v8::internal | 4105 } } // namespace v8::internal |
4099 | 4106 |
4100 #endif // V8_TARGET_ARCH_ARM | 4107 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |