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

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

Issue 1128009: Replace the constant pool access ldr instructions with movw/movt, and remove ... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 7 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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 // The two instructions (ldr and blx) could be separated by a literal 120 // The two instructions (ldr and blx) could be separated by a literal
121 // pool and the code would still work. The issue comes from the 121 // pool and the code would still work. The issue comes from the
122 // patching code which expect the ldr to be just above the blx. 122 // patching code which expect the ldr to be just above the blx.
123 BlockConstPoolFor(2); 123 BlockConstPoolFor(2);
124 // Statement positions are expected to be recorded when the target 124 // Statement positions are expected to be recorded when the target
125 // address is loaded. The mov method will automatically record 125 // address is loaded. The mov method will automatically record
126 // positions when pc is the target, since this is not the case here 126 // positions when pc is the target, since this is not the case here
127 // we have to do it explicitly. 127 // we have to do it explicitly.
128 WriteRecordedPositions(); 128 WriteRecordedPositions();
129 129
130 mov(ip, Operand(target, rmode), LeaveCC, cond); 130 mov(ip, Operand(target, rmode), LeaveCC, cond, false);
Erik Corry 2010/05/03 10:06:28 There should be a comment here to explain why we d
131 blx(ip, cond); 131 blx(ip, cond);
132 132
133 ASSERT(kCallTargetAddressOffset == 2 * kInstrSize); 133 ASSERT(kCallTargetAddressOffset == 2 * kInstrSize);
134 #else 134 #else
135 // Set lr for return at current pc + 8. 135 // Set lr for return at current pc + 8.
136 mov(lr, Operand(pc), LeaveCC, cond); 136 mov(lr, Operand(pc), LeaveCC, cond);
137 // Emit a ldr<cond> pc, [pc + offset of target in constant pool]. 137 // Emit a ldr<cond> pc, [pc + offset of target in constant pool].
138 mov(pc, Operand(target, rmode), LeaveCC, cond); 138 mov(pc, Operand(target, rmode), LeaveCC, cond);
139 139
140 ASSERT(kCallTargetAddressOffset == kInstrSize); 140 ASSERT(kCallTargetAddressOffset == kInstrSize);
(...skipping 1424 matching lines...) Expand 10 before | Expand all | Expand 10 after
1565 } 1565 }
1566 1566
1567 1567
1568 void CodePatcher::Emit(Address addr) { 1568 void CodePatcher::Emit(Address addr) {
1569 masm()->emit(reinterpret_cast<Instr>(addr)); 1569 masm()->emit(reinterpret_cast<Instr>(addr));
1570 } 1570 }
1571 #endif // ENABLE_DEBUGGER_SUPPORT 1571 #endif // ENABLE_DEBUGGER_SUPPORT
1572 1572
1573 1573
1574 } } // namespace v8::internal 1574 } } // namespace v8::internal
OLDNEW
« src/arm/disasm-arm.cc ('K') | « src/arm/disasm-arm.cc ('k') | src/arm/simulator-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698