Index: src/s390/macro-assembler-s390.h |
diff --git a/src/s390/macro-assembler-s390.h b/src/s390/macro-assembler-s390.h |
index 2970b01b8757bcb661fc2211d9d08e1b1bec2f76..c6c77820a985b7729c4f3ead111d59a318107be9 100644 |
--- a/src/s390/macro-assembler-s390.h |
+++ b/src/s390/macro-assembler-s390.h |
@@ -1552,6 +1552,17 @@ class MacroAssembler : public Assembler { |
inline void TestIfSmi(Register value) { tmll(value, Operand(1)); } |
+ inline void TestIfSmi(MemOperand value) { |
+ if (is_uint12(value.offset())) { |
+ tm(value, Operand(1)); |
+ } else if (is_int20(value.offset())) { |
+ tmy(value, Operand(1)); |
+ } else { |
+ LoadP(r0, value); |
+ tmll(r0, Operand(1)); |
+ } |
+ } |
+ |
inline void TestIfPositiveSmi(Register value, Register scratch) { |
STATIC_ASSERT((kSmiTagMask | kSmiSignMask) == |
(intptr_t)(1UL << (kBitsPerPointer - 1) | 1)); |