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

Issue 1205023002: [turbofan] Add basic support for calling to (a subset of) C functions. (Closed)

Created:
5 years, 6 months ago by Benedikt Meurer
Modified:
5 years, 6 months ago
Reviewers:
Sven Panne, Jarin
CC:
v8-dev, v8-mips-ports_googlegroups.com, Rodolph Perfetta (ARM)
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[turbofan] Add basic support for calling to (a subset of) C functions. This introduces some initial building blocks for calling out to C/C++ functions directly from TurboFan generated code objects. R=svenpanne@chromium.org Committed: https://chromium.googlesource.com/v8/v8/+/a58ba8d80179bf5b6b7245590c82e47fda8c8a5e

Patch Set 1 #

Patch Set 2 : REBASE. Ports. #

Patch Set 3 : #

Total comments: 4

Patch Set 4 : Add test case with more arguments. #

Patch Set 5 : Fix argument slots. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+527 lines, -106 lines) Patch
M src/compiler/arm/code-generator-arm.cc View 1 2 2 chunks +22 lines, -0 lines 0 comments Download
M src/compiler/arm/instruction-codes-arm.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/arm/instruction-selector-arm.cc View 1 2 3 4 2 chunks +29 lines, -10 lines 0 comments Download
M src/compiler/arm/linkage-arm.cc View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/arm64/code-generator-arm64.cc View 1 2 1 chunk +17 lines, -0 lines 0 comments Download
M src/compiler/arm64/instruction-selector-arm64.cc View 1 2 2 chunks +9 lines, -6 lines 0 comments Download
M src/compiler/arm64/linkage-arm64.cc View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/code-generator.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M src/compiler/code-generator-impl.h View 1 2 2 chunks +8 lines, -0 lines 0 comments Download
M src/compiler/ia32/code-generator-ia32.cc View 1 2 2 chunks +25 lines, -0 lines 0 comments Download
M src/compiler/ia32/instruction-codes-ia32.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/ia32/instruction-selector-ia32.cc View 1 2 3 4 2 chunks +35 lines, -13 lines 0 comments Download
M src/compiler/ia32/linkage-ia32.cc View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/instruction-codes.h View 1 chunk +28 lines, -26 lines 0 comments Download
M src/compiler/instruction-selector.cc View 1 2 3 4 3 chunks +4 lines, -7 lines 0 comments Download
M src/compiler/linkage.h View 1 chunk +6 lines, -0 lines 0 comments Download
M src/compiler/linkage-impl.h View 1 2 3 4 1 chunk +3 lines, -1 line 0 comments Download
M src/compiler/mips/code-generator-mips.cc View 1 2 1 chunk +16 lines, -0 lines 0 comments Download
M src/compiler/mips/instruction-selector-mips.cc View 1 2 2 chunks +36 lines, -17 lines 0 comments Download
M src/compiler/mips/linkage-mips.cc View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/mips64/code-generator-mips64.cc View 1 2 1 chunk +16 lines, -0 lines 0 comments Download
M src/compiler/mips64/instruction-selector-mips64.cc View 1 2 2 chunks +34 lines, -15 lines 0 comments Download
M src/compiler/mips64/linkage-mips64.cc View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/x64/code-generator-x64.cc View 1 2 2 chunks +25 lines, -0 lines 0 comments Download
M src/compiler/x64/instruction-codes-x64.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/x64/instruction-selector-x64.cc View 1 2 3 4 2 chunks +32 lines, -11 lines 0 comments Download
M src/compiler/x64/linkage-x64.cc View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M test/cctest/compiler/test-run-machops.cc View 1 2 3 1 chunk +79 lines, -0 lines 2 comments Download
M test/unittests/compiler/raw-machine-assembler.h View 1 2 3 1 chunk +17 lines, -0 lines 0 comments Download
M test/unittests/compiler/raw-machine-assembler.cc View 1 2 3 1 chunk +72 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (5 generated)
Benedikt Meurer
Hey Rodolph, MIPS people, Please add the ports (mips, mips64, arm64). Thanks, Benedikt
5 years, 6 months ago (2015-06-24 12:34:20 UTC) #2
paul.l...
Hi Benedikt - Balázs added mips, mips64 ports in https://codereview.chromium.org/1211443003/
5 years, 6 months ago (2015-06-25 00:09:16 UTC) #3
Benedikt Meurer
Thanks guys!
5 years, 6 months ago (2015-06-25 04:34:29 UTC) #4
Benedikt Meurer
Hey Jaro, Adding missing bits, it's not used yet. Please take a look. Thanks, Benedikt
5 years, 6 months ago (2015-06-25 05:58:05 UTC) #6
Sven Panne
LGTM with nits + more test coverage https://codereview.chromium.org/1205023002/diff/40001/src/compiler/arm/instruction-codes-arm.h File src/compiler/arm/instruction-codes-arm.h (right): https://codereview.chromium.org/1205023002/diff/40001/src/compiler/arm/instruction-codes-arm.h#newcode96 src/compiler/arm/instruction-codes-arm.h:96: V(ArmPoke) \ ...
5 years, 6 months ago (2015-06-25 07:16:00 UTC) #8
Benedikt Meurer
https://codereview.chromium.org/1205023002/diff/40001/src/compiler/arm/instruction-codes-arm.h File src/compiler/arm/instruction-codes-arm.h (right): https://codereview.chromium.org/1205023002/diff/40001/src/compiler/arm/instruction-codes-arm.h#newcode96 src/compiler/arm/instruction-codes-arm.h:96: V(ArmPoke) \ We can fix that naming later. Poke ...
5 years, 6 months ago (2015-06-25 07:31:10 UTC) #9
Benedikt Meurer
Committed patchset #5 (id:80001) manually as a58ba8d80179bf5b6b7245590c82e47fda8c8a5e (presubmit successful).
5 years, 6 months ago (2015-06-25 08:32:41 UTC) #12
Sven Panne
5 years, 6 months ago (2015-06-25 08:35:09 UTC) #13
Message was sent while issue was closed.
https://codereview.chromium.org/1205023002/diff/80001/test/cctest/compiler/te...
File test/cctest/compiler/test-run-machops.cc (right):

https://codereview.chromium.org/1205023002/diff/80001/test/cctest/compiler/te...
test/cctest/compiler/test-run-machops.cc:5160: return a + b + c + d + e + f + g
+ h;
Using a non-commutative and non-associative operation would be more helpful
here: Permuted arguments can't be detected with "+".

https://codereview.chromium.org/1205023002/diff/80001/test/cctest/compiler/te...
test/cctest/compiler/test-run-machops.cc:5210: kMachInt32, function, param,
param, param, param,
Using the same actual parameter for all formal parameters might disguise bugs,
e.g. accidentally duplicating/leaving out/permuting args.

Powered by Google App Engine
This is Rietveld 408576698