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

Issue 1930: Adapt to new calling convention on ARM. (Closed)

Created:
12 years, 3 months ago by iposva
Modified:
9 years, 4 months ago
Reviewers:
Feng Qian, Kasper Lund
CC:
v8-dev
Visibility:
Public.

Description

Adapt to new calling convention on ARM: - Simplified frame entry and frame exit code. - Added ArgumentsAdaptorTrampoline and check for matching argument counts in the InvokePrologue. - Removed definition and uses of USE_OLD_CALLING_CONVENTIONS. - Changed MacroAssembler::InvokeBuiltin to match ia32 version. - Start introducing convenience instructions in the ARM assembler as needed. These instructions take all Register parameters to avoid extra typing of "Operand(reg)". To keep the architectures in sync these changes have been made to the ia32 files: - Changed MacroAssembler::EnterFrame(StackFrame::Type type) to MacroAssembler::EnterInternalFrame(). These parts are still missing: - unimplemented: Builtins::Generate_FunctionApply - large limit - unimplemented: Builtins::Generate_ArgumentsAdaptorTrampoline - non-function call - The files have not been lint'd yet. Committed: http://code.google.com/p/v8/source/detail?r=289

Patch Set 1 #

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1022 lines, -692 lines) Patch
M src/assembler-arm.h View 1 2 chunks +17 lines, -0 lines 0 comments Download
M src/bootstrapper.cc View 1 2 chunks +0 lines, -2 lines 0 comments Download
M src/builtins.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/builtins.cc View 1 2 chunks +22 lines, -5 lines 0 comments Download
M src/builtins-arm.cc View 1 5 chunks +481 lines, -50 lines 0 comments Download
M src/builtins-ia32.cc View 1 11 chunks +16 lines, -12 lines 0 comments Download
M src/codegen-arm.cc View 1 42 chunks +218 lines, -308 lines 0 comments Download
M src/disasm-arm.cc View 3 chunks +0 lines, -3 lines 0 comments Download
M src/frames.h View 1 2 chunks +0 lines, -6 lines 0 comments Download
M src/frames.cc View 1 2 chunks +0 lines, -6 lines 0 comments Download
M src/frames-arm.h View 1 3 chunks +22 lines, -31 lines 0 comments Download
M src/frames-arm.cc View 1 3 chunks +35 lines, -36 lines 0 comments Download
M src/globals.h View 1 1 chunk +0 lines, -7 lines 0 comments Download
M src/ic-arm.cc View 1 2 chunks +8 lines, -10 lines 0 comments Download
M src/ic-ia32.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M src/macro-assembler-arm.h View 1 4 chunks +20 lines, -11 lines 0 comments Download
M src/macro-assembler-arm.cc View 1 5 chunks +107 lines, -117 lines 0 comments Download
M src/macro-assembler-ia32.h View 1 3 chunks +6 lines, -6 lines 0 comments Download
M src/macro-assembler-ia32.cc View 1 2 chunks +7 lines, -24 lines 0 comments Download
M src/runtime.cc View 1 1 chunk +0 lines, -13 lines 0 comments Download
M src/simulator-arm.cc View 1 3 chunks +26 lines, -11 lines 0 comments Download
M src/stub-cache-arm.cc View 1 3 chunks +30 lines, -28 lines 0 comments Download
M src/stub-cache-ia32.cc View 1 4 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
iposva
This is a first set of changes to adapt ARM to the new calling convention. ...
12 years, 3 months ago (2008-09-11 06:56:11 UTC) #1
Kasper Lund
Overall this LGTM. It seems to be getting really close to working even in all ...
12 years, 3 months ago (2008-09-11 10:43:23 UTC) #2
Feng Qian
LGTM. My comments are minor, looks like frames-ia32.cc and frames-arm.cc are very close to each ...
12 years, 3 months ago (2008-09-11 21:33:12 UTC) #3
iposva
12 years, 3 months ago (2008-09-12 00:18:14 UTC) #4
First set of replies...

http://codereview.chromium.org/1930/diff/1/9
File src/builtins-arm.cc (right):

http://codereview.chromium.org/1930/diff/1/9#newcode67
Line 67: __ push(r1);  // constructor function
On 2008/09/11 21:33:13, Feng Qian wrote:
> The constructor function pushed on the stack seems not used. Double check!

It is used for example on line 78:
__ ldr(r1, MemOperand(sp, kPointerSize));

http://codereview.chromium.org/1930/diff/1/9#newcode100
Line 100: // r3: number of arguments (smi-tagged)
On 2008/09/11 21:33:13, Feng Qian wrote:
> How about adding one more line comment here:
> // r2: caller sp
Fixed

http://codereview.chromium.org/1930/diff/1/18
File src/codegen-arm.cc (right):

http://codereview.chromium.org/1930/diff/1/18#newcode3876
Line 3876: ASSERT(args->length() == 1);
On 2008/09/11 21:33:13, Feng Qian wrote:
> Please update comment above function declaration.
Outdated comment removed.

http://codereview.chromium.org/1930/diff/1/8
File src/frames-arm.cc (right):

http://codereview.chromium.org/1930/diff/1/8#newcode48
Line 48: return static_cast<StackFrame::Type>(Smi::cast(marker)->value());
On 2008/09/11 21:33:13, Feng Qian wrote:
> Now this function looks exactly like the on in frame-ia32.cc. Can we move it
to
> frames.cc?

This change is already unwieldy. Some of the cleanup should move to a follow up
change.

http://codereview.chromium.org/1930/diff/1/20
File src/macro-assembler-arm.cc (right):

http://codereview.chromium.org/1930/diff/1/20#newcode299
Line 299: 
On 2008/09/11 21:33:13, Feng Qian wrote:
> This part is a bit complicated. I can see unnecessary mov instructions in
> different paths. For example, when both actual and expected are immediate but
> not equal, there are two instructions that move actual.immediate() into r0.
>  

Removed leftover code from the old calling convention. Thanks for spotting!

http://codereview.chromium.org/1930/diff/1/20#newcode665
Line 665: Builtins::JavaScript id, bool* resolved) {
On 2008/09/11 21:33:13, Feng Qian wrote:
> Can this function be made that same as in IA32? (non-static).
> 
> Part of code looks identical as the same function in IA32. You may want to
> refactor the common code out.

Factored the common code out into Builtins::GetCode(JavaScript id, bool*
resolved).

http://codereview.chromium.org/1930/diff/1/13
File src/simulator-arm.cc (right):

http://codereview.chromium.org/1930/diff/1/13#newcode94
Line 94: OS::Abort();
On 2008/09/11 10:43:23, Kasper Lund wrote:
> Is this intentional?

Yes, this was just needed so that test.py does not wait until the timeout
expires when hitting a stop instruction. Will be removed before putback.

Powered by Google App Engine
This is Rietveld 408576698