Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(726)

Issue 11023043: code review 11023043: go.tools/ssa: fix regression in x<<y logic from CL 11011043 (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 8 months ago by adonovan
Modified:
10 years, 8 months ago
Reviewers:
gri
CC:
gri, golang-dev
Visibility:
Public.

Description

go.tools/ssa: fix regression in x<<y logic from CL 11011043 Details: - reintroduce interp.asUint64: it's not sound to use only the low 32 bits of y, which is what asInt gives us, when GOARCH=386. - instead, emit a uint64 conversion when y is not unsigned (i.e. a signed var, or an untyped constant). Tested on 386 & x86-64.

Patch Set 1 #

Patch Set 2 : diff -r 555a4a3ea9ea https://code.google.com/p/go.tools #

Patch Set 3 : diff -r 555a4a3ea9ea https://code.google.com/p/go.tools #

Patch Set 4 : diff -r 555a4a3ea9ea https://code.google.com/p/go.tools #

Patch Set 5 : diff -r a693ede1549e https://code.google.com/p/go.tools #

Unified diffs Side-by-side diffs Delta from patch set Stats (+28 lines, -2 lines) Patch
M ssa/emit.go View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M ssa/interp/ops.go View 1 4 chunks +23 lines, -2 lines 0 comments Download

Messages

Total messages: 3
adonovan
Hello gri@golang.org (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go.tools
10 years, 8 months ago (2013-07-09 02:17:25 UTC) #1
gri
LGTM
10 years, 8 months ago (2013-07-09 03:23:45 UTC) #2
adonovan
10 years, 8 months ago (2013-07-09 14:21:27 UTC) #3
*** Submitted as
https://code.google.com/p/go/source/detail?r=470b8e987d2d&repo=tools ***

go.tools/ssa: fix regression in x<<y logic from CL 11011043

Details:
- reintroduce interp.asUint64: it's not sound to use only the
  low 32 bits of y, which is what asInt gives us, when GOARCH=386.
- instead, emit a uint64 conversion when y is not unsigned
  (i.e. a signed var, or an untyped constant).

Tested on 386 & x86-64.

R=gri
CC=golang-dev
https://codereview.appspot.com/11023043
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b