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

Side by Side Diff: runtime/vm/intermediate_language_arm.cc

Issue 19779006: Enables more SIMD tests for ARM. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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 | tests/lib/lib.status » ('j') | tests/lib/lib.status » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM.
6 #if defined(TARGET_ARCH_ARM) 6 #if defined(TARGET_ARCH_ARM)
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "lib/error.h" 10 #include "lib/error.h"
(...skipping 3053 matching lines...) Expand 10 before | Expand all | Expand 10 after
3064 3064
3065 // Convert to Float32. 3065 // Convert to Float32.
3066 __ vcvtsd(STMP, dvalue0); 3066 __ vcvtsd(STMP, dvalue0);
3067 3067
3068 // Splat across all lanes. 3068 // Splat across all lanes.
3069 __ vdup(kWord, result, DTMP, 0); 3069 __ vdup(kWord, result, DTMP, 0);
3070 } 3070 }
3071 3071
3072 3072
3073 LocationSummary* Float32x4ComparisonInstr::MakeLocationSummary() const { 3073 LocationSummary* Float32x4ComparisonInstr::MakeLocationSummary() const {
3074 UNIMPLEMENTED(); 3074 const intptr_t kNumInputs = 2;
3075 return NULL; 3075 const intptr_t kNumTemps = 0;
3076 LocationSummary* summary =
3077 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
3078 summary->set_in(0, Location::RequiresFpuRegister());
3079 summary->set_in(1, Location::RequiresFpuRegister());
3080 summary->set_out(Location::RequiresFpuRegister());
3081 return summary;
3076 } 3082 }
3077 3083
3078 3084
3079 void Float32x4ComparisonInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 3085 void Float32x4ComparisonInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
3080 UNIMPLEMENTED(); 3086 QRegister left = locs()->in(0).fpu_reg();
3087 QRegister right = locs()->in(1).fpu_reg();
3088 QRegister result = locs()->out().fpu_reg();
3089
3090 switch (op_kind()) {
3091 case MethodRecognizer::kFloat32x4Equal:
3092 __ vceqqs(result, left, right);
3093 break;
3094 case MethodRecognizer::kFloat32x4NotEqual:
3095 __ vceqqs(result, left, right);
3096 // Invert the result.
3097 __ veorq(QTMP, QTMP, QTMP); // QTMP <- 0.
3098 __ vornq(result, QTMP, result); // result <- ~result.
3099 break;
3100 case MethodRecognizer::kFloat32x4GreaterThan:
3101 __ vcgtqs(result, left, right);
3102 break;
3103 case MethodRecognizer::kFloat32x4GreaterThanOrEqual:
3104 __ vcgeqs(result, left, right);
3105 break;
3106 case MethodRecognizer::kFloat32x4LessThan:
3107 __ vcgtqs(result, right, left);
3108 break;
3109 case MethodRecognizer::kFloat32x4LessThanOrEqual:
3110 __ vcgeqs(result, right, left);
3111 break;
3112
3113 default: UNREACHABLE();
3114 }
3081 } 3115 }
3082 3116
3083 3117
3084 LocationSummary* Float32x4MinMaxInstr::MakeLocationSummary() const { 3118 LocationSummary* Float32x4MinMaxInstr::MakeLocationSummary() const {
3085 UNIMPLEMENTED(); 3119 UNIMPLEMENTED();
3086 return NULL; 3120 return NULL;
3087 } 3121 }
3088 3122
3089 3123
3090 void Float32x4MinMaxInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 3124 void Float32x4MinMaxInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
3130 return NULL; 3164 return NULL;
3131 } 3165 }
3132 3166
3133 3167
3134 void Float32x4ClampInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 3168 void Float32x4ClampInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
3135 UNIMPLEMENTED(); 3169 UNIMPLEMENTED();
3136 } 3170 }
3137 3171
3138 3172
3139 LocationSummary* Float32x4WithInstr::MakeLocationSummary() const { 3173 LocationSummary* Float32x4WithInstr::MakeLocationSummary() const {
3140 UNIMPLEMENTED(); 3174 const intptr_t kNumInputs = 2;
3141 return NULL; 3175 const intptr_t kNumTemps = 0;
3176 LocationSummary* summary =
3177 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
3178 summary->set_in(0, Location::RequiresFpuRegister());
3179 summary->set_in(1, Location::RequiresFpuRegister());
3180 summary->set_out(Location::RequiresFpuRegister());
3181 return summary;
3142 } 3182 }
3143 3183
3144 3184
3145 void Float32x4WithInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 3185 void Float32x4WithInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
3146 UNIMPLEMENTED(); 3186 QRegister replacement = locs()->in(0).fpu_reg();
3187 QRegister value = locs()->in(1).fpu_reg();
3188 QRegister result = locs()->out().fpu_reg();
3189
3190 DRegister dresult0 = EvenDRegisterOf(result);
3191 DRegister dresult1 = OddDRegisterOf(result);
3192 SRegister sresult0 = EvenSRegisterOf(dresult0);
3193 SRegister sresult1 = OddSRegisterOf(dresult0);
3194 SRegister sresult2 = EvenSRegisterOf(dresult1);
3195 SRegister sresult3 = OddSRegisterOf(dresult1);
3196
3197 __ vcvtsd(STMP, EvenDRegisterOf(replacement));
3198 if (result != value) {
3199 __ vmovq(result, value);
3200 }
3201
3202 switch (op_kind()) {
3203 case MethodRecognizer::kFloat32x4WithX:
3204 __ vmovs(sresult0, STMP);
3205 break;
3206 case MethodRecognizer::kFloat32x4WithY:
3207 __ vmovs(sresult1, STMP);
3208 break;
3209 case MethodRecognizer::kFloat32x4WithZ:
3210 __ vmovs(sresult2, STMP);
3211 break;
3212 case MethodRecognizer::kFloat32x4WithW:
3213 __ vmovs(sresult3, STMP);
3214 break;
3215 default: UNREACHABLE();
3216 }
3147 } 3217 }
3148 3218
3149 3219
3150 LocationSummary* Float32x4ToUint32x4Instr::MakeLocationSummary() const { 3220 LocationSummary* Float32x4ToUint32x4Instr::MakeLocationSummary() const {
3151 UNIMPLEMENTED(); 3221 UNIMPLEMENTED();
3152 return NULL; 3222 return NULL;
3153 } 3223 }
3154 3224
3155 3225
3156 void Float32x4ToUint32x4Instr::EmitNativeCode(FlowGraphCompiler* compiler) { 3226 void Float32x4ToUint32x4Instr::EmitNativeCode(FlowGraphCompiler* compiler) {
3157 UNIMPLEMENTED(); 3227 UNIMPLEMENTED();
3158 } 3228 }
3159 3229
3160 3230
3161 LocationSummary* Uint32x4BoolConstructorInstr::MakeLocationSummary() const { 3231 LocationSummary* Uint32x4BoolConstructorInstr::MakeLocationSummary() const {
3162 UNIMPLEMENTED(); 3232 UNIMPLEMENTED();
3163 return NULL; 3233 return NULL;
3164 } 3234 }
3165 3235
3166 3236
3167 void Uint32x4BoolConstructorInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 3237 void Uint32x4BoolConstructorInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
3168 UNIMPLEMENTED(); 3238 UNIMPLEMENTED();
3169 } 3239 }
3170 3240
3171 3241
3172 LocationSummary* Uint32x4GetFlagInstr::MakeLocationSummary() const { 3242 LocationSummary* Uint32x4GetFlagInstr::MakeLocationSummary() const {
3173 UNIMPLEMENTED(); 3243 const intptr_t kNumInputs = 1;
3174 return NULL; 3244 const intptr_t kNumTemps = 0;
3245 LocationSummary* summary =
3246 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
3247 summary->set_in(0, Location::RequiresFpuRegister());
3248 summary->set_out(Location::RequiresRegister());
3249 return summary;
3175 } 3250 }
3176 3251
3177 3252
3178 void Uint32x4GetFlagInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 3253 void Uint32x4GetFlagInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
3179 UNIMPLEMENTED(); 3254 QRegister value = locs()->in(0).fpu_reg();
3255 Register result = locs()->out().reg();
3256
3257 DRegister dvalue0 = EvenDRegisterOf(value);
3258 DRegister dvalue1 = OddDRegisterOf(value);
3259 SRegister svalue0 = EvenSRegisterOf(dvalue0);
3260 SRegister svalue1 = OddSRegisterOf(dvalue0);
3261 SRegister svalue2 = EvenSRegisterOf(dvalue1);
3262 SRegister svalue3 = OddSRegisterOf(dvalue1);
3263
3264 switch (op_kind()) {
3265 case MethodRecognizer::kUint32x4GetFlagX:
3266 __ vmovrs(result, svalue0);
3267 break;
3268 case MethodRecognizer::kUint32x4GetFlagY:
3269 __ vmovrs(result, svalue1);
3270 break;
3271 case MethodRecognizer::kUint32x4GetFlagZ:
3272 __ vmovrs(result, svalue2);
3273 break;
3274 case MethodRecognizer::kUint32x4GetFlagW:
3275 __ vmovrs(result, svalue3);
3276 break;
3277 default: UNREACHABLE();
3278 }
3279
3280 __ tst(result, ShifterOperand(result));
3281 __ LoadObject(result, Bool::True(), NE);
3282 __ LoadObject(result, Bool::False(), EQ);
3180 } 3283 }
3181 3284
3285
3182 LocationSummary* Uint32x4SelectInstr::MakeLocationSummary() const { 3286 LocationSummary* Uint32x4SelectInstr::MakeLocationSummary() const {
3183 UNIMPLEMENTED(); 3287 UNIMPLEMENTED();
3184 return NULL; 3288 return NULL;
3185 } 3289 }
3186 3290
3187 3291
3188 void Uint32x4SelectInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 3292 void Uint32x4SelectInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
3189 UNIMPLEMENTED(); 3293 UNIMPLEMENTED();
3190 } 3294 }
3191 3295
(...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after
3951 compiler->GenerateCall(token_pos(), 4055 compiler->GenerateCall(token_pos(),
3952 &label, 4056 &label,
3953 PcDescriptors::kOther, 4057 PcDescriptors::kOther,
3954 locs()); 4058 locs());
3955 __ Drop(2); // Discard type arguments and receiver. 4059 __ Drop(2); // Discard type arguments and receiver.
3956 } 4060 }
3957 4061
3958 } // namespace dart 4062 } // namespace dart
3959 4063
3960 #endif // defined TARGET_ARCH_ARM 4064 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | tests/lib/lib.status » ('j') | tests/lib/lib.status » ('J')

Powered by Google App Engine
This is Rietveld 408576698