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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ia32/interface-descriptors-ia32.cc ('k') | src/interface-descriptors.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/macro-assembler-ia32.h
diff --git a/src/ia32/macro-assembler-ia32.h b/src/ia32/macro-assembler-ia32.h
index 436e7be521aa95a0f98071732fba1d4381c354cc..40e43bba96a9b44f0fddf1afa364bdde37b3748b 100644
--- a/src/ia32/macro-assembler-ia32.h
+++ b/src/ia32/macro-assembler-ia32.h
@@ -511,6 +511,23 @@ class MacroAssembler: public Assembler {
j(not_zero, not_smi_label, distance);
}
+ // Jump if the value cannot be represented by a smi.
+ inline void JumpIfNotValidSmiValue(Register value, Register scratch,
+ Label* on_invalid,
+ Label::Distance distance = Label::kFar) {
+ mov(scratch, value);
+ add(scratch, Immediate(0x40000000U));
+ j(sign, on_invalid, distance);
+ }
+
+ // Jump if the unsigned integer value cannot be represented by a smi.
+ inline void JumpIfUIntNotValidSmiValue(
+ Register value, Label* on_invalid,
+ Label::Distance distance = Label::kFar) {
+ cmp(value, Immediate(0x40000000U));
+ j(above_equal, on_invalid, distance);
+ }
+
void LoadInstanceDescriptors(Register map, Register descriptors);
void EnumLength(Register dst, Register map);
void NumberOfOwnDescriptors(Register dst, Register map);
« 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