1
0
mirror of https://github.com/golang/go synced 2024-11-23 21:20:03 -07:00

cmd/5l, cmd/8g: fix build failures

REG_R0 etc are defined in <ucontext.h> on ARM systems.
Possible use of uninitialized n in 8g/reg.c.

Change-Id: I6e8ce83a6515ca2b779ed8a344a25432db629cc2
Reviewed-on: https://go-review.googlesource.com/3578
Reviewed-by: Russ Cox <rsc@golang.org>
This commit is contained in:
Russ Cox 2015-01-29 23:49:27 -05:00
parent d968bda66f
commit dc3961cfdc
2 changed files with 20 additions and 0 deletions

View File

@ -40,6 +40,24 @@ enum
#define REGARG -1
/*c2go enum { REGARG = -1 }; */
// avoid conflict with ucontext.h. sigh.
#define REG_R0 GO_REG_R0
#define REG_R1 GO_REG_R1
#define REG_R2 GO_REG_R2
#define REG_R3 GO_REG_R3
#define REG_R4 GO_REG_R4
#define REG_R5 GO_REG_R5
#define REG_R6 GO_REG_R6
#define REG_R7 GO_REG_R7
#define REG_R8 GO_REG_R8
#define REG_R9 GO_REG_R9
#define REG_R10 GO_REG_R10
#define REG_R11 GO_REG_R11
#define REG_R12 GO_REG_R12
#define REG_R13 GO_REG_R13
#define REG_R14 GO_REG_R14
#define REG_R15 GO_REG_R15
enum
{
REG_R0 = 32, // must be 16-aligned

View File

@ -615,6 +615,8 @@ mkvar(Reg *r, Adr *a)
case TYPE_MEM:
switch(a->name) {
default:
goto none;
case NAME_EXTERN:
case NAME_STATIC:
case NAME_PARAM: