Index: src/arm/macro-assembler-arm.h |
diff --git a/src/arm/macro-assembler-arm.h b/src/arm/macro-assembler-arm.h |
index e997136527985941e3da9aeb5de426f60c2d9e62..324fbb2dde9cdac4675ce28b473a8d1f2a9b0f74 100644 |
--- a/src/arm/macro-assembler-arm.h |
+++ b/src/arm/macro-assembler-arm.h |
@@ -232,6 +232,9 @@ class MacroAssembler: public Assembler { |
// RegList constant kSafepointSavedRegisters. |
void PushSafepointRegisters(); |
void PopSafepointRegisters(); |
+ void PushSafepointRegistersAndDoubles(); |
+ void PopSafepointRegistersAndDoubles(); |
+ |
static int SafepointRegisterStackIndex(int reg_code); |
// Load two consecutive registers with two consecutive memory locations. |
@@ -716,6 +719,16 @@ class MacroAssembler: public Assembler { |
add(reg, reg, Operand(reg), s); |
} |
+ // Try to convert int32 to smi. If the value is to large, preserve |
+ // the original value and jump to not_a_smi. Destroys scratch and |
+ // sets flags. |
+ void TrySmiTag(Register reg, Label* not_a_smi, Register scratch) { |
+ mov(scratch, reg); |
+ SmiTag(scratch, SetCC); |
+ b(vs, not_a_smi); |
+ mov(reg, scratch); |
+ } |
+ |
void SmiUntag(Register reg) { |
mov(reg, Operand(reg, ASR, kSmiTagSize)); |
} |