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

Side by Side Diff: src/arm/cfg-arm.cc

Issue 165127: Factor out some platform-independent code into the shared cfg.cc. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 4 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 | « no previous file | src/cfg.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 __ CallRuntime(Runtime::kTraceExit, 1); 93 __ CallRuntime(Runtime::kTraceExit, 1);
94 } 94 }
95 __ mov(sp, fp); 95 __ mov(sp, fp);
96 __ ldm(ia_w, sp, fp.bit() | lr.bit()); 96 __ ldm(ia_w, sp, fp.bit() | lr.bit());
97 int count = CfgGlobals::current()->fun()->scope()->num_parameters(); 97 int count = CfgGlobals::current()->fun()->scope()->num_parameters();
98 __ add(sp, sp, Operand((count + 1) * kPointerSize)); 98 __ add(sp, sp, Operand((count + 1) * kPointerSize));
99 __ Jump(lr); 99 __ Jump(lr);
100 } 100 }
101 101
102 102
103 void PositionInstr::Compile(MacroAssembler* masm) {
104 if (FLAG_debug_info && pos_ != RelocInfo::kNoPosition) {
105 __ RecordStatementPosition(pos_);
106 __ RecordPosition(pos_);
107 }
108 }
109
110
111 void MoveInstr::Compile(MacroAssembler* masm) {
112 location()->Move(masm, value());
113 }
114
115
116 void BinaryOpInstr::Compile(MacroAssembler* masm) { 103 void BinaryOpInstr::Compile(MacroAssembler* masm) {
117 // The right-hand value should not be on the stack---if it is a 104 // The right-hand value should not be on the stack---if it is a
118 // compiler-generated temporary it is in the accumulator. 105 // compiler-generated temporary it is in the accumulator.
119 ASSERT(!value1()->is_on_stack()); 106 ASSERT(!value1()->is_on_stack());
120 107
121 Comment cmnt(masm, "[ BinaryOpInstr"); 108 Comment cmnt(masm, "[ BinaryOpInstr");
122 // We can overwrite one of the operands if it is a temporary. 109 // We can overwrite one of the operands if it is a temporary.
123 OverwriteMode mode = NO_OVERWRITE; 110 OverwriteMode mode = NO_OVERWRITE;
124 if (value0()->is_temporary()) { 111 if (value0()->is_temporary()) {
125 mode = OVERWRITE_LEFT; 112 mode = OVERWRITE_LEFT;
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 __ str(ip, ToMemOperand(loc)); 255 __ str(ip, ToMemOperand(loc));
269 break; 256 break;
270 case NOT_ALLOCATED: 257 case NOT_ALLOCATED:
271 UNREACHABLE(); 258 UNREACHABLE();
272 } 259 }
273 } 260 }
274 261
275 #undef __ 262 #undef __
276 263
277 } } // namespace v8::internal 264 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/cfg.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698