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

Side by Side Diff: src/a64/lithium-codegen-a64.cc

Issue 151603004: A64: Synchronize with r16587. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 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 | « src/a64/lithium-a64.h ('k') | src/a64/stub-cache-a64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 } else if (is_uint32) { 352 } else if (is_uint32) {
353 translation->StoreUint32Register(reg); 353 translation->StoreUint32Register(reg);
354 } else { 354 } else {
355 translation->StoreInt32Register(reg); 355 translation->StoreInt32Register(reg);
356 } 356 }
357 } else if (op->IsDoubleRegister()) { 357 } else if (op->IsDoubleRegister()) {
358 DoubleRegister reg = ToDoubleRegister(op); 358 DoubleRegister reg = ToDoubleRegister(op);
359 translation->StoreDoubleRegister(reg); 359 translation->StoreDoubleRegister(reg);
360 } else if (op->IsConstantOperand()) { 360 } else if (op->IsConstantOperand()) {
361 HConstant* constant = chunk()->LookupConstant(LConstantOperand::cast(op)); 361 HConstant* constant = chunk()->LookupConstant(LConstantOperand::cast(op));
362 int src_index = DefineDeoptimizationLiteral(constant->handle()); 362 int src_index = DefineDeoptimizationLiteral(constant->handle(isolate()));
363 translation->StoreLiteral(src_index); 363 translation->StoreLiteral(src_index);
364 } else { 364 } else {
365 UNREACHABLE(); 365 UNREACHABLE();
366 } 366 }
367 } 367 }
368 368
369 369
370 int LCodeGen::DefineDeoptimizationLiteral(Handle<Object> literal) { 370 int LCodeGen::DefineDeoptimizationLiteral(Handle<Object> literal) {
371 int result = deoptimization_literals_.length(); 371 int result = deoptimization_literals_.length();
372 for (int i = 0; i < deoptimization_literals_.length(); ++i) { 372 for (int i = 0; i < deoptimization_literals_.length(); ++i) {
(...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after
1128 if (r.IsSmi()) { 1128 if (r.IsSmi()) {
1129 ASSERT(constant->HasSmiValue()); 1129 ASSERT(constant->HasSmiValue());
1130 return Operand(Smi::FromInt(constant->Integer32Value())); 1130 return Operand(Smi::FromInt(constant->Integer32Value()));
1131 } else if (r.IsInteger32()) { 1131 } else if (r.IsInteger32()) {
1132 ASSERT(constant->HasInteger32Value()); 1132 ASSERT(constant->HasInteger32Value());
1133 return Operand(constant->Integer32Value()); 1133 return Operand(constant->Integer32Value());
1134 } else if (r.IsDouble()) { 1134 } else if (r.IsDouble()) {
1135 Abort(kToOperandUnsupportedDoubleImmediate); 1135 Abort(kToOperandUnsupportedDoubleImmediate);
1136 } 1136 }
1137 ASSERT(r.IsTagged()); 1137 ASSERT(r.IsTagged());
1138 return Operand(constant->handle()); 1138 return Operand(constant->handle(isolate()));
1139 } else if (op->IsRegister()) { 1139 } else if (op->IsRegister()) {
1140 return Operand(ToRegister(op)); 1140 return Operand(ToRegister(op));
1141 } else if (op->IsDoubleRegister()) { 1141 } else if (op->IsDoubleRegister()) {
1142 Abort(kToOperandIsDoubleRegisterUnimplemented); 1142 Abort(kToOperandIsDoubleRegisterUnimplemented);
1143 return Operand(0); 1143 return Operand(0);
1144 } 1144 }
1145 // Stack slots not implemented, use ToMemOperand instead. 1145 // Stack slots not implemented, use ToMemOperand instead.
1146 UNREACHABLE(); 1146 UNREACHABLE();
1147 return Operand(0); 1147 return Operand(0);
1148 } 1148 }
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
1189 ASSERT(!op->IsRegister()); 1189 ASSERT(!op->IsRegister());
1190 ASSERT(!op->IsDoubleRegister()); 1190 ASSERT(!op->IsDoubleRegister());
1191 ASSERT(op->IsStackSlot() || op->IsDoubleStackSlot()); 1191 ASSERT(op->IsStackSlot() || op->IsDoubleStackSlot());
1192 return MemOperand(fp, StackSlotOffset(op->index())); 1192 return MemOperand(fp, StackSlotOffset(op->index()));
1193 } 1193 }
1194 1194
1195 1195
1196 Handle<Object> LCodeGen::ToHandle(LConstantOperand* op) const { 1196 Handle<Object> LCodeGen::ToHandle(LConstantOperand* op) const {
1197 HConstant* constant = chunk_->LookupConstant(op); 1197 HConstant* constant = chunk_->LookupConstant(op);
1198 ASSERT(chunk_->LookupLiteralRepresentation(op).IsSmiOrTagged()); 1198 ASSERT(chunk_->LookupLiteralRepresentation(op).IsSmiOrTagged());
1199 return constant->handle(); 1199 return constant->handle(isolate());
1200 } 1200 }
1201 1201
1202 1202
1203 bool LCodeGen::IsSmi(LConstantOperand* op) const { 1203 bool LCodeGen::IsSmi(LConstantOperand* op) const {
1204 return chunk_->LookupLiteralRepresentation(op).IsSmi(); 1204 return chunk_->LookupLiteralRepresentation(op).IsSmi();
1205 } 1205 }
1206 1206
1207 1207
1208 bool LCodeGen::IsInteger32Constant(LConstantOperand* op) const { 1208 bool LCodeGen::IsInteger32Constant(LConstantOperand* op) const {
1209 return op->IsConstantOperand() && 1209 return op->IsConstantOperand() &&
(...skipping 1199 matching lines...) Expand 10 before | Expand all | Expand 10 after
2409 __ Mov(ToRegister(instr->result()), instr->value()); 2409 __ Mov(ToRegister(instr->result()), instr->value());
2410 } 2410 }
2411 2411
2412 2412
2413 void LCodeGen::DoConstantS(LConstantS* instr) { 2413 void LCodeGen::DoConstantS(LConstantS* instr) {
2414 __ Mov(ToRegister(instr->result()), Operand(instr->value())); 2414 __ Mov(ToRegister(instr->result()), Operand(instr->value()));
2415 } 2415 }
2416 2416
2417 2417
2418 void LCodeGen::DoConstantT(LConstantT* instr) { 2418 void LCodeGen::DoConstantT(LConstantT* instr) {
2419 Handle<Object> value = instr->value(); 2419 Handle<Object> value = instr->value(isolate());
2420 AllowDeferredHandleDereference smi_check; 2420 AllowDeferredHandleDereference smi_check;
2421 __ LoadObject(ToRegister(instr->result()), value); 2421 __ LoadObject(ToRegister(instr->result()), value);
2422 } 2422 }
2423 2423
2424 2424
2425 void LCodeGen::DoContext(LContext* instr) { 2425 void LCodeGen::DoContext(LContext* instr) {
2426 // If there is a non-return use, the context must be moved to a register. 2426 // If there is a non-return use, the context must be moved to a register.
2427 Register result = ToRegister(instr->result()); 2427 Register result = ToRegister(instr->result());
2428 // TODO(jbramley): LContext is only generated if it meets this condition, so 2428 // TODO(jbramley): LContext is only generated if it meets this condition, so
2429 // why not move cp unconditionally? 2429 // why not move cp unconditionally?
(...skipping 3173 matching lines...) Expand 10 before | Expand all | Expand 10 after
5603 __ Bind(&out_of_object); 5603 __ Bind(&out_of_object);
5604 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); 5604 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset));
5605 // Index is equal to negated out of object property index plus 1. 5605 // Index is equal to negated out of object property index plus 1.
5606 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); 5606 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2));
5607 __ Ldr(result, FieldMemOperand(result, 5607 __ Ldr(result, FieldMemOperand(result,
5608 FixedArray::kHeaderSize - kPointerSize)); 5608 FixedArray::kHeaderSize - kPointerSize));
5609 __ Bind(&done); 5609 __ Bind(&done);
5610 } 5610 }
5611 5611
5612 } } // namespace v8::internal 5612 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/a64/lithium-a64.h ('k') | src/a64/stub-cache-a64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698