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

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

Issue 23068038: Fix phis for non-sse2 double values (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: address comment & rebase Created 7 years, 3 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/ia32/lithium-ia32.h ('k') | 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 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 936 matching lines...) Expand 10 before | Expand all | Expand 10 after
947 } 947 }
948 #endif 948 #endif
949 949
950 instr->set_position(position_); 950 instr->set_position(position_);
951 if (FLAG_stress_pointer_maps && !instr->HasPointerMap()) { 951 if (FLAG_stress_pointer_maps && !instr->HasPointerMap()) {
952 instr = AssignPointerMap(instr); 952 instr = AssignPointerMap(instr);
953 } 953 }
954 if (FLAG_stress_environments && !instr->HasEnvironment()) { 954 if (FLAG_stress_environments && !instr->HasEnvironment()) {
955 instr = AssignEnvironment(instr); 955 instr = AssignEnvironment(instr);
956 } 956 }
957 if (!CpuFeatures::IsSafeForSnapshot(SSE2) && instr->IsGoto() &&
958 LGoto::cast(instr)->jumps_to_join()) {
959 // TODO(olivf) Since phis of spilled values are joined as registers
960 // (not in the stack slot), we need to allow the goto gaps to keep one
961 // x87 register alive. To ensure all other values are still spilled, we
962 // insert a fpu register barrier right before.
963 LClobberDoubles* clobber = new(zone()) LClobberDoubles();
964 clobber->set_hydrogen_value(current);
965 chunk_->AddInstruction(clobber, current_block_);
966 }
957 instr->set_hydrogen_value(current); 967 instr->set_hydrogen_value(current);
958 chunk_->AddInstruction(instr, current_block_); 968 chunk_->AddInstruction(instr, current_block_);
959 } 969 }
960 current_instruction_ = old_current; 970 current_instruction_ = old_current;
961 } 971 }
962 972
963 973
964 LEnvironment* LChunkBuilder::CreateEnvironment( 974 LEnvironment* LChunkBuilder::CreateEnvironment(
965 HEnvironment* hydrogen_env, 975 HEnvironment* hydrogen_env,
966 int* argument_index_accumulator, 976 int* argument_index_accumulator,
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
1039 1049
1040 if (hydrogen_env->frame_type() == JS_FUNCTION) { 1050 if (hydrogen_env->frame_type() == JS_FUNCTION) {
1041 *argument_index_accumulator = argument_index; 1051 *argument_index_accumulator = argument_index;
1042 } 1052 }
1043 1053
1044 return result; 1054 return result;
1045 } 1055 }
1046 1056
1047 1057
1048 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) { 1058 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) {
1049 return new(zone()) LGoto(instr->FirstSuccessor()->block_id()); 1059 return new(zone()) LGoto(instr->FirstSuccessor());
1050 } 1060 }
1051 1061
1052 1062
1053 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { 1063 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) {
1054 HValue* value = instr->value(); 1064 HValue* value = instr->value();
1055 if (value->EmitAtUses()) { 1065 if (value->EmitAtUses()) {
1056 ASSERT(value->IsConstant()); 1066 ASSERT(value->IsConstant());
1057 ASSERT(!value->representation().IsDouble()); 1067 ASSERT(!value->representation().IsDouble());
1058 HBasicBlock* successor = HConstant::cast(value)->BooleanValue() 1068 HBasicBlock* successor = HConstant::cast(value)->BooleanValue()
1059 ? instr->FirstSuccessor() 1069 ? instr->FirstSuccessor()
1060 : instr->SecondSuccessor(); 1070 : instr->SecondSuccessor();
1061 return new(zone()) LGoto(successor->block_id()); 1071 return new(zone()) LGoto(successor);
1062 } 1072 }
1063 1073
1064 ToBooleanStub::Types expected = instr->expected_input_types(); 1074 ToBooleanStub::Types expected = instr->expected_input_types();
1065 1075
1066 // Tagged values that are not known smis or booleans require a 1076 // Tagged values that are not known smis or booleans require a
1067 // deoptimization environment. If the instruction is generic no 1077 // deoptimization environment. If the instruction is generic no
1068 // environment is needed since all cases are handled. 1078 // environment is needed since all cases are handled.
1069 Representation rep = value->representation(); 1079 Representation rep = value->representation();
1070 HType type = value->type(); 1080 HType type = value->type();
1071 if (!rep.IsTagged() || type.IsSmi() || type.IsBoolean()) { 1081 if (!rep.IsTagged() || type.IsSmi() || type.IsBoolean()) {
(...skipping 1662 matching lines...) Expand 10 before | Expand all | Expand 10 after
2734 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2744 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2735 LOperand* object = UseRegister(instr->object()); 2745 LOperand* object = UseRegister(instr->object());
2736 LOperand* index = UseTempRegister(instr->index()); 2746 LOperand* index = UseTempRegister(instr->index());
2737 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); 2747 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index));
2738 } 2748 }
2739 2749
2740 2750
2741 } } // namespace v8::internal 2751 } } // namespace v8::internal
2742 2752
2743 #endif // V8_TARGET_ARCH_IA32 2753 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698