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

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

Issue 141203005: A64: Store/restore flags in deopt-every-n-times check (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 | « no previous file | 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 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 963 matching lines...) Expand 10 before | Expand all | Expand 10 after
974 974
975 if (entry == NULL) { 975 if (entry == NULL) {
976 Abort(kBailoutWasNotPrepared); 976 Abort(kBailoutWasNotPrepared);
977 return bailout_type; 977 return bailout_type;
978 } 978 }
979 979
980 if (FLAG_deopt_every_n_times != 0 && !info()->IsStub()) { 980 if (FLAG_deopt_every_n_times != 0 && !info()->IsStub()) {
981 Label not_zero; 981 Label not_zero;
982 ExternalReference count = ExternalReference::stress_deopt_count(isolate()); 982 ExternalReference count = ExternalReference::stress_deopt_count(isolate());
983 983
984 __ Push(x0, x1); 984 __ Push(x0, x1, x2);
985 __ Mrs(x2, NZCV);
985 __ Mov(x0, Operand(count)); 986 __ Mov(x0, Operand(count));
986 __ Ldr(w1, MemOperand(x0)); 987 __ Ldr(w1, MemOperand(x0));
987 __ Subs(x1, x1, 1); 988 __ Subs(x1, x1, 1);
988 __ B(gt, &not_zero); 989 __ B(gt, &not_zero);
989 __ Mov(w1, FLAG_deopt_every_n_times); 990 __ Mov(w1, FLAG_deopt_every_n_times);
990 __ Str(w1, MemOperand(x0)); 991 __ Str(w1, MemOperand(x0));
991 __ Pop(x0, x1); 992 __ Pop(x0, x1, x2);
992 ASSERT(frame_is_built_); 993 ASSERT(frame_is_built_);
993 __ Call(entry, RelocInfo::RUNTIME_ENTRY); 994 __ Call(entry, RelocInfo::RUNTIME_ENTRY);
994 __ Unreachable(); 995 __ Unreachable();
995 996
996 __ Bind(&not_zero); 997 __ Bind(&not_zero);
997 __ Str(w1, MemOperand(x0)); 998 __ Str(w1, MemOperand(x0));
998 __ Pop(x0, x1); 999 __ Msr(NZCV, x2);
1000 __ Pop(x0, x1, x2);
999 } 1001 }
1000 1002
1001 return bailout_type; 1003 return bailout_type;
1002 } 1004 }
1003 1005
1004 1006
1005 void LCodeGen::Deoptimize(LEnvironment* environment, 1007 void LCodeGen::Deoptimize(LEnvironment* environment,
1006 Deoptimizer::BailoutType bailout_type) { 1008 Deoptimizer::BailoutType bailout_type) {
1007 ASSERT(environment->HasBeenRegistered()); 1009 ASSERT(environment->HasBeenRegistered());
1008 ASSERT(info()->IsOptimizing() || info()->IsStub()); 1010 ASSERT(info()->IsOptimizing() || info()->IsStub());
(...skipping 4684 matching lines...) Expand 10 before | Expand all | Expand 10 after
5693 __ Bind(&out_of_object); 5695 __ Bind(&out_of_object);
5694 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); 5696 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset));
5695 // Index is equal to negated out of object property index plus 1. 5697 // Index is equal to negated out of object property index plus 1.
5696 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); 5698 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2));
5697 __ Ldr(result, FieldMemOperand(result, 5699 __ Ldr(result, FieldMemOperand(result,
5698 FixedArray::kHeaderSize - kPointerSize)); 5700 FixedArray::kHeaderSize - kPointerSize));
5699 __ Bind(&done); 5701 __ Bind(&done);
5700 } 5702 }
5701 5703
5702 } } // namespace v8::internal 5704 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698