Revision: 19025
Author: [email protected]
Date: Mon Feb 3 13:10:30 2014 UTC
Log: A64: Implement Peek/PokePair
Implement PeekPair and PokePair in the macro assembler, and remove some TODO
comments.
BUG=
[email protected]
Review URL: https://codereview.chromium.org/152673002
http://code.google.com/p/v8/source/detail?r=19025
Modified:
/branches/experimental/a64/src/a64/code-stubs-a64.cc
/branches/experimental/a64/src/a64/full-codegen-a64.cc
/branches/experimental/a64/src/a64/macro-assembler-a64.cc
/branches/experimental/a64/src/a64/macro-assembler-a64.h
=======================================
--- /branches/experimental/a64/src/a64/code-stubs-a64.cc Fri Jan 31
17:34:12 2014 UTC
+++ /branches/experimental/a64/src/a64/code-stubs-a64.cc Mon Feb 3
13:10:30 2014 UTC
@@ -6357,9 +6357,7 @@
Register array = x1;
Register array_map = x2;
Register array_index_smi = x4;
- // TODO(jbramley): Implement PeekPair and use it here.
- __ Peek(array, 1 * kPointerSize);
- __ Peek(array_index_smi, 0 * kPointerSize);
+ __ PeekPair(array_index_smi, array, 0);
__ Ldr(array_map, FieldMemOperand(array, JSObject::kMapOffset));
Label double_elements, smi_element, fast_elements, slow_elements;
=======================================
--- /branches/experimental/a64/src/a64/full-codegen-a64.cc Fri Jan 31
17:19:15 2014 UTC
+++ /branches/experimental/a64/src/a64/full-codegen-a64.cc Mon Feb 3
13:10:30 2014 UTC
@@ -1191,8 +1191,7 @@
PrepareForBailoutForId(stmt->BodyId(), NO_REGISTERS);
__ Bind(&loop);
// Load the current count to x0, load the length to x1.
- // TODO(jbramley): Consider making something like PeekPair.
- __ Ldp(x0, x1, MemOperand(jssp));
+ __ PeekPair(x0, x1, 0);
__ Cmp(x0, x1); // Compare to the array length.
__ B(hs, loop_statement.break_label());
@@ -2494,8 +2493,7 @@
// The runtime call returns a pair of values in x0 (function) and
// x1 (receiver). Touch up the stack with the right values.
- // TODO(jbramley): Consider adding PokePair.
- __ Stp(x1, x0, MemOperand(jssp, arg_count * kPointerSize));
+ __ PokePair(x1, x0, arg_count * kPointerSize);
}
// Record source position for debugger.
=======================================
--- /branches/experimental/a64/src/a64/macro-assembler-a64.cc Fri Jan 31
17:19:15 2014 UTC
+++ /branches/experimental/a64/src/a64/macro-assembler-a64.cc Mon Feb 3
13:10:30 2014 UTC
@@ -782,6 +782,24 @@
Ldr(dst, MemOperand(StackPointer(), offset));
}
+
+
+void MacroAssembler::PokePair(const CPURegister& src1,
+ const CPURegister& src2,
+ int offset) {
+ ASSERT(AreSameSizeAndType(src1, src2));
+ ASSERT((offset >= 0) && ((offset % src1.SizeInBytes()) == 0));
+ Stp(src1, src2, MemOperand(StackPointer(), offset));
+}
+
+
+void MacroAssembler::PeekPair(const CPURegister& dst1,
+ const CPURegister& dst2,
+ int offset) {
+ ASSERT(AreSameSizeAndType(dst1, dst2));
+ ASSERT((offset >= 0) && ((offset % dst1.SizeInBytes()) == 0));
+ Ldp(dst1, dst2, MemOperand(StackPointer(), offset));
+}
void MacroAssembler::PushCalleeSavedRegisters() {
=======================================
--- /branches/experimental/a64/src/a64/macro-assembler-a64.h Fri Jan 31
17:26:22 2014 UTC
+++ /branches/experimental/a64/src/a64/macro-assembler-a64.h Mon Feb 3
13:10:30 2014 UTC
@@ -539,6 +539,21 @@
// csp must be aligned to 16 bytes.
void Peek(const CPURegister& dst, const Operand& offset);
+ // Poke 'src1' and 'src2' onto the stack. The values written will be
adjacent
+ // with 'src2' at a higher address than 'src1'. The offset is in bytes.
+ //
+ // If the current stack pointer (according to StackPointer()) is csp,
then
+ // csp must be aligned to 16 bytes.
+ void PokePair(const CPURegister& src1, const CPURegister& src2, int
offset);
+
+ // Peek at two values on the stack, and put them in 'dst1' and 'dst2'.
The
+ // values peeked will be adjacent, with the value in 'dst2' being from a
+ // higher address than 'dst1'. The offset is in bytes.
+ //
+ // If the current stack pointer (according to StackPointer()) is csp,
then
+ // csp must be aligned to 16 bytes.
+ void PeekPair(const CPURegister& dst1, const CPURegister& dst2, int
offset);
+
// Claim or drop stack space without actually accessing memory.
//
// In debug mode, both of these will write invalid data into the claimed
or
--
--
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/groups/opt_out.