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

Side by Side Diff: src/builtins/builtins-sharedarraybuffer.cc

Issue 2733953004: PPC/s390: [Atomics] Make Atomics.exchange a builtin using TF (Closed)
Patch Set: minor fix Created 3 years, 9 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 | « no previous file | src/compiler/ppc/code-generator-ppc.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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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/builtins/builtins-utils.h" 5 #include "src/builtins/builtins-utils.h"
6 #include "src/builtins/builtins.h" 6 #include "src/builtins/builtins.h"
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/code-stub-assembler.h" 8 #include "src/code-stub-assembler.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 284
285 Node* index_integer; 285 Node* index_integer;
286 Node* index_word32 = 286 Node* index_word32 =
287 ConvertTaggedAtomicIndexToWord32(&a, index, context, &index_integer); 287 ConvertTaggedAtomicIndexToWord32(&a, index, context, &index_integer);
288 Node* array_length_word32 = a.TruncateTaggedToWord32( 288 Node* array_length_word32 = a.TruncateTaggedToWord32(
289 context, a.LoadObjectField(array, JSTypedArray::kLengthOffset)); 289 context, a.LoadObjectField(array, JSTypedArray::kLengthOffset));
290 ValidateAtomicIndex(&a, index_word32, array_length_word32, context); 290 ValidateAtomicIndex(&a, index_word32, array_length_word32, context);
291 291
292 Node* value_integer = a.ToInteger(context, value); 292 Node* value_integer = a.ToInteger(context, value);
293 293
294 #if V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64 294 #if V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64 || V8_TARGET_ARCH_PPC64 || \
295 V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_S390 || V8_TARGET_ARCH_S390X
295 // Node* index_integer = a.ToInteger(context, index); 296 // Node* index_integer = a.ToInteger(context, index);
296 a.Return(a.CallRuntime(Runtime::kAtomicsExchange, context, array, 297 a.Return(a.CallRuntime(Runtime::kAtomicsExchange, context, array,
297 index_integer, value_integer)); 298 index_integer, value_integer));
298 #else 299 #else
299 Node* index_word = a.ChangeUint32ToWord(index_word32); 300 Node* index_word = a.ChangeUint32ToWord(index_word32);
300 301
301 Node* value_word32 = a.TruncateTaggedToWord32(context, value_integer); 302 Node* value_word32 = a.TruncateTaggedToWord32(context, value_integer);
302 303
303 CodeStubAssembler::Label i8(&a), u8(&a), i16(&a), u16(&a), i32(&a), u32(&a), 304 CodeStubAssembler::Label i8(&a), u8(&a), i16(&a), u16(&a), i32(&a), u32(&a),
304 other(&a); 305 other(&a);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 a.WordShl(index_word, 2), value_word32))); 337 a.WordShl(index_word, 2), value_word32)));
337 338
338 a.Bind(&u32); 339 a.Bind(&u32);
339 a.Return(a.ChangeUint32ToTagged( 340 a.Return(a.ChangeUint32ToTagged(
340 a.AtomicExchange(MachineType::Uint32(), backing_store, 341 a.AtomicExchange(MachineType::Uint32(), backing_store,
341 a.WordShl(index_word, 2), value_word32))); 342 a.WordShl(index_word, 2), value_word32)));
342 343
343 // This shouldn't happen, we've already validated the type. 344 // This shouldn't happen, we've already validated the type.
344 a.Bind(&other); 345 a.Bind(&other);
345 a.Return(a.SmiConstant(0)); 346 a.Return(a.SmiConstant(0));
346 #endif // V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64 347 #endif // V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64 || V8_TARGET_ARCH_PPC64
348 // || V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_S390 || V8_TARGET_ARCH_S390X
347 } 349 }
348 350
349 } // namespace internal 351 } // namespace internal
350 } // namespace v8 352 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/ppc/code-generator-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698