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

Side by Side Diff: src/ia32/macro-assembler-ia32.h

Issue 1617503003: [Atomics] code stubs for atomic operations (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: merge master + reduce kSlotIndexBits Created 4 years, 8 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/ia32/interface-descriptors-ia32.cc ('k') | src/interface-descriptors.h » ('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. 1 // Copyright 2012 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 #ifndef V8_IA32_MACRO_ASSEMBLER_IA32_H_ 5 #ifndef V8_IA32_MACRO_ASSEMBLER_IA32_H_
6 #define V8_IA32_MACRO_ASSEMBLER_IA32_H_ 6 #define V8_IA32_MACRO_ASSEMBLER_IA32_H_
7 7
8 #include "src/assembler.h" 8 #include "src/assembler.h"
9 #include "src/bailout-reason.h" 9 #include "src/bailout-reason.h"
10 #include "src/frames.h" 10 #include "src/frames.h"
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 test(value, Immediate(kSmiTagMask)); 504 test(value, Immediate(kSmiTagMask));
505 j(zero, smi_label, distance); 505 j(zero, smi_label, distance);
506 } 506 }
507 // Jump if register contain a non-smi. 507 // Jump if register contain a non-smi.
508 inline void JumpIfNotSmi(Register value, Label* not_smi_label, 508 inline void JumpIfNotSmi(Register value, Label* not_smi_label,
509 Label::Distance distance = Label::kFar) { 509 Label::Distance distance = Label::kFar) {
510 test(value, Immediate(kSmiTagMask)); 510 test(value, Immediate(kSmiTagMask));
511 j(not_zero, not_smi_label, distance); 511 j(not_zero, not_smi_label, distance);
512 } 512 }
513 513
514 // Jump if the value cannot be represented by a smi.
515 inline void JumpIfNotValidSmiValue(Register value, Register scratch,
516 Label* on_invalid,
517 Label::Distance distance = Label::kFar) {
518 mov(scratch, value);
519 add(scratch, Immediate(0x40000000U));
520 j(sign, on_invalid, distance);
521 }
522
523 // Jump if the unsigned integer value cannot be represented by a smi.
524 inline void JumpIfUIntNotValidSmiValue(
525 Register value, Label* on_invalid,
526 Label::Distance distance = Label::kFar) {
527 cmp(value, Immediate(0x40000000U));
528 j(above_equal, on_invalid, distance);
529 }
530
514 void LoadInstanceDescriptors(Register map, Register descriptors); 531 void LoadInstanceDescriptors(Register map, Register descriptors);
515 void EnumLength(Register dst, Register map); 532 void EnumLength(Register dst, Register map);
516 void NumberOfOwnDescriptors(Register dst, Register map); 533 void NumberOfOwnDescriptors(Register dst, Register map);
517 void LoadAccessor(Register dst, Register holder, int accessor_index, 534 void LoadAccessor(Register dst, Register holder, int accessor_index,
518 AccessorComponent accessor); 535 AccessorComponent accessor);
519 536
520 template<typename Field> 537 template<typename Field>
521 void DecodeField(Register reg) { 538 void DecodeField(Register reg) {
522 static const int shift = Field::kShift; 539 static const int shift = Field::kShift;
523 static const int mask = Field::kMask >> Field::kShift; 540 static const int mask = Field::kMask >> Field::kShift;
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
1051 } \ 1068 } \
1052 masm-> 1069 masm->
1053 #else 1070 #else
1054 #define ACCESS_MASM(masm) masm-> 1071 #define ACCESS_MASM(masm) masm->
1055 #endif 1072 #endif
1056 1073
1057 } // namespace internal 1074 } // namespace internal
1058 } // namespace v8 1075 } // namespace v8
1059 1076
1060 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ 1077 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_
OLDNEW
« no previous file with comments | « src/ia32/interface-descriptors-ia32.cc ('k') | src/interface-descriptors.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698