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

Side by Side Diff: src/arm/fast-codegen-arm.cc

Issue 652227: Allow snapshots built without -DANDROID to work on Android.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 10 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/arm/macro-assembler-arm.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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 21 matching lines...) Expand all
32 32
33 namespace v8 { 33 namespace v8 {
34 namespace internal { 34 namespace internal {
35 35
36 #define __ ACCESS_MASM(masm()) 36 #define __ ACCESS_MASM(masm())
37 37
38 Register FastCodeGenerator::accumulator0() { return r0; } 38 Register FastCodeGenerator::accumulator0() { return r0; }
39 Register FastCodeGenerator::accumulator1() { return r1; } 39 Register FastCodeGenerator::accumulator1() { return r1; }
40 Register FastCodeGenerator::scratch0() { return r3; } 40 Register FastCodeGenerator::scratch0() { return r3; }
41 Register FastCodeGenerator::scratch1() { return r4; } 41 Register FastCodeGenerator::scratch1() { return r4; }
42 Register FastCodeGenerator::scratch2() { return r5; }
42 Register FastCodeGenerator::receiver_reg() { return r2; } 43 Register FastCodeGenerator::receiver_reg() { return r2; }
43 Register FastCodeGenerator::context_reg() { return cp; } 44 Register FastCodeGenerator::context_reg() { return cp; }
44 45
45 46
46 void FastCodeGenerator::EmitLoadReceiver() { 47 void FastCodeGenerator::EmitLoadReceiver() {
47 // Offset 2 is due to return address and saved frame pointer. 48 // Offset 2 is due to return address and saved frame pointer.
48 int index = 2 + scope()->num_parameters(); 49 int index = 2 + scope()->num_parameters();
49 __ ldr(receiver_reg(), MemOperand(sp, index * kPointerSize)); 50 __ ldr(receiver_reg(), MemOperand(sp, index * kPointerSize));
50 } 51 }
51 52
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 } 93 }
93 } else { 94 } else {
94 offset += FixedArray::kHeaderSize; 95 offset += FixedArray::kHeaderSize;
95 __ ldr(scratch0(), 96 __ ldr(scratch0(),
96 FieldMemOperand(receiver_reg(), JSObject::kPropertiesOffset)); 97 FieldMemOperand(receiver_reg(), JSObject::kPropertiesOffset));
97 __ str(accumulator0(), FieldMemOperand(scratch0(), offset)); 98 __ str(accumulator0(), FieldMemOperand(scratch0(), offset));
98 } 99 }
99 100
100 if (needs_write_barrier) { 101 if (needs_write_barrier) {
101 __ mov(scratch1(), Operand(offset)); 102 __ mov(scratch1(), Operand(offset));
102 __ RecordWrite(scratch0(), scratch1(), ip); 103 __ RecordWrite(scratch0(), scratch1(), scratch2());
103 } 104 }
104 105
105 if (destination().is(accumulator1())) { 106 if (destination().is(accumulator1())) {
106 __ mov(accumulator1(), accumulator0()); 107 __ mov(accumulator1(), accumulator0());
107 if (is_smi(accumulator0())) { 108 if (is_smi(accumulator0())) {
108 set_as_smi(accumulator1()); 109 set_as_smi(accumulator1());
109 } else { 110 } else {
110 clear_as_smi(accumulator1()); 111 clear_as_smi(accumulator1());
111 } 112 }
112 } 113 }
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 int32_t sp_delta = (scope()->num_parameters() + 1) * kPointerSize; 228 int32_t sp_delta = (scope()->num_parameters() + 1) * kPointerSize;
228 __ add(sp, sp, Operand(sp_delta)); 229 __ add(sp, sp, Operand(sp_delta));
229 __ Jump(lr); 230 __ Jump(lr);
230 } 231 }
231 232
232 233
233 #undef __ 234 #undef __
234 235
235 236
236 } } // namespace v8::internal 237 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/arm/macro-assembler-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698