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

Side by Side Diff: src/arm/codegen-arm.cc

Issue 2900683002: [compiler] Delay allocation of code-embedded heap numbers. (Closed)
Patch Set: Fix rebase. Created 3 years, 6 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
« no previous file with comments | « src/arm/assembler-arm-inl.h ('k') | src/arm64/assembler-arm64.h » ('j') | 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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/arm/codegen-arm.h" 5 #include "src/arm/codegen-arm.h"
6 6
7 #if V8_TARGET_ARCH_ARM 7 #if V8_TARGET_ARCH_ARM
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 __ bind(&less_4); 160 __ bind(&less_4);
161 __ mov(chars, Operand(chars, LSL, 31), SetCC); 161 __ mov(chars, Operand(chars, LSL, 31), SetCC);
162 // bit0 => Z (ne), bit1 => C (cs) 162 // bit0 => Z (ne), bit1 => C (cs)
163 __ ldrh(temp1, MemOperand(src, 2, PostIndex), cs); 163 __ ldrh(temp1, MemOperand(src, 2, PostIndex), cs);
164 __ strh(temp1, MemOperand(dest, 2, PostIndex), cs); 164 __ strh(temp1, MemOperand(dest, 2, PostIndex), cs);
165 __ ldrb(temp1, MemOperand(src), ne); 165 __ ldrb(temp1, MemOperand(src), ne);
166 __ strb(temp1, MemOperand(dest), ne); 166 __ strb(temp1, MemOperand(dest), ne);
167 __ Ret(); 167 __ Ret();
168 168
169 CodeDesc desc; 169 CodeDesc desc;
170 masm.GetCode(&desc); 170 masm.GetCode(isolate, &desc);
171 DCHECK(!RelocInfo::RequiresRelocation(isolate, desc)); 171 DCHECK(!RelocInfo::RequiresRelocation(isolate, desc));
172 172
173 Assembler::FlushICache(isolate, buffer, actual_size); 173 Assembler::FlushICache(isolate, buffer, actual_size);
174 base::OS::ProtectCode(buffer, actual_size); 174 base::OS::ProtectCode(buffer, actual_size);
175 return FUNCTION_CAST<MemCopyUint8Function>(buffer); 175 return FUNCTION_CAST<MemCopyUint8Function>(buffer);
176 #endif 176 #endif
177 } 177 }
178 178
179 179
180 // Convert 8 to 16. The number of character to copy must be at least 8. 180 // Convert 8 to 16. The number of character to copy must be at least 8.
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 __ mov(temp3, Operand(temp3, LSL, 16)); 249 __ mov(temp3, Operand(temp3, LSL, 16));
250 __ uxtab(temp3, temp3, temp1); 250 __ uxtab(temp3, temp3, temp1);
251 __ str(temp3, MemOperand(dest, 4, PostIndex)); 251 __ str(temp3, MemOperand(dest, 4, PostIndex));
252 __ bind(&not_two); 252 __ bind(&not_two);
253 __ ldrb(temp1, MemOperand(src), ne); 253 __ ldrb(temp1, MemOperand(src), ne);
254 __ strh(temp1, MemOperand(dest), ne); 254 __ strh(temp1, MemOperand(dest), ne);
255 __ Pop(pc, r4); 255 __ Pop(pc, r4);
256 } 256 }
257 257
258 CodeDesc desc; 258 CodeDesc desc;
259 masm.GetCode(&desc); 259 masm.GetCode(isolate, &desc);
260 260
261 Assembler::FlushICache(isolate, buffer, actual_size); 261 Assembler::FlushICache(isolate, buffer, actual_size);
262 base::OS::ProtectCode(buffer, actual_size); 262 base::OS::ProtectCode(buffer, actual_size);
263 263
264 return FUNCTION_CAST<MemCopyUint16Uint8Function>(buffer); 264 return FUNCTION_CAST<MemCopyUint16Uint8Function>(buffer);
265 #endif 265 #endif
266 } 266 }
267 #endif 267 #endif
268 268
269 UnaryMathFunctionWithIsolate CreateSqrtFunction(Isolate* isolate) { 269 UnaryMathFunctionWithIsolate CreateSqrtFunction(Isolate* isolate) {
270 #if defined(USE_SIMULATOR) 270 #if defined(USE_SIMULATOR)
271 return nullptr; 271 return nullptr;
272 #else 272 #else
273 size_t actual_size; 273 size_t actual_size;
274 byte* buffer = 274 byte* buffer =
275 static_cast<byte*>(base::OS::Allocate(1 * KB, &actual_size, true)); 275 static_cast<byte*>(base::OS::Allocate(1 * KB, &actual_size, true));
276 if (buffer == nullptr) return nullptr; 276 if (buffer == nullptr) return nullptr;
277 277
278 MacroAssembler masm(isolate, buffer, static_cast<int>(actual_size), 278 MacroAssembler masm(isolate, buffer, static_cast<int>(actual_size),
279 CodeObjectRequired::kNo); 279 CodeObjectRequired::kNo);
280 280
281 __ MovFromFloatParameter(d0); 281 __ MovFromFloatParameter(d0);
282 __ vsqrt(d0, d0); 282 __ vsqrt(d0, d0);
283 __ MovToFloatResult(d0); 283 __ MovToFloatResult(d0);
284 __ Ret(); 284 __ Ret();
285 285
286 CodeDesc desc; 286 CodeDesc desc;
287 masm.GetCode(&desc); 287 masm.GetCode(isolate, &desc);
288 DCHECK(!RelocInfo::RequiresRelocation(isolate, desc)); 288 DCHECK(!RelocInfo::RequiresRelocation(isolate, desc));
289 289
290 Assembler::FlushICache(isolate, buffer, actual_size); 290 Assembler::FlushICache(isolate, buffer, actual_size);
291 base::OS::ProtectCode(buffer, actual_size); 291 base::OS::ProtectCode(buffer, actual_size);
292 return FUNCTION_CAST<UnaryMathFunctionWithIsolate>(buffer); 292 return FUNCTION_CAST<UnaryMathFunctionWithIsolate>(buffer);
293 #endif 293 #endif
294 } 294 }
295 295
296 #undef __ 296 #undef __
297 297
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 patcher.ldr(pc, MemOperand(pc, -4)); 471 patcher.ldr(pc, MemOperand(pc, -4));
472 patcher.emit_code_stub_address(stub); 472 patcher.emit_code_stub_address(stub);
473 patcher.FlushICache(isolate); 473 patcher.FlushICache(isolate);
474 } 474 }
475 } 475 }
476 476
477 } // namespace internal 477 } // namespace internal
478 } // namespace v8 478 } // namespace v8
479 479
480 #endif // V8_TARGET_ARCH_ARM 480 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/assembler-arm-inl.h ('k') | src/arm64/assembler-arm64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698