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

Issue 1852713004: Subzero: Fix a cleanup error after the IceString removal CL. (Closed)

Created:
4 years, 8 months ago by Jim Stichnoth
Modified:
4 years, 8 months ago
Reviewers:
Eric Holk, Karl, sehr, John
CC:
native-client-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Subzero: Fix a cleanup error after the IceString removal CL. This corrects a "cleanup" mistake in line 414/417 of https://codereview.chromium.org/1838753002/diff/120001/src/IceTargetLoweringX8664.cpp . This wasn't caught before because "make presubmit" doesn't run any sandboxed x86-64 tests. So we add that to the presubmit script. In addition, the "make check-spec" is changed to run each spec component via the "--run" flag of szbuild_spec2k.py. Otherwise, the makefile was hard-coding running the native binary setup instead of the sandboxed or nonsfi setup. BUG= none R=jpp@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=45f7700f3d51ba04c1d82b04a58b2cfeeb830441

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -15 lines) Patch
M Makefile.standalone View 5 chunks +12 lines, -11 lines 0 comments Download
M src/IceTargetLoweringX8664.cpp View 1 chunk +4 lines, -4 lines 0 comments Download

Messages

Total messages: 8 (3 generated)
Jim Stichnoth
4 years, 8 months ago (2016-04-01 23:09:25 UTC) #3
John
lgtm What was the error that this is fixing? I remember adding this test while ...
4 years, 8 months ago (2016-04-02 00:58:12 UTC) #4
Jim Stichnoth
On 2016/04/02 00:58:12, John wrote: > lgtm > > What was the error that this ...
4 years, 8 months ago (2016-04-02 01:25:26 UTC) #5
Jim Stichnoth
Committed patchset #1 (id:1) manually as 45f7700f3d51ba04c1d82b04a58b2cfeeb830441 (presubmit successful).
4 years, 8 months ago (2016-04-02 01:26:21 UTC) #7
Jim Stichnoth
4 years, 8 months ago (2016-04-02 02:23:08 UTC) #8
Message was sent while issue was closed.
On 2016/04/02 00:58:12, John wrote:
> lgtm
> 
> What was the error that this is fixing? I remember adding this test while
> implementing the x86-64 sandbox, and I'm surprised by the fix.

The original code in IceTargetLoweringX8664.cpp computed whether a
ConstantRelocatable address calculation can be done directly versus requiring an
lea instruction, via the test:

  NeedsLea = CR->getName() != "" || CR->getOffset() < 0;

It turns out that CR->getName() is *never* empty, and neither of us could recall
how it might have been empty in the original CL that introduced it.  Since the
IceString removal CL makes these names optional, that getName() test needed to
be collapsed:

  NeedsLea = true || CR->getOffset() < 0;

which I further simplified to:

  NeedsLea = CR->getOffset() < 0;

Oops!  It should have actually simplified to:

  NeedsLea = true;

As a result, there were some direct dereferences in the generated code that
should have been an lea.

Powered by Google App Engine
This is Rietveld 408576698