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

Side by Side Diff: src/mips/lithium-mips.cc

Issue 25567002: MIPS: Lazily save double registers for HCallRuntime instructions within Hydrogen code stubs. (Closed) Base URL: https://github.com/v8/v8.git@gbl
Patch Set: Created 7 years, 2 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
« no previous file with comments | « src/mips/lithium-mips.h ('k') | src/mips/macro-assembler-mips.h » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 849 matching lines...) Expand 10 before | Expand all | Expand 10 after
860 } 860 }
861 861
862 862
863 void LChunkBuilder::VisitInstruction(HInstruction* current) { 863 void LChunkBuilder::VisitInstruction(HInstruction* current) {
864 HInstruction* old_current = current_instruction_; 864 HInstruction* old_current = current_instruction_;
865 current_instruction_ = current; 865 current_instruction_ = current;
866 if (current->has_position()) position_ = current->position(); 866 if (current->has_position()) position_ = current->position();
867 LInstruction* instr = current->CompileToLithium(this); 867 LInstruction* instr = current->CompileToLithium(this);
868 868
869 if (instr != NULL) { 869 if (instr != NULL) {
870 // Associate the hydrogen instruction first, since we may need it for
871 // the ClobbersRegisters() or ClobbersDoubleRegisters() calls below.
872 instr->set_hydrogen_value(current);
873
870 #if DEBUG 874 #if DEBUG
871 // Make sure that the lithium instruction has either no fixed register 875 // Make sure that the lithium instruction has either no fixed register
872 // constraints in temps or the result OR no uses that are only used at 876 // constraints in temps or the result OR no uses that are only used at
873 // start. If this invariant doesn't hold, the register allocator can decide 877 // start. If this invariant doesn't hold, the register allocator can decide
874 // to insert a split of a range immediately before the instruction due to an 878 // to insert a split of a range immediately before the instruction due to an
875 // already allocated register needing to be used for the instruction's fixed 879 // already allocated register needing to be used for the instruction's fixed
876 // register constraint. In this case, The register allocator won't see an 880 // register constraint. In this case, The register allocator won't see an
877 // interference between the split child and the use-at-start (it would if 881 // interference between the split child and the use-at-start (it would if
878 // the it was just a plain use), so it is free to move the split child into 882 // the it was just a plain use), so it is free to move the split child into
879 // the same register that is used for the use-at-start. 883 // the same register that is used for the use-at-start.
(...skipping 16 matching lines...) Expand all
896 } 900 }
897 #endif 901 #endif
898 902
899 instr->set_position(position_); 903 instr->set_position(position_);
900 if (FLAG_stress_pointer_maps && !instr->HasPointerMap()) { 904 if (FLAG_stress_pointer_maps && !instr->HasPointerMap()) {
901 instr = AssignPointerMap(instr); 905 instr = AssignPointerMap(instr);
902 } 906 }
903 if (FLAG_stress_environments && !instr->HasEnvironment()) { 907 if (FLAG_stress_environments && !instr->HasEnvironment()) {
904 instr = AssignEnvironment(instr); 908 instr = AssignEnvironment(instr);
905 } 909 }
906 instr->set_hydrogen_value(current);
907 chunk_->AddInstruction(instr, current_block_); 910 chunk_->AddInstruction(instr, current_block_);
908 } 911 }
909 current_instruction_ = old_current; 912 current_instruction_ = old_current;
910 } 913 }
911 914
912 915
913 LEnvironment* LChunkBuilder::CreateEnvironment( 916 LEnvironment* LChunkBuilder::CreateEnvironment(
914 HEnvironment* hydrogen_env, 917 HEnvironment* hydrogen_env,
915 int* argument_index_accumulator, 918 int* argument_index_accumulator,
916 ZoneList<HValue*>* objects_to_materialize) { 919 ZoneList<HValue*>* objects_to_materialize) {
(...skipping 1614 matching lines...) Expand 10 before | Expand all | Expand 10 after
2531 2534
2532 2535
2533 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2536 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2534 LOperand* object = UseRegister(instr->object()); 2537 LOperand* object = UseRegister(instr->object());
2535 LOperand* index = UseRegister(instr->index()); 2538 LOperand* index = UseRegister(instr->index());
2536 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); 2539 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index));
2537 } 2540 }
2538 2541
2539 2542
2540 } } // namespace v8::internal 2543 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips/lithium-mips.h ('k') | src/mips/macro-assembler-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698