diff options
author | Russ Cox <rsc@golang.org> | 2013-08-12 13:05:40 -0400 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2013-08-12 13:05:40 -0400 |
commit | 06cad1908a11265090cf59221972c33f6f055280 (patch) | |
tree | 53ee26bc50ac2a9b92fe4b03affa653282a43ee5 /src/cmd/6g/prog.c | |
parent | 445c9f32bef19b2074cc04161a62821fcc571a92 (diff) | |
download | go-06cad1908a11265090cf59221972c33f6f055280.tar.gz |
cmd/8g: factor out prog information
Like CL 12637051, but for 8g instead of 6g.
Fix a few minor 6g errors too.
R=ken2
CC=golang-dev
https://codereview.appspot.com/12778043
Diffstat (limited to 'src/cmd/6g/prog.c')
-rw-r--r-- | src/cmd/6g/prog.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/cmd/6g/prog.c b/src/cmd/6g/prog.c index 697c1f877..23dde99c1 100644 --- a/src/cmd/6g/prog.c +++ b/src/cmd/6g/prog.c @@ -1,3 +1,7 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + #include <u.h> #include <libc.h> #include "gg.h" @@ -35,6 +39,11 @@ static ProgInfo progtable[ALAST] = { [AFUNCDATA]= {Pseudo}, [APCDATA]= {Pseudo}, + // NOP is an internal no-op that also stands + // for USED and SET annotations, not the Intel opcode. + [ANOP]= {LeftRead | RightWrite}, + + [AADCL]= {SizeL | LeftRead | RightRdwr | SetCarry | UseCarry}, [AADCQ]= {SizeQ | LeftRead | RightRdwr | SetCarry | UseCarry}, [AADCW]= {SizeW | LeftRead | RightRdwr | SetCarry | UseCarry}, @@ -176,13 +185,10 @@ static ProgInfo progtable[ALAST] = { [ANEGQ]= {SizeQ | RightRdwr | SetCarry}, [ANEGW]= {SizeW | RightRdwr | SetCarry}, - // NOP is the opcode for USED and SET annotations, not the Intel opcode. - [ANOP]= {LeftRead | RightWrite}, - [ANOTB]= {SizeB | RightRdwr}, [ANOTL]= {SizeL | RightRdwr}, [ANOTQ]= {SizeQ | RightRdwr}, - [ANOTW]= {SizeQ | RightRdwr}, + [ANOTW]= {SizeW | RightRdwr}, [AORB]= {SizeB | LeftRead | RightRdwr | SetCarry}, [AORL]= {SizeL | LeftRead | RightRdwr | SetCarry}, @@ -190,7 +196,7 @@ static ProgInfo progtable[ALAST] = { [AORW]= {SizeW | LeftRead | RightRdwr | SetCarry}, [APOPQ]= {SizeQ | RightWrite}, - [APUSHQ]= {SizeQ | RightWrite}, + [APUSHQ]= {SizeQ | LeftRead}, [ARCLB]= {SizeB | LeftRead | RightRdwr | ShiftCX | SetCarry | UseCarry}, [ARCLL]= {SizeL | LeftRead | RightRdwr | ShiftCX | SetCarry | UseCarry}, |