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

Issue 131333011: A64: When truncating to an int, store the result in a 64bit register (Closed)

Created:
6 years, 10 months ago by jochen (gone - plz use gerrit)
Modified:
6 years, 10 months ago
CC:
v8-dev
Visibility:
Public.

Description

A64: When truncating to an int, store the result in a 64bit register We don't check later one whether the result is 32bit or 64bit, so we end up using an undefined value otherwise. BUG=none R=ulan@chromium.org, rmcilroy@chromium.org, rodolph.perfetta@arm.com TEST=mjsunit/sin-cos.js LOG=n Committed: https://code.google.com/p/v8/source/detail?r=19279

Patch Set 1 #

Patch Set 2 : updates #

Total comments: 1

Patch Set 3 : updates #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -23 lines) Patch
M src/a64/lithium-codegen-a64.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M src/a64/macro-assembler-a64.h View 1 3 chunks +3 lines, -7 lines 0 comments Download
M src/a64/macro-assembler-a64.cc View 1 1 chunk +1 line, -8 lines 0 comments Download
M test/cctest/test-assembler-a64.cc View 1 2 1 chunk +1 line, -7 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
jochen (gone - plz use gerrit)
6 years, 10 months ago (2014-02-11 12:50:28 UTC) #1
ulan
lgtm
6 years, 10 months ago (2014-02-11 12:52:45 UTC) #2
jochen (gone - plz use gerrit)
updated to remove the now dead code from macro assembler and updated tests PTAL
6 years, 10 months ago (2014-02-11 12:56:18 UTC) #3
rmcilroy
On 2014/02/11 12:56:18, jochen wrote: > updated to remove the now dead code from macro ...
6 years, 10 months ago (2014-02-11 12:58:17 UTC) #4
ulan
lgtm
6 years, 10 months ago (2014-02-11 12:58:28 UTC) #5
jochen (gone - plz use gerrit)
Committed patchset #3 manually as r19279 (presubmit successful).
6 years, 10 months ago (2014-02-11 12:58:31 UTC) #6
jbramley
https://codereview.chromium.org/131333011/diff/40001/src/a64/lithium-codegen-a64.cc File src/a64/lithium-codegen-a64.cc (right): https://codereview.chromium.org/131333011/diff/40001/src/a64/lithium-codegen-a64.cc#newcode5496 src/a64/lithium-codegen-a64.cc:5496: : MacroAssembler::INT32); Our convention for Lithium instructions is to ...
6 years, 10 months ago (2014-02-11 12:58:50 UTC) #7
jochen (gone - plz use gerrit)
On 2014/02/11 12:58:50, jbramley wrote: > https://codereview.chromium.org/131333011/diff/40001/src/a64/lithium-codegen-a64.cc > File src/a64/lithium-codegen-a64.cc (right): > > https://codereview.chromium.org/131333011/diff/40001/src/a64/lithium-codegen-a64.cc#newcode5496 > ...
6 years, 10 months ago (2014-02-11 13:01:02 UTC) #8
Rodolph Perfetta
not lgtm. As Jacob explained the top bits shouldn't be read, if you found a ...
6 years, 10 months ago (2014-02-11 13:02:04 UTC) #9
jochen (gone - plz use gerrit)
On 2014/02/11 13:02:04, Rodolph Perfetta wrote: > not lgtm. > > As Jacob explained the ...
6 years, 10 months ago (2014-02-11 13:05:16 UTC) #10
jbramley
On 2014/02/11 13:05:16, jochen wrote: > On 2014/02/11 13:02:04, Rodolph Perfetta wrote: > > not ...
6 years, 10 months ago (2014-02-11 13:24:43 UTC) #11
jochen (gone - plz use gerrit)
6 years, 10 months ago (2014-02-11 13:40:38 UTC) #12
Message was sent while issue was closed.
On 2014/02/11 13:24:43, jbramley wrote:
> On 2014/02/11 13:05:16, jochen wrote:
> > On 2014/02/11 13:02:04, Rodolph Perfetta wrote:
> > > not lgtm.
> > > 
> > > As Jacob explained the top bits shouldn't be read, if you found a case
where
> > it
> > > is, then there is another bug lurking and you are just hiding it.
> > 
> > As mentioned above, LCodeGen::DoBoundsCheck compares x registers with each
> > other.
> > 
> > So a better fix was to use ToRegister32 in DoBoundsCheck?
> 
> For the Integer32 representation, yes, though smi representations need a
64-bit
> comparison, so you have to use the representation to select between ToRegister
> and ToRegister32. The constant-index case already does this, though it gets it
> wrong because it still compares an X-sized 'length' with the constant.
> 
> MulConstIS is an example of how this is handled elsewhere. We sometimes also
> split instructions for different representations (like DoAddI and DoAddS).

I guess I'm just unlucky, but the code following the bounds check can't cope
with the clobbered upper 32bit either... filed
https://code.google.com/p/v8/issues/detail?id=3149 to track this.

Powered by Google App Engine
This is Rietveld 408576698