OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/compiler/code-generator.h" | 5 #include "src/compiler/code-generator.h" |
6 | 6 |
7 #include "src/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
8 #include "src/compiler/code-generator-impl.h" | 8 #include "src/compiler/code-generator-impl.h" |
9 #include "src/compiler/gap-resolver.h" | 9 #include "src/compiler/gap-resolver.h" |
10 #include "src/compiler/node-matchers.h" | 10 #include "src/compiler/node-matchers.h" |
(...skipping 1035 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1046 } else { | 1046 } else { |
1047 __ Cvttss2si(i.OutputRegister(), i.InputOperand(0)); | 1047 __ Cvttss2si(i.OutputRegister(), i.InputOperand(0)); |
1048 } | 1048 } |
1049 break; | 1049 break; |
1050 case kSSEFloat32ToUint32: { | 1050 case kSSEFloat32ToUint32: { |
1051 if (instr->InputAt(0)->IsDoubleRegister()) { | 1051 if (instr->InputAt(0)->IsDoubleRegister()) { |
1052 __ Cvttss2siq(i.OutputRegister(), i.InputDoubleRegister(0)); | 1052 __ Cvttss2siq(i.OutputRegister(), i.InputDoubleRegister(0)); |
1053 } else { | 1053 } else { |
1054 __ Cvttss2siq(i.OutputRegister(), i.InputOperand(0)); | 1054 __ Cvttss2siq(i.OutputRegister(), i.InputOperand(0)); |
1055 } | 1055 } |
1056 __ AssertZeroExtended(i.OutputRegister()); | |
1057 break; | 1056 break; |
1058 } | 1057 } |
1059 case kSSEFloat64Cmp: | 1058 case kSSEFloat64Cmp: |
1060 ASSEMBLE_SSE_BINOP(Ucomisd); | 1059 ASSEMBLE_SSE_BINOP(Ucomisd); |
1061 break; | 1060 break; |
1062 case kSSEFloat64Add: | 1061 case kSSEFloat64Add: |
1063 ASSEMBLE_SSE_BINOP(addsd); | 1062 ASSEMBLE_SSE_BINOP(addsd); |
1064 break; | 1063 break; |
1065 case kSSEFloat64Sub: | 1064 case kSSEFloat64Sub: |
1066 ASSEMBLE_SSE_BINOP(subsd); | 1065 ASSEMBLE_SSE_BINOP(subsd); |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1145 } else { | 1144 } else { |
1146 __ Cvttsd2si(i.OutputRegister(), i.InputOperand(0)); | 1145 __ Cvttsd2si(i.OutputRegister(), i.InputOperand(0)); |
1147 } | 1146 } |
1148 break; | 1147 break; |
1149 case kSSEFloat64ToUint32: { | 1148 case kSSEFloat64ToUint32: { |
1150 if (instr->InputAt(0)->IsDoubleRegister()) { | 1149 if (instr->InputAt(0)->IsDoubleRegister()) { |
1151 __ Cvttsd2siq(i.OutputRegister(), i.InputDoubleRegister(0)); | 1150 __ Cvttsd2siq(i.OutputRegister(), i.InputDoubleRegister(0)); |
1152 } else { | 1151 } else { |
1153 __ Cvttsd2siq(i.OutputRegister(), i.InputOperand(0)); | 1152 __ Cvttsd2siq(i.OutputRegister(), i.InputOperand(0)); |
1154 } | 1153 } |
1155 __ AssertZeroExtended(i.OutputRegister()); | 1154 if (MiscField::decode(instr->opcode())) { |
| 1155 __ AssertZeroExtended(i.OutputRegister()); |
| 1156 } |
1156 break; | 1157 break; |
1157 } | 1158 } |
1158 case kSSEFloat32ToInt64: | 1159 case kSSEFloat32ToInt64: |
1159 if (instr->InputAt(0)->IsDoubleRegister()) { | 1160 if (instr->InputAt(0)->IsDoubleRegister()) { |
1160 __ Cvttss2siq(i.OutputRegister(), i.InputDoubleRegister(0)); | 1161 __ Cvttss2siq(i.OutputRegister(), i.InputDoubleRegister(0)); |
1161 } else { | 1162 } else { |
1162 __ Cvttss2siq(i.OutputRegister(), i.InputOperand(0)); | 1163 __ Cvttss2siq(i.OutputRegister(), i.InputOperand(0)); |
1163 } | 1164 } |
1164 if (instr->OutputCount() > 1) { | 1165 if (instr->OutputCount() > 1) { |
1165 __ Set(i.OutputRegister(1), 1); | 1166 __ Set(i.OutputRegister(1), 1); |
(...skipping 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2245 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; | 2246 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |
2246 __ Nop(padding_size); | 2247 __ Nop(padding_size); |
2247 } | 2248 } |
2248 } | 2249 } |
2249 | 2250 |
2250 #undef __ | 2251 #undef __ |
2251 | 2252 |
2252 } // namespace compiler | 2253 } // namespace compiler |
2253 } // namespace internal | 2254 } // namespace internal |
2254 } // namespace v8 | 2255 } // namespace v8 |
OLD | NEW |