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

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

Issue 11280276: ARM: make MacroAssembler::LoadRoot emit exactly one instruction when in predictable code size scope. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix long lines and sync comments. Created 8 years 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/lithium-codegen-arm.cc ('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 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 } else { 416 } else {
417 usat(dst, satpos, src, cond); 417 usat(dst, satpos, src, cond);
418 } 418 }
419 } 419 }
420 420
421 421
422 void MacroAssembler::LoadRoot(Register destination, 422 void MacroAssembler::LoadRoot(Register destination,
423 Heap::RootListIndex index, 423 Heap::RootListIndex index,
424 Condition cond) { 424 Condition cond) {
425 if (CpuFeatures::IsSupported(MOVW_MOVT_IMMEDIATE_LOADS) && 425 if (CpuFeatures::IsSupported(MOVW_MOVT_IMMEDIATE_LOADS) &&
426 !Heap::RootCanBeWrittenAfterInitialization(index)) { 426 !Heap::RootCanBeWrittenAfterInitialization(index) &&
427 !predictable_code_size()) {
427 Handle<Object> root(isolate()->heap()->roots_array_start()[index]); 428 Handle<Object> root(isolate()->heap()->roots_array_start()[index]);
428 if (!isolate()->heap()->InNewSpace(*root)) { 429 if (!isolate()->heap()->InNewSpace(*root)) {
429 // The CPU supports fast immediate values, and this root will never 430 // The CPU supports fast immediate values, and this root will never
430 // change. We will load it as a relocatable immediate value. 431 // change. We will load it as a relocatable immediate value.
431 mov(destination, Operand(root), LeaveCC, cond); 432 mov(destination, Operand(root), LeaveCC, cond);
432 return; 433 return;
433 } 434 }
434 } 435 }
435 ldr(destination, MemOperand(kRootRegister, index << kPointerSizeLog2), cond); 436 ldr(destination, MemOperand(kRootRegister, index << kPointerSizeLog2), cond);
436 } 437 }
(...skipping 3463 matching lines...) Expand 10 before | Expand all | Expand 10 after
3900 void CodePatcher::EmitCondition(Condition cond) { 3901 void CodePatcher::EmitCondition(Condition cond) {
3901 Instr instr = Assembler::instr_at(masm_.pc_); 3902 Instr instr = Assembler::instr_at(masm_.pc_);
3902 instr = (instr & ~kCondMask) | cond; 3903 instr = (instr & ~kCondMask) | cond;
3903 masm_.emit(instr); 3904 masm_.emit(instr);
3904 } 3905 }
3905 3906
3906 3907
3907 } } // namespace v8::internal 3908 } } // namespace v8::internal
3908 3909
3909 #endif // V8_TARGET_ARCH_ARM 3910 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698