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

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

Issue 4469002: Improve positions recording for calls. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 10 years, 1 month 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 // blx ip 122 // blx ip
123 123
124 // The two instructions (ldr and blx) could be separated by a constant 124 // The two instructions (ldr and blx) could be separated by a constant
125 // pool and the code would still work. The issue comes from the 125 // pool and the code would still work. The issue comes from the
126 // patching code which expect the ldr to be just above the blx. 126 // patching code which expect the ldr to be just above the blx.
127 { BlockConstPoolScope block_const_pool(this); 127 { BlockConstPoolScope block_const_pool(this);
128 // Statement positions are expected to be recorded when the target 128 // Statement positions are expected to be recorded when the target
129 // address is loaded. The mov method will automatically record 129 // address is loaded. The mov method will automatically record
130 // positions when pc is the target, since this is not the case here 130 // positions when pc is the target, since this is not the case here
131 // we have to do it explicitly. 131 // we have to do it explicitly.
132 WriteRecordedPositions(); 132 positions_recorder()->WriteRecordedPositions();
133 133
134 mov(ip, Operand(target, rmode), LeaveCC, cond); 134 mov(ip, Operand(target, rmode), LeaveCC, cond);
135 blx(ip, cond); 135 blx(ip, cond);
136 } 136 }
137 137
138 ASSERT(kCallTargetAddressOffset == 2 * kInstrSize); 138 ASSERT(kCallTargetAddressOffset == 2 * kInstrSize);
139 #else 139 #else
140 // Set lr for return at current pc + 8. 140 // Set lr for return at current pc + 8.
141 mov(lr, Operand(pc), LeaveCC, cond); 141 mov(lr, Operand(pc), LeaveCC, cond);
142 // Emit a ldr<cond> pc, [pc + offset of target in constant pool]. 142 // Emit a ldr<cond> pc, [pc + offset of target in constant pool].
(...skipping 1832 matching lines...) Expand 10 before | Expand all | Expand 10 after
1975 1975
1976 void CodePatcher::Emit(Address addr) { 1976 void CodePatcher::Emit(Address addr) {
1977 masm()->emit(reinterpret_cast<Instr>(addr)); 1977 masm()->emit(reinterpret_cast<Instr>(addr));
1978 } 1978 }
1979 #endif // ENABLE_DEBUGGER_SUPPORT 1979 #endif // ENABLE_DEBUGGER_SUPPORT
1980 1980
1981 1981
1982 } } // namespace v8::internal 1982 } } // namespace v8::internal
1983 1983
1984 #endif // V8_TARGET_ARCH_ARM 1984 #endif // V8_TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698