cmd/7g: add ARM64 Go compiler, based on 9g

No peep optimizer yet.

Change-Id: Ifa5f993cd6ac5e34783c0df41faf772fbce96ae2
Reviewed-on: https://go-review.googlesource.com/7049
Reviewed-by: Russ Cox <rsc@golang.org>
This commit is contained in:
Aram Hăvărneanu 2015-03-08 14:16:29 +01:00
parent 3d1ce27ba5
commit 02c1a9d87d
13 changed files with 513 additions and 1748 deletions

View file

@ -80,7 +80,7 @@ func Gbranch(as int, t *Type, likely int) *obj.Prog {
p := Prog(as)
p.To.Type = obj.TYPE_BRANCH
p.To.U.Branch = nil
if as != obj.AJMP && likely != 0 && Thearch.Thechar != '9' {
if as != obj.AJMP && likely != 0 && Thearch.Thechar != '9' && Thearch.Thechar != '7' {
p.From.Type = obj.TYPE_CONST
p.From.Offset = int64(bool2int(likely > 0))
}
@ -423,7 +423,7 @@ func Naddr(n *Node) (a obj.Addr) {
case OADDR:
a = Naddr(n.Left)
a.Etype = uint8(Tptr)
if Thearch.Thechar != '5' && Thearch.Thechar != '9' { // TODO(rsc): Do this even for arm, ppc64.
if Thearch.Thechar != '5' && Thearch.Thechar != '7' && Thearch.Thechar != '9' { // TODO(rsc): Do this even for arm, ppc64.
a.Width = int64(Widthptr)
}
if a.Type != obj.TYPE_MEM {
@ -461,7 +461,7 @@ func Naddr(n *Node) (a obj.Addr) {
break // len(nil)
}
a.Etype = Simtype[TUINT]
if Thearch.Thechar == '9' {
if Thearch.Thechar == '7' || Thearch.Thechar == '9' {
a.Etype = Simtype[TINT]
}
a.Offset += int64(Array_nel)
@ -477,7 +477,7 @@ func Naddr(n *Node) (a obj.Addr) {
break // cap(nil)
}
a.Etype = Simtype[TUINT]
if Thearch.Thechar == '9' {
if Thearch.Thechar == '7' || Thearch.Thechar == '9' {
a.Etype = Simtype[TINT]
}
a.Offset += int64(Array_cap)
@ -560,7 +560,7 @@ fp:
if Thearch.Thechar == '5' {
n.Xoffset += 4
}
if Thearch.Thechar == '9' {
if Thearch.Thechar == '7' || Thearch.Thechar == '9' {
n.Xoffset += 8
}