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

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

Issue 7400016: Fixed confusion between AST IDs and condition codes on ARM. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 5 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
« no previous file with comments | « src/arm/assembler-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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 185
186 186
187 void MacroAssembler::Call(Handle<Code> code, 187 void MacroAssembler::Call(Handle<Code> code,
188 RelocInfo::Mode rmode, 188 RelocInfo::Mode rmode,
189 unsigned ast_id, 189 unsigned ast_id,
190 Condition cond) { 190 Condition cond) {
191 Label start; 191 Label start;
192 bind(&start); 192 bind(&start);
193 ASSERT(RelocInfo::IsCodeTarget(rmode)); 193 ASSERT(RelocInfo::IsCodeTarget(rmode));
194 if (rmode == RelocInfo::CODE_TARGET && ast_id != kNoASTId) { 194 if (rmode == RelocInfo::CODE_TARGET && ast_id != kNoASTId) {
195 ASSERT(ast_id_for_reloc_info_ == kNoASTId); 195 SetRecordedAstId(ast_id);
196 ast_id_for_reloc_info_ = ast_id;
197 rmode = RelocInfo::CODE_TARGET_WITH_ID; 196 rmode = RelocInfo::CODE_TARGET_WITH_ID;
198 } 197 }
199 // 'code' is always generated ARM code, never THUMB code 198 // 'code' is always generated ARM code, never THUMB code
200 Call(reinterpret_cast<Address>(code.location()), rmode, cond); 199 Call(reinterpret_cast<Address>(code.location()), rmode, cond);
201 ASSERT_EQ(CallSize(code, rmode, cond), SizeOfCodeGeneratedSince(&start)); 200 ASSERT_EQ(CallSize(code, rmode, ast_id, cond),
201 SizeOfCodeGeneratedSince(&start));
202 } 202 }
203 203
204 204
205 void MacroAssembler::Ret(Condition cond) { 205 void MacroAssembler::Ret(Condition cond) {
206 #if USE_BX 206 #if USE_BX
207 bx(lr, cond); 207 bx(lr, cond);
208 #else 208 #else
209 mov(pc, Operand(lr), LeaveCC, cond); 209 mov(pc, Operand(lr), LeaveCC, cond);
210 #endif 210 #endif
211 } 211 }
(...skipping 1643 matching lines...) Expand 10 before | Expand all | Expand 10 after
1855 bind(&non_instance); 1855 bind(&non_instance);
1856 ldr(result, FieldMemOperand(result, Map::kConstructorOffset)); 1856 ldr(result, FieldMemOperand(result, Map::kConstructorOffset));
1857 1857
1858 // All done. 1858 // All done.
1859 bind(&done); 1859 bind(&done);
1860 } 1860 }
1861 1861
1862 1862
1863 void MacroAssembler::CallStub(CodeStub* stub, Condition cond) { 1863 void MacroAssembler::CallStub(CodeStub* stub, Condition cond) {
1864 ASSERT(allow_stub_calls()); // Stub calls are not allowed in some stubs. 1864 ASSERT(allow_stub_calls()); // Stub calls are not allowed in some stubs.
1865 Call(stub->GetCode(), RelocInfo::CODE_TARGET, cond); 1865 Call(stub->GetCode(), RelocInfo::CODE_TARGET, kNoASTId, cond);
1866 } 1866 }
1867 1867
1868 1868
1869 MaybeObject* MacroAssembler::TryCallStub(CodeStub* stub, Condition cond) { 1869 MaybeObject* MacroAssembler::TryCallStub(CodeStub* stub, Condition cond) {
1870 ASSERT(allow_stub_calls()); // Stub calls are not allowed in some stubs. 1870 ASSERT(allow_stub_calls()); // Stub calls are not allowed in some stubs.
1871 Object* result; 1871 Object* result;
1872 { MaybeObject* maybe_result = stub->TryGetCode(); 1872 { MaybeObject* maybe_result = stub->TryGetCode();
1873 if (!maybe_result->ToObject(&result)) return maybe_result; 1873 if (!maybe_result->ToObject(&result)) return maybe_result;
1874 } 1874 }
1875 Call(Handle<Code>(Code::cast(result)), RelocInfo::CODE_TARGET, cond); 1875 Handle<Code> code(Code::cast(result));
1876 Call(code, RelocInfo::CODE_TARGET, kNoASTId, cond);
1876 return result; 1877 return result;
1877 } 1878 }
1878 1879
1879 1880
1880 void MacroAssembler::TailCallStub(CodeStub* stub, Condition cond) { 1881 void MacroAssembler::TailCallStub(CodeStub* stub, Condition cond) {
1881 ASSERT(allow_stub_calls()); // Stub calls are not allowed in some stubs. 1882 ASSERT(allow_stub_calls()); // Stub calls are not allowed in some stubs.
1882 Jump(stub->GetCode(), RelocInfo::CODE_TARGET, cond); 1883 Jump(stub->GetCode(), RelocInfo::CODE_TARGET, cond);
1883 } 1884 }
1884 1885
1885 1886
(...skipping 1348 matching lines...) Expand 10 before | Expand all | Expand 10 after
3234 void CodePatcher::EmitCondition(Condition cond) { 3235 void CodePatcher::EmitCondition(Condition cond) {
3235 Instr instr = Assembler::instr_at(masm_.pc_); 3236 Instr instr = Assembler::instr_at(masm_.pc_);
3236 instr = (instr & ~kCondMask) | cond; 3237 instr = (instr & ~kCondMask) | cond;
3237 masm_.emit(instr); 3238 masm_.emit(instr);
3238 } 3239 }
3239 3240
3240 3241
3241 } } // namespace v8::internal 3242 } } // namespace v8::internal
3242 3243
3243 #endif // V8_TARGET_ARCH_ARM 3244 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/assembler-arm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698