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

Side by Side Diff: runtime/vm/assembler_arm.cc

Issue 12439005: Implement leaf runtime call stub on ARM and corresponding call redirection (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" 5 #include "vm/globals.h"
6 #if defined(TARGET_ARCH_ARM) 6 #if defined(TARGET_ARCH_ARM)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/simulator.h" 9 #include "vm/simulator.h"
10 #include "vm/runtime_entry.h" 10 #include "vm/runtime_entry.h"
(...skipping 1380 matching lines...) Expand 10 before | Expand all | Expand 10 after
1391 } 1391 }
1392 1392
1393 1393
1394 void Assembler::Rrx(Register rd, Register rm, Condition cond) { 1394 void Assembler::Rrx(Register rd, Register rm, Condition cond) {
1395 mov(rd, ShifterOperand(rm, ROR, 0), cond); 1395 mov(rd, ShifterOperand(rm, ROR, 0), cond);
1396 } 1396 }
1397 1397
1398 1398
1399 void Assembler::Branch(const ExternalLabel* label, Condition cond) { 1399 void Assembler::Branch(const ExternalLabel* label, Condition cond) {
1400 LoadImmediate(IP, label->address(), cond); // Address is never patched. 1400 LoadImmediate(IP, label->address(), cond); // Address is never patched.
1401 mov(PC, ShifterOperand(IP), cond); 1401 bx(IP, cond);
1402 }
1403
1404
1405 void Assembler::BranchPatchable(const ExternalLabel* label) {
1406 // Use a fixed size code sequence, since a function prologue may be patched
1407 // with this branch sequence.
1408 // Contrarily to BranchLinkPatchable, BranchPatchable requires an instruction
1409 // cache flush upon patching.
1410 movw(IP, Utils::Low16Bits(label->address()));
1411 movt(IP, Utils::High16Bits(label->address()));
1412 bx(IP);
1402 } 1413 }
1403 1414
1404 1415
1405 void Assembler::BranchLink(const ExternalLabel* label) { 1416 void Assembler::BranchLink(const ExternalLabel* label) {
1406 LoadImmediate(IP, label->address()); // Target address is never patched. 1417 LoadImmediate(IP, label->address()); // Target address is never patched.
1407 blx(IP); // Use blx instruction so that the return branch prediction works. 1418 blx(IP); // Use blx instruction so that the return branch prediction works.
1408 } 1419 }
1409 1420
1410 1421
1411 void Assembler::BranchLinkPatchable(const ExternalLabel* label) { 1422 void Assembler::BranchLinkPatchable(const ExternalLabel* label) {
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
1952 // Do not reuse an existing entry, since each reference may be patched 1963 // Do not reuse an existing entry, since each reference may be patched
1953 // independently. 1964 // independently.
1954 object_pool_.Add(smi); 1965 object_pool_.Add(smi);
1955 return object_pool_.Length() - 1; 1966 return object_pool_.Length() - 1;
1956 } 1967 }
1957 1968
1958 } // namespace dart 1969 } // namespace dart
1959 1970
1960 #endif // defined TARGET_ARCH_ARM 1971 #endif // defined TARGET_ARCH_ARM
1961 1972
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698