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

Issue 7809014: MIPS: port ARM: Fix context save/restore for VFP registers. (Closed)

Created:
9 years, 3 months ago by Paul Lind
Modified:
9 years, 3 months ago
Reviewers:
Yang
CC:
v8-dev
Visibility:
Public.

Description

MIPS: port ARM: Fix context save/restore for VFP registers. This commit was missed/skipped earlier for some reason. Ported r8357 (d78dae4) BUG= TEST= Committed: http://code.google.com/p/v8/source/detail?r=9088

Patch Set 1 #

Total comments: 6

Patch Set 2 : Update frames reglist constants and push/pop routines per review comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+166 lines, -61 lines) Patch
M src/mips/code-stubs-mips.cc View 1 2 chunks +19 lines, -2 lines 0 comments Download
M src/mips/frames-mips.h View 1 4 chunks +65 lines, -45 lines 0 comments Download
M src/mips/macro-assembler-mips.h View 2 chunks +6 lines, -0 lines 0 comments Download
M src/mips/macro-assembler-mips.cc View 1 1 chunk +76 lines, -14 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Paul Lind
9 years, 3 months ago (2011-08-31 03:22:55 UTC) #1
Yang
Hi Paul, I noticed a few things. Please take another look. Cheers, -Yang http://codereview.chromium.org/7809014/diff/1/src/mips/code-stubs-mips.cc File ...
9 years, 3 months ago (2011-08-31 12:38:44 UTC) #2
Paul Lind
http://codereview.chromium.org/7809014/diff/1/src/mips/code-stubs-mips.cc File src/mips/code-stubs-mips.cc (right): http://codereview.chromium.org/7809014/diff/1/src/mips/code-stubs-mips.cc#newcode3843 src/mips/code-stubs-mips.cc:3843: __ MultiPopFPU(kCalleeSavedFPU); On 2011/08/31 12:38:44, Yang wrote: > Shouldn't ...
9 years, 3 months ago (2011-09-01 06:50:27 UTC) #3
Yang
9 years, 3 months ago (2011-09-01 07:37:41 UTC) #4
On 2011/09/01 06:50:27, Paul Lind wrote:
> http://codereview.chromium.org/7809014/diff/1/src/mips/code-stubs-mips.cc
> File src/mips/code-stubs-mips.cc (right):
> 
>
http://codereview.chromium.org/7809014/diff/1/src/mips/code-stubs-mips.cc#new...
> src/mips/code-stubs-mips.cc:3843: __ MultiPopFPU(kCalleeSavedFPU);
> On 2011/08/31 12:38:44, Yang wrote:
> > Shouldn't this be surrounded by the conditional "if
> > (CpuFeatures::IsSupported(FPU))"?
> > 
> > At least that's what's been done in r8357 and seems to make sense here as
> well.
> 
> Done.
> 
> http://codereview.chromium.org/7809014/diff/1/src/mips/frames-mips.h
> File src/mips/frames-mips.h (right):
> 
> http://codereview.chromium.org/7809014/diff/1/src/mips/frames-mips.h#newcode67
> src/mips/frames-mips.h:67: 1 << 20 | 1 << 22 | 1 << 24 | 1 << 26 | 1 << 28 | 1
> << 30;
> On 2011/08/31 12:38:44, Yang wrote:
> > Comments similar to those in frames-arm.h would be nice.
> 
> Done. Refactored the other RegLists too.
> 
> http://codereview.chromium.org/7809014/diff/1/src/mips/macro-assembler-mips.cc
> File src/mips/macro-assembler-mips.cc (right):
> 
>
http://codereview.chromium.org/7809014/diff/1/src/mips/macro-assembler-mips.c...
> src/mips/macro-assembler-mips.cc:766: }
> On 2011/08/31 12:38:44, Yang wrote:
> > Consider - for readability - introducing a stack_offset variable to keep
track
> > where to store the next register. For example:
> > 
> > int16_t NumToPush = NumberOfBitsSet(regs);
> > int16_t stack_offset = NumToPush * 8;
> > 
> > addiu(sp, sp, -8 * NumToPush);
> > for (int16_t i = kNumRegisters; i > 0; i--) {
> >   if ((regs & (1 << i)) != 0) {
> >     stack_offset -= 8;
> >     sdc1(FPURegister::from_code(i),
> >          MemOperand(sp, stack_offset));
> >   }
> > }
> > 
> > Also consider using kDoubleSize instead of the constant 8.
> > 
> > Maybe those non-FPU MultiPush and MultiPop commands can be refactored as
well?
> 
> Nice suggestion, the code looks much cleaner now. I updated all the Multi's
...
> 
> BTW, mips does not have a subiu instruction. The addiu takes a signed 16-bit
> immediate, so it can be used for subtract. I changed to use the Subu()
> macro-instruction, which emits addiu with negative immediate value, to make it
> more obvious in the code we are subtracting (more obvious than - sign.)

LGTM and landing.

Though it worries me a little bit that there does not seem to be any test
coverage for CPU features. Is it possible to emulate those in the simulator?

Powered by Google App Engine
This is Rietveld 408576698