Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(158)

Side by Side Diff: src/arm/macro-assembler-arm.cc

Issue 226503003: Use correct call size for PredictableCodeSizeScopes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm/macro-assembler-arm.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698