Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Issue 1361143005: MIPS: [turbofan] Call ArgumentsAccessStub to materialize arguments. (Closed)

Created:
5 years, 3 months ago by akos.palfi.imgtec
Modified:
5 years, 1 month ago
Reviewers:
paul.l...
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

MIPS: [turbofan] Call ArgumentsAccessStub to materialize arguments. Port of https://codereview.chromium.org/1348773002/ BUG=

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+164 lines, -175 lines) Patch
M src/full-codegen/mips/full-codegen-mips.cc View 1 chunk +12 lines, -18 lines 0 comments Download
M src/mips/code-stubs-mips.cc View 9 chunks +147 lines, -157 lines 2 comments Download
M src/mips/interface-descriptors-mips.cc View 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (1 generated)
paul.l...
https://codereview.chromium.org/1361143005/diff/1/src/mips/code-stubs-mips.cc File src/mips/code-stubs-mips.cc (right): https://codereview.chromium.org/1361143005/diff/1/src/mips/code-stubs-mips.cc#newcode1695 src/mips/code-stubs-mips.cc:1695: __ Branch(&skip2_eq, eq, a1, Operand(zero_reg)); The main bug is ...
5 years, 3 months ago (2015-09-24 04:07:05 UTC) #2
paul.l...
5 years, 3 months ago (2015-09-24 04:33:58 UTC) #3
https://codereview.chromium.org/1361143005/diff/1/src/mips/code-stubs-mips.cc
File src/mips/code-stubs-mips.cc (right):

https://codereview.chromium.org/1361143005/diff/1/src/mips/code-stubs-mips.cc...
src/mips/code-stubs-mips.cc:1695: __ Branch(&skip2_eq, eq, a1,
Operand(zero_reg));
The 2 branches here (in older code also) bugged me, and I wrote this:
 // v0 = address of new object(s) (tagged)
  // a2 = argument count (smi-tagged)
  // t5 = scratch.
  // Get the arguments boilerplate from the current native context into t0.
  const int kNormalOffset =
      Context::SlotOffset(Context::SLOPPY_ARGUMENTS_MAP_INDEX);
  const int kAliasedOffset =
      Context::SlotOffset(Context::FAST_ALIASED_ARGUMENTS_MAP_INDEX);

  __ lw(t0, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX)));
  __ lw(t0, FieldMemOperand(t0, GlobalObject::kNativeContextOffset));
  Label load_normal;
  __ Branch(USE_DELAY_SLOT, &load_normal, eq, t2, Operand(zero_reg));
  __ lw(t5, MemOperand(t0, kNormalOffset));
  __ lw(t5, MemOperand(t0, kAliasedOffset));
  __ bind(&load_normal):
  __ mov(t0, t5);

But that shortens code from 6 instructions (with 2 nops, and one memory
reference) to 4 instrucions and two memory references. And looking at these
offsets, I don't think they'd share same cacheline, so what I wrote look nice
but is almost certainly worse than two branches. So never mind :-)

Powered by Google App Engine
This is Rietveld 408576698