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

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

Issue 1250733005: SIMD.js Add the other SIMD Phase 1 types. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Don't run downloaded SIMD value type tests. Created 5 years, 4 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/code-stubs-mips.cc ('k') | src/mips64/code-stubs-mips64.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 2012 the V8 project authors. All rights reserved.7 1 // Copyright 2012 the V8 project authors. All rights reserved.7
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 2165 matching lines...) Expand 10 before | Expand all | Expand 10 after
2176 2176
2177 if (expected.Contains(ToBooleanStub::SYMBOL)) { 2177 if (expected.Contains(ToBooleanStub::SYMBOL)) {
2178 // Symbol value -> true. 2178 // Symbol value -> true.
2179 const Register scratch = scratch1(); 2179 const Register scratch = scratch1();
2180 __ lbu(scratch, FieldMemOperand(map, Map::kInstanceTypeOffset)); 2180 __ lbu(scratch, FieldMemOperand(map, Map::kInstanceTypeOffset));
2181 __ Branch(instr->TrueLabel(chunk_), eq, scratch, Operand(SYMBOL_TYPE)); 2181 __ Branch(instr->TrueLabel(chunk_), eq, scratch, Operand(SYMBOL_TYPE));
2182 } 2182 }
2183 2183
2184 if (expected.Contains(ToBooleanStub::SIMD_VALUE)) { 2184 if (expected.Contains(ToBooleanStub::SIMD_VALUE)) {
2185 // SIMD value -> true. 2185 // SIMD value -> true.
2186 Label not_simd;
2186 const Register scratch = scratch1(); 2187 const Register scratch = scratch1();
2187 __ lbu(scratch, FieldMemOperand(map, Map::kInstanceTypeOffset)); 2188 __ lbu(scratch, FieldMemOperand(map, Map::kInstanceTypeOffset));
2188 __ Branch(instr->TrueLabel(chunk_), eq, scratch, 2189 __ Branch(&not_simd, lt, at, Operand(FIRST_SIMD_VALUE_TYPE));
2189 Operand(FLOAT32X4_TYPE)); 2190 __ Branch(instr->TrueLabel(chunk_), le, scratch,
2191 Operand(LAST_SIMD_VALUE_TYPE));
2192 __ bind(&not_simd);
2190 } 2193 }
2191 2194
2192 if (expected.Contains(ToBooleanStub::HEAP_NUMBER)) { 2195 if (expected.Contains(ToBooleanStub::HEAP_NUMBER)) {
2193 // heap number -> false iff +0, -0, or NaN. 2196 // heap number -> false iff +0, -0, or NaN.
2194 DoubleRegister dbl_scratch = double_scratch0(); 2197 DoubleRegister dbl_scratch = double_scratch0();
2195 Label not_heap_number; 2198 Label not_heap_number;
2196 __ LoadRoot(at, Heap::kHeapNumberMapRootIndex); 2199 __ LoadRoot(at, Heap::kHeapNumberMapRootIndex);
2197 __ Branch(&not_heap_number, ne, map, Operand(at)); 2200 __ Branch(&not_heap_number, ne, map, Operand(at));
2198 __ ldc1(dbl_scratch, FieldMemOperand(reg, HeapNumber::kValueOffset)); 2201 __ ldc1(dbl_scratch, FieldMemOperand(reg, HeapNumber::kValueOffset));
2199 __ BranchF(instr->TrueLabel(chunk_), instr->FalseLabel(chunk_), 2202 __ BranchF(instr->TrueLabel(chunk_), instr->FalseLabel(chunk_),
(...skipping 3541 matching lines...) Expand 10 before | Expand all | Expand 10 after
5741 *cmp2 = Operand(zero_reg); 5744 *cmp2 = Operand(zero_reg);
5742 final_branch_condition = eq; 5745 final_branch_condition = eq;
5743 5746
5744 } else if (String::Equals(type_name, factory->float32x4_string())) { 5747 } else if (String::Equals(type_name, factory->float32x4_string())) {
5745 __ JumpIfSmi(input, false_label); 5748 __ JumpIfSmi(input, false_label);
5746 __ GetObjectType(input, input, scratch); 5749 __ GetObjectType(input, input, scratch);
5747 *cmp1 = scratch; 5750 *cmp1 = scratch;
5748 *cmp2 = Operand(FLOAT32X4_TYPE); 5751 *cmp2 = Operand(FLOAT32X4_TYPE);
5749 final_branch_condition = eq; 5752 final_branch_condition = eq;
5750 5753
5754 } else if (String::Equals(type_name, factory->int32x4_string())) {
5755 __ JumpIfSmi(input, false_label);
5756 __ GetObjectType(input, input, scratch);
5757 *cmp1 = scratch;
5758 *cmp2 = Operand(INT32X4_TYPE);
5759 final_branch_condition = eq;
5760
5761 } else if (String::Equals(type_name, factory->bool32x4_string())) {
5762 __ JumpIfSmi(input, false_label);
5763 __ GetObjectType(input, input, scratch);
5764 *cmp1 = scratch;
5765 *cmp2 = Operand(BOOL32X4_TYPE);
5766 final_branch_condition = eq;
5767
5768 } else if (String::Equals(type_name, factory->int16x8_string())) {
5769 __ JumpIfSmi(input, false_label);
5770 __ GetObjectType(input, input, scratch);
5771 *cmp1 = scratch;
5772 *cmp2 = Operand(INT16X8_TYPE);
5773 final_branch_condition = eq;
5774
5775 } else if (String::Equals(type_name, factory->bool16x8_string())) {
5776 __ JumpIfSmi(input, false_label);
5777 __ GetObjectType(input, input, scratch);
5778 *cmp1 = scratch;
5779 *cmp2 = Operand(BOOL16X8_TYPE);
5780 final_branch_condition = eq;
5781
5782 } else if (String::Equals(type_name, factory->int8x16_string())) {
5783 __ JumpIfSmi(input, false_label);
5784 __ GetObjectType(input, input, scratch);
5785 *cmp1 = scratch;
5786 *cmp2 = Operand(INT8X16_TYPE);
5787 final_branch_condition = eq;
5788
5789 } else if (String::Equals(type_name, factory->bool8x16_string())) {
5790 __ JumpIfSmi(input, false_label);
5791 __ GetObjectType(input, input, scratch);
5792 *cmp1 = scratch;
5793 *cmp2 = Operand(BOOL8X16_TYPE);
5794 final_branch_condition = eq;
5795
5751 } else { 5796 } else {
5752 *cmp1 = at; 5797 *cmp1 = at;
5753 *cmp2 = Operand(zero_reg); // Set to valid regs, to avoid caller assertion. 5798 *cmp2 = Operand(zero_reg); // Set to valid regs, to avoid caller assertion.
5754 __ Branch(false_label); 5799 __ Branch(false_label);
5755 } 5800 }
5756 5801
5757 return final_branch_condition; 5802 return final_branch_condition;
5758 } 5803 }
5759 5804
5760 5805
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
6059 __ Push(at, ToRegister(instr->function())); 6104 __ Push(at, ToRegister(instr->function()));
6060 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6105 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6061 RecordSafepoint(Safepoint::kNoLazyDeopt); 6106 RecordSafepoint(Safepoint::kNoLazyDeopt);
6062 } 6107 }
6063 6108
6064 6109
6065 #undef __ 6110 #undef __
6066 6111
6067 } // namespace internal 6112 } // namespace internal
6068 } // namespace v8 6113 } // namespace v8
OLDNEW
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | src/mips64/code-stubs-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698