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

Issue 119036: * Modify simulator and ARM code generator to avoid swi... (Closed)

Created:
11 years, 6 months ago by Erik Corry
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

* Modify simulator and ARM code generator to avoid swi instructions. The intention is that the snapshots generated by the simulator should be usable on the hardware. Instead of swi instructions we generate a branch to a swi instruction that is not part of the snapshot. The call/jump is patched up in the same way as other external references when the snapshot is deserialized. This only works for EABI targets: on old ABI targets we still emit some instructions not supported by the simulator (fp coprocessor instructions). Committed: http://code.google.com/p/v8/source/detail?r=2127

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 30

Patch Set 4 : '' #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+230 lines, -132 lines) Patch
M src/arm/codegen-arm.cc View 2 3 7 chunks +4 lines, -18 lines 0 comments Download
M src/arm/constants-arm.h View 2 3 2 chunks +13 lines, -8 lines 2 comments Download
M src/arm/cpu-arm.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M src/arm/disasm-arm.cc View 2 3 1 chunk +2 lines, -14 lines 0 comments Download
M src/arm/macro-assembler-arm.cc View 1 chunk +0 lines, -16 lines 0 comments Download
M src/arm/simulator-arm.h View 2 3 3 chunks +8 lines, -0 lines 0 comments Download
M src/arm/simulator-arm.cc View 2 3 6 chunks +125 lines, -50 lines 4 comments Download
M src/assembler.h View 2 3 4 chunks +33 lines, -7 lines 0 comments Download
M src/assembler.cc View 2 3 4 chunks +16 lines, -6 lines 0 comments Download
M src/serialize.cc View 2 chunks +17 lines, -11 lines 0 comments Download
M src/v8.cc View 4 chunks +10 lines, -2 lines 2 comments Download

Messages

Total messages: 8 (0 generated)
Erik Corry
11 years, 6 months ago (2009-06-02 11:50:08 UTC) #1
Erik Corry
11 years, 6 months ago (2009-06-02 11:52:27 UTC) #2
iposva
11 years, 6 months ago (2009-06-02 23:00:49 UTC) #3
Kevin Millikin (Chromium)
I think it looks OK, but Ivan should definitely look at the simulator changes. http://codereview.chromium.org/119036/diff/32/1038 ...
11 years, 6 months ago (2009-06-03 12:56:08 UTC) #4
iposva
Overall I appreciate to complexity of trying to support snapshots generated in a simulated environment ...
11 years, 6 months ago (2009-06-04 08:25:42 UTC) #5
Erik Corry
Updated, Ivan please take another look. http://codereview.chromium.org/119036/diff/32/1031 File src/arm/constants-arm.h (right): http://codereview.chromium.org/119036/diff/32/1031#newcode31 Line 31: // The ...
11 years, 6 months ago (2009-06-05 11:11:22 UTC) #6
iposva
LGTM after addressing small comments below. -Ivan http://codereview.chromium.org/119036/diff/35/40 File src/arm/constants-arm.h (right): http://codereview.chromium.org/119036/diff/35/40#newcode39 Line 39: # ...
11 years, 6 months ago (2009-06-08 21:48:41 UTC) #7
Erik Corry
11 years, 6 months ago (2009-06-09 09:27:00 UTC) #8
http://codereview.chromium.org/119036/diff/35/40
File src/arm/constants-arm.h (right):

http://codereview.chromium.org/119036/diff/35/40#newcode39
Line 39: # define __ARM_EABI__ 1
On 2009/06/08 21:48:41, iposva wrote:
> It makes me a bit uncomfortable to be defining "compiler reserved" macros, but
I
> guess this should be fine.

Fixed with the introduction of USE_ARM_EABI macro instead.

http://codereview.chromium.org/119036/diff/35/41
File src/arm/simulator-arm.cc (right):

http://codereview.chromium.org/119036/diff/35/41#newcode1051
Line 1051: set_register(r0, result);
On 2009/06/08 21:48:41, iposva wrote:
> Isn't the second write to r0 redundant here? Strangely the compiler does not
> complain that you are passing an int64_t into an int32_t parameter.

Fixed.

http://codereview.chromium.org/119036/diff/35/37
File src/v8.cc (right):

http://codereview.chromium.org/119036/diff/35/37#newcode70
Line 70: #if !defined(__arm__) && V8_TARGET_ARCH_ARM
On 2009/06/08 21:48:41, iposva wrote:
> For consistency we should start using V8_HOST_ARCH_ARM instead of
> "defined(__arm__)".

done.

Powered by Google App Engine
This is Rietveld 408576698