Revision: 21690
Author: [email protected]
Date: Thu Jun 5 08:55:46 2014 UTC
Log: ARM64: Add and use SmiTagAndPush.
In some cases, this allows SmiTag and Push to be combined into a single
operation.
BUG=
[email protected]
Review URL: https://codereview.chromium.org/311133003
http://code.google.com/p/v8/source/detail?r=21690
Modified:
/branches/bleeding_edge/src/arm64/debug-arm64.cc
/branches/bleeding_edge/src/arm64/full-codegen-arm64.cc
/branches/bleeding_edge/src/arm64/lithium-codegen-arm64.cc
/branches/bleeding_edge/src/arm64/macro-assembler-arm64-inl.h
/branches/bleeding_edge/src/arm64/macro-assembler-arm64.h
=======================================
--- /branches/bleeding_edge/src/arm64/debug-arm64.cc Tue Jun 3 08:12:43
2014 UTC
+++ /branches/bleeding_edge/src/arm64/debug-arm64.cc Thu Jun 5 08:55:46
2014 UTC
@@ -157,9 +157,9 @@
while (!non_object_list.IsEmpty()) {
// Store each non-object register as two SMIs.
Register reg = Register(non_object_list.PopLowestIndex());
- __ Push(reg);
- __ Poke(wzr, 0);
- __ Push(reg.W(), wzr);
+ __ Lsr(scratch, reg, 32);
+ __ SmiTagAndPush(scratch, reg);
+
// Stack:
// jssp[12]: reg[63:32]
// jssp[8]: 0x00000000 (SMI tag & padding)
=======================================
--- /branches/bleeding_edge/src/arm64/full-codegen-arm64.cc Wed Jun 4
13:40:52 2014 UTC
+++ /branches/bleeding_edge/src/arm64/full-codegen-arm64.cc Thu Jun 5
08:55:46 2014 UTC
@@ -1175,11 +1175,8 @@
FieldMemOperand(x2,
DescriptorArray::kEnumCacheBridgeCacheOffset));
// Set up the four remaining stack slots.
- __ Push(x0); // Map.
- __ Mov(x0, Smi::FromInt(0));
- // Push enumeration cache, enumeration cache length (as smi) and zero.
- __ SmiTag(x1);
- __ Push(x2, x1, x0);
+ __ Push(x0, x2); // Map, enumeration cache.
+ __ SmiTagAndPush(x1, xzr); // Enum cache length, zero (both as smis).
__ B(&loop);
__ Bind(&no_descriptors);
=======================================
--- /branches/bleeding_edge/src/arm64/lithium-codegen-arm64.cc Thu Jun 5
07:33:01 2014 UTC
+++ /branches/bleeding_edge/src/arm64/lithium-codegen-arm64.cc Thu Jun 5
08:55:46 2014 UTC
@@ -5492,8 +5492,7 @@
// Push the index as a smi. This is safe because of the checks in
// DoStringCharCodeAt above.
Register index = ToRegister(instr->index());
- __ SmiTag(index);
- __ Push(index);
+ __ SmiTagAndPush(index);
CallRuntimeFromDeferred(Runtime::kHiddenStringCharCodeAt, 2, instr,
instr->context());
@@ -5542,8 +5541,7 @@
__ Mov(result, 0);
PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters);
- __ SmiTag(char_code);
- __ Push(char_code);
+ __ SmiTagAndPush(char_code);
CallRuntimeFromDeferred(Runtime::kCharFromCode, 1, instr,
instr->context());
__ StoreToSafepointRegisterSlot(x0, result);
}
=======================================
--- /branches/bleeding_edge/src/arm64/macro-assembler-arm64-inl.h Tue Jun
3 08:12:43 2014 UTC
+++ /branches/bleeding_edge/src/arm64/macro-assembler-arm64-inl.h Thu Jun
5 08:55:46 2014 UTC
@@ -1348,6 +1348,18 @@
}
Scvtf(dst, src, kSmiShift);
}
+
+
+void MacroAssembler::SmiTagAndPush(Register src) {
+ STATIC_ASSERT((kSmiShift == 32) && (kSmiTag == 0));
+ Push(src.W(), wzr);
+}
+
+
+void MacroAssembler::SmiTagAndPush(Register src1, Register src2) {
+ STATIC_ASSERT((kSmiShift == 32) && (kSmiTag == 0));
+ Push(src1.W(), wzr, src2.W(), wzr);
+}
void MacroAssembler::JumpIfSmi(Register value,
=======================================
--- /branches/bleeding_edge/src/arm64/macro-assembler-arm64.h Wed Jun 4
13:40:52 2014 UTC
+++ /branches/bleeding_edge/src/arm64/macro-assembler-arm64.h Thu Jun 5
08:55:46 2014 UTC
@@ -873,6 +873,10 @@
Register src,
UntagMode mode = kNotSpeculativeUntag);
+ // Tag and push in one step.
+ inline void SmiTagAndPush(Register src);
+ inline void SmiTagAndPush(Register src1, Register src2);
+
// Compute the absolute value of 'smi' and leave the result in 'smi'
// register. If 'smi' is the most negative SMI, the absolute value cannot
// be represented as a SMI and a jump to 'slow' is done.
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.