summaryrefslogtreecommitdiff
path: root/src/cmd/5g/galign.c
diff options
context:
space:
mode:
authorKai Backman <kaib@golang.org>2009-05-28 14:25:54 -0700
committerKai Backman <kaib@golang.org>2009-05-28 14:25:54 -0700
commit8493458a57c11b9480d12a13c82f26a75e5c375d (patch)
treef35b56e8ceaf9bf0767f5a11d16fbb6f3d335966 /src/cmd/5g/galign.c
parent8cdffaa1759e4b676b8d14ae74ab57329c9cc6df (diff)
downloadgo-8493458a57c11b9480d12a13c82f26a75e5c375d.tar.gz
Rebooted 5g effort from 6g. Tons of minor fixes and tweaks to
get the code going. R=rsc APPROVED=rsc DELTA=4752 (1723 added, 948 deleted, 2081 changed) OCL=29403 CL=29530
Diffstat (limited to 'src/cmd/5g/galign.c')
-rw-r--r--src/cmd/5g/galign.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/cmd/5g/galign.c b/src/cmd/5g/galign.c
new file mode 100644
index 000000000..2633994a3
--- /dev/null
+++ b/src/cmd/5g/galign.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 = '5';
+char* thestring = "arm";
+
+
+/*
+ * go declares several platform-specific type aliases:
+ * int, uint, float, and uintptr
+ */
+Typedef typedefs[] =
+{
+ "int", TINT, TINT32,
+ "uint", TUINT, TUINT32,
+ "uintptr", TUINTPTR, TUINT64,
+ "float", TFLOAT, TFLOAT32,
+ 0
+};
+
+void
+betypeinit(void)
+{
+ maxround = 8;
+ widthptr = 8;
+
+ 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();
+}