summaryrefslogtreecommitdiff
path: root/src/cmd/8g/align.c
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-03-31 00:22:59 -0700
committerRuss Cox <rsc@golang.org>2009-03-31 00:22:59 -0700
commit826b1ac7ec294deccb021738fccc381f63d68ffb (patch)
tree635981c2071b5d51e36fc2a051c668cd31469948 /src/cmd/8g/align.c
parentfd21f3e9459fc5ea52ade3608dcdbb5b37f95bc9 (diff)
downloadgolang-826b1ac7ec294deccb021738fccc381f63d68ffb.tar.gz
minimal 8g. can compile
package main func main() { } and not much else. R=ken OCL=26943 CL=26943
Diffstat (limited to 'src/cmd/8g/align.c')
-rw-r--r--src/cmd/8g/align.c38
1 files changed, 38 insertions, 0 deletions
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();
+}