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

Issue 264773004: Arm64: Ensure that csp is always aligned to 16 byte values even if jssp is not. (Closed)

Created:
6 years, 7 months ago by rmcilroy
Modified:
6 years, 7 months ago
Reviewers:
ulan, jbramley
CC:
v8-dev
Visibility:
Public.

Description

Arm64: Ensure that csp is always aligned to 16 byte values even if jssp is not. Even although the Arm64 specification specifies that csp only needs to be aligned to 16 bytes if it is dereferenced, some implementations show poor performance if csp is every set to a non-aligned value. This CL ensures that csp is always aligned to 16 byte values on these platforms and adds checks to ensure this in debug mode. Also makes the following change: - Enable CPU support for arm64 to enable probing of cpu implementer and cpu part. - Add ALWAYS_ALIGN_CSP CpuFeature for Arm64 and set it based on runtime probing of the cpu implementer. - Rename PrepareForPush and PrepareForPop to PushPreamble and PopPostamble and move PopPostable after the pop. - R=jacob.bramley@arm.com, ulan@chromium.org Committed: https://code.google.com/p/v8/source/detail?r=21177

Patch Set 1 : #

Total comments: 10

Patch Set 2 : Address Jacobs comments. #

Patch Set 3 : Add additional stack consistency checks. #

Patch Set 4 : Only align csp on affected platforms. #

Total comments: 2

Patch Set 5 : Sync #

Unified diffs Side-by-side diffs Delta from patch set Stats (+161 lines, -76 lines) Patch
M src/arm64/cpu-arm64.h View 1 2 3 3 chunks +14 lines, -11 lines 0 comments Download
M src/arm64/cpu-arm64.cc View 1 2 3 4 2 chunks +19 lines, -2 lines 0 comments Download
M src/arm64/macro-assembler-arm64.h View 1 2 3 4 2 chunks +16 lines, -6 lines 0 comments Download
M src/arm64/macro-assembler-arm64.cc View 1 2 3 4 15 chunks +25 lines, -31 lines 0 comments Download
M src/arm64/macro-assembler-arm64-inl.h View 1 2 3 4 chunks +51 lines, -24 lines 0 comments Download
M src/arm64/regexp-macro-assembler-arm64.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M src/cpu.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M src/cpu.cc View 1 2 3 2 chunks +27 lines, -1 line 0 comments Download
M src/flag-definitions.h View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M src/v8globals.h View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 13 (0 generated)
rmcilroy
6 years, 7 months ago (2014-05-01 13:18:27 UTC) #1
jbramley
https://codereview.chromium.org/264773004/diff/40001/src/arm64/macro-assembler-arm64-inl.h File src/arm64/macro-assembler-arm64-inl.h (right): https://codereview.chromium.org/264773004/diff/40001/src/arm64/macro-assembler-arm64-inl.h#newcode1258 src/arm64/macro-assembler-arm64-inl.h:1258: // TODO(jbramley): Several callers rely on this not using ...
6 years, 7 months ago (2014-05-01 15:17:10 UTC) #2
rmcilroy
Thanks Jacob https://codereview.chromium.org/264773004/diff/40001/src/arm64/macro-assembler-arm64-inl.h File src/arm64/macro-assembler-arm64-inl.h (right): https://codereview.chromium.org/264773004/diff/40001/src/arm64/macro-assembler-arm64-inl.h#newcode1258 src/arm64/macro-assembler-arm64-inl.h:1258: // TODO(jbramley): Several callers rely on this ...
6 years, 7 months ago (2014-05-01 18:29:11 UTC) #3
ulan
There are other places assign to the csp directly: RegExpMacroAssemblerARM64::GetCode, MacroAssembler::LogicalMacro Maybe add debug checks ...
6 years, 7 months ago (2014-05-02 08:08:46 UTC) #4
jbramley
On 2014/05/01 18:29:11, rmcilroy wrote: > > Since we added UseScratchRegisterScope, I don't think this ...
6 years, 7 months ago (2014-05-02 09:17:31 UTC) #5
rmcilroy
On 2014/05/02 08:08:46, ulan wrote: > There are other places assign to the csp directly: ...
6 years, 7 months ago (2014-05-02 14:48:06 UTC) #6
rmcilroy
On 2014/05/02 09:17:31, jbramley wrote: > On 2014/05/01 18:29:11, rmcilroy wrote: > > > Since ...
6 years, 7 months ago (2014-05-02 15:03:19 UTC) #7
rmcilroy
Updated to make CSP alignment conditional on whether we are running on an affected platform ...
6 years, 7 months ago (2014-05-06 13:37:55 UTC) #8
rmcilroy
Updated to make CSP alignment conditional on whether we are running on an affected platform ...
6 years, 7 months ago (2014-05-06 13:37:57 UTC) #9
jbramley
lgtm https://codereview.chromium.org/264773004/diff/100001/src/arm64/cpu-arm64.cc File src/arm64/cpu-arm64.cc (right): https://codereview.chromium.org/264773004/diff/100001/src/arm64/cpu-arm64.cc#newcode136 src/arm64/cpu-arm64.cc:136: static_cast<uint64_t>(1) << ALWAYS_ALIGN_CSP; Doesn't that fit on one ...
6 years, 7 months ago (2014-05-06 14:02:30 UTC) #10
ulan
lgtm, thank you for fixing it.
6 years, 7 months ago (2014-05-06 14:06:43 UTC) #11
rmcilroy
Thanks! https://codereview.chromium.org/264773004/diff/100001/src/arm64/cpu-arm64.cc File src/arm64/cpu-arm64.cc (right): https://codereview.chromium.org/264773004/diff/100001/src/arm64/cpu-arm64.cc#newcode136 src/arm64/cpu-arm64.cc:136: static_cast<uint64_t>(1) << ALWAYS_ALIGN_CSP; On 2014/05/06 14:02:30, jbramley wrote: ...
6 years, 7 months ago (2014-05-06 15:55:11 UTC) #12
rmcilroy
6 years, 7 months ago (2014-05-06 15:56:27 UTC) #13
Message was sent while issue was closed.
Committed patchset #5 manually as r21177 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698