From 826b1ac7ec294deccb021738fccc381f63d68ffb Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Tue, 31 Mar 2009 00:22:59 -0700 Subject: minimal 8g. can compile package main func main() { } and not much else. R=ken OCL=26943 CL=26943 --- src/cmd/8g/align.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/cmd/8g/align.c (limited to 'src/cmd/8g/align.c') diff --git a/src/cmd/8g/align.c b/src/cmd/8g/align.c new file mode 100644 index 000000000..351cd01b7 --- /dev/null +++ b/src/cmd/8g/align.c @@ -0,0 +1,38 @@ +// Copyright 2009 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 "gg.h" + +int thechar = '8'; +char* thestring = "386"; + + +/* + * go declares several platform-specific type aliases: + * int, uint, float, and uintptr + */ +Typedef typedefs[] = +{ + "int", TINT, TINT32, + "uint", TUINT, TUINT32, + "uintptr", TUINTPTR, TUINT32, + "float", TFLOAT, TFLOAT32, + 0 +}; + +void +betypeinit(void) +{ + maxround = 4; + widthptr = 4; + + zprog.link = P; + zprog.as = AGOK; + zprog.from.type = D_NONE; + zprog.from.index = D_NONE; + zprog.from.scale = 0; + zprog.to = zprog.from; + + listinit(); +} -- cgit v1.2.3