]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.power64] cmd/dist: tell goc2c that power64 is 64-bit system
authorRuss Cox <rsc@golang.org>
Thu, 14 Aug 2014 18:34:48 +0000 (14:34 -0400)
committerRuss Cox <rsc@golang.org>
Thu, 14 Aug 2014 18:34:48 +0000 (14:34 -0400)
LGTM=minux
R=minux
CC=golang-codereviews
https://golang.org/cl/125300043

src/cmd/dist/goc2c.c

index 38627657ec146a9c6dad01878aae1f2092394cc6..72cbc1be62e7707b968397132c1267e84f757701 100644 (file)
@@ -786,7 +786,11 @@ goc2c(char *goc, char *c)
        // TODO: set gcc=1 when using gcc
 
        if(!gcc) {
-               if(streq(goarch, "amd64")) {
+               if(contains(goarch, "64p32")) {
+                       type_table[Uintptr].size = 4;
+                       type_table[Int].size = 4;
+                       structround = 8;
+               } else if(contains(goarch, "64")) {
                        type_table[Uintptr].size = 8;
                        if(use64bitint) {
                                type_table[Int].size = 8;
@@ -794,10 +798,6 @@ goc2c(char *goc, char *c)
                                type_table[Int].size = 4;
                        }
                        structround = 8;
-               } else if(streq(goarch, "amd64p32")) {
-                       type_table[Uintptr].size = 4;
-                       type_table[Int].size = 4;
-                       structround = 8;
                } else {
                        // NOTE: These are set in the initializer,
                        // but they might have been changed by a