[dev.cc] cmd/asm: fix a few minor issues

Fix one place where semicolons were not recognized and fix the
pattern match for the syntax of some pseudo ops.
Also clean up a couple of unreachable code pieces.

There is still an undiagnosed bit difference betwen old and new .6
files. TBD.

With these fixes, asm can successfully compile and test the entire tree.
(Verified by
	turn off verifyAsm in cmd/go
	make.bash
	cp $GOROOT/bin/asm $GOROOT/pkg/tool/darwin_amd64/6a
	go test -short std
)

Change-Id: I91ea892098f76ef4f129fd2530e0c63ffd8745a9
Reviewed-on: https://go-review.googlesource.com/3688
Reviewed-by: Russ Cox <rsc@golang.org>
This commit is contained in:
Rob Pike 2015-02-02 10:56:41 -08:00
parent 5beec6a699
commit 68475da68d
6 changed files with 20 additions and 21 deletions

View file

@ -7,7 +7,6 @@ package main
import (
"flag"
"fmt"
"go/build"
"log"
"os"
@ -23,14 +22,14 @@ func main() {
log.SetFlags(0)
log.SetPrefix("asm: ")
GOARCH := build.Default.GOARCH
GOARCH := obj.Getgoarch()
architecture := arch.Set(GOARCH)
if architecture == nil {
log.Fatalf("asm: unrecognized architecture %s", GOARCH)
}
flags.Parse(obj.Getgoroot(), obj.Getgoos(), obj.Getgoarch(), architecture.Thechar)
flags.Parse(architecture.Thechar)
// Create object file, write header.
fd, err := os.Create(*flags.OutputFile)