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

Delta Between Two Patch Sets: test/fixedbugs/issue4396a.go

Issue 6854063: code review 6854063: cmd/5g: use MOVB for fixed array nil check (Closed)
Left Patch Set: diff -r 11094b97d92a https://go.googlecode.com/hg/ Created 11 years, 4 months ago
Right Patch Set: diff -r 6e0e4077f488 https://go.googlecode.com/hg/ Created 11 years, 3 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « src/cmd/5g/cgen.c ('k') | test/fixedbugs/issue4396b.go » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 // run
2
3 // Copyright 2012 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
6
7 // Issue 4396. Arrays of bytes are not required to be
8 // word aligned. 5g should use MOVB to load the address
9 // of s.g[0] for its nil check.
10 //
11 // This test _may_ fail on arm, but requires the host to·
12 // trap unaligned loads. This is generally done with
13 //
14 // echo "4" > /proc/cpu/alignment
15
16 package main
17
18 var s = struct {
19 // based on lzw.decoder
20 a, b, c, d, e uint16
21 f [4096]uint8
22 g [4096]uint8
23 }{}
24
25 func main() {
26 s.g[0] = 1
27 }
LEFTRIGHT

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