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

Issue 6002043: code review 6002043: 6c, 6g, 6l: add MOVQL to make truncation explicit (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 7 months ago by rsc
Modified:
12 years, 7 months ago
Reviewers:
ken3
CC:
ken2, golang-dev
Visibility:
Public.

Description

6c, 6g, 6l: add MOVQL to make truncation explicit Without an explicit signal for a truncation, copy propagation will sometimes propagate a 32-bit truncation and end up overwriting uses of the original 64-bit value. The case that arose in practice is in C but I believe that the same could plausibly happen in Go. The main reason we didn't run into the same in Go is that I (perhaps incorrectly?) drop MOVL AX, AX during gins, so the truncation was never generated, so it didn't confuse the optimizer. Fixes issue 1315. Fixes issue 3488.

Patch Set 1 #

Patch Set 2 : diff -r 775ac193aad2 https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r 72678c75b2d3 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+54 lines, -29 lines) Patch
M src/cmd/6c/peep.c View 1 2 chunks +2 lines, -0 lines 0 comments Download
M src/cmd/6c/reg.c View 1 1 chunk +1 line, -0 lines 0 comments Download
M src/cmd/6c/txt.c View 1 5 chunks +40 lines, -28 lines 0 comments Download
M src/cmd/6g/gsubr.c View 1 1 chunk +4 lines, -1 line 0 comments Download
M src/cmd/6g/peep.c View 1 2 chunks +2 lines, -0 lines 0 comments Download
M src/cmd/6g/reg.c View 1 1 chunk +1 line, -0 lines 0 comments Download
M src/cmd/6l/6.out.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M src/cmd/6l/optab.c View 1 2 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 3
rsc
Hello ken2 (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
12 years, 7 months ago (2012-04-10 16:51:56 UTC) #1
rsc
*** Submitted as http://code.google.com/p/go/source/detail?r=a9e09f1fe373 *** 6c, 6g, 6l: add MOVQL to make truncation explicit Without ...
12 years, 7 months ago (2012-04-10 16:52:03 UTC) #2
ken3
12 years, 7 months ago (2012-04-11 00:59:57 UTC) #3
lgtm
Sign in to reply to this message.

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