| Index: src/mips/macro-assembler-mips.h
|
| diff --git a/src/mips/macro-assembler-mips.h b/src/mips/macro-assembler-mips.h
|
| index d3fdbd6b33ad2e3a603d2c91991019d4e3b1d6d9..e4187c0fb47ffa93db46d20fd7659ea89461e5ab 100644
|
| --- a/src/mips/macro-assembler-mips.h
|
| +++ b/src/mips/macro-assembler-mips.h
|
| @@ -1205,8 +1205,10 @@ class MacroAssembler: public Assembler {
|
| }
|
|
|
| // Convenience function: Same as above, but takes the fid instead.
|
| - void CallRuntime(Runtime::FunctionId id, int num_arguments) {
|
| - CallRuntime(Runtime::FunctionForId(id), num_arguments);
|
| + void CallRuntime(Runtime::FunctionId id,
|
| + int num_arguments,
|
| + SaveFPRegsMode save_doubles = kDontSaveFPRegs) {
|
| + CallRuntime(Runtime::FunctionForId(id), num_arguments, save_doubles);
|
| }
|
|
|
| // Convenience function: call an external reference.
|
| @@ -1371,6 +1373,21 @@ class MacroAssembler: public Assembler {
|
| Addu(dst, src, src);
|
| }
|
|
|
| + // 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, Register scratch, Label* not_a_smi) {
|
| + TrySmiTag(reg, reg, scratch, not_a_smi);
|
| + }
|
| + void TrySmiTag(Register dst,
|
| + Register src,
|
| + Register scratch,
|
| + Label* not_a_smi) {
|
| + SmiTagCheckOverflow(at, src, scratch);
|
| + BranchOnOverflow(not_a_smi, scratch);
|
| + mov(dst, at);
|
| + }
|
| +
|
| void SmiUntag(Register reg) {
|
| sra(reg, reg, kSmiTagSize);
|
| }
|
| @@ -1379,6 +1396,14 @@ class MacroAssembler: public Assembler {
|
| sra(dst, src, kSmiTagSize);
|
| }
|
|
|
| + // Test if the register contains a smi.
|
| + inline void SmiTst(Register value, Register scratch) {
|
| + And(scratch, value, Operand(kSmiTagMask));
|
| + }
|
| + inline void NonNegativeSmiTst(Register value, Register scratch) {
|
| + And(scratch, value, Operand(kSmiTagMask | kSmiSignMask));
|
| + }
|
| +
|
| // Untag the source value into destination and jump if source is a smi.
|
| // Souce and destination can be the same register.
|
| void UntagAndJumpIfSmi(Register dst, Register src, Label* smi_case);
|
|
|