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

Unified Diff: src/x87/macro-assembler-x87.h

Issue 1894923002: X87: [Atomics] code stubs for atomic operations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/x87/interface-descriptors-x87.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x87/macro-assembler-x87.h
diff --git a/src/x87/macro-assembler-x87.h b/src/x87/macro-assembler-x87.h
index fc96d4f7a432c7bb03b643fd35ccbd3097a17c51..ef11da0683dddb46fea9e239d24f42727055898d 100644
--- a/src/x87/macro-assembler-x87.h
+++ b/src/x87/macro-assembler-x87.h
@@ -500,6 +500,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/x87/interface-descriptors-x87.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698