Sascha Peilicke 2011-06-30 09:17:40 +00:00 committed by Git OBS Bridge
parent 7c49a62bad
commit e87a20cca6
8 changed files with 40 additions and 685 deletions

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:63dbf3d2d2f01f68045122f8778895810e6c18572e2450b025f296934f9a031c
size 8619225

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:dae2241b0c3e46450413bdf30a0fb6e23d63275e7e664263b7e41b9681cdd58d
size 8819385

View File

@ -1,583 +0,0 @@
diff --git a/src/cmd/ld/elf.c b/src/cmd/ld/elf.c
--- a/src/cmd/ld/elf.c
+++ b/src/cmd/ld/elf.c
@@ -265,7 +265,7 @@
uint32 h = 0, g;
while (*name) {
h = (h << 4) + *name++;
- if (g = h & 0xf0000000)
+ if ((g = h & 0xf0000000))
h ^= g >> 24;
h &= 0x0fffffff;
}
diff --git a/src/lib9/await.c b/src/lib9/await.c
--- a/src/lib9/await.c
+++ b/src/lib9/await.c
@@ -42,44 +42,44 @@
int sig;
char *str;
} tab[] = {
- SIGHUP, "hangup",
- SIGINT, "interrupt",
- SIGQUIT, "quit",
- SIGILL, "sys: illegal instruction",
- SIGTRAP, "sys: breakpoint",
- SIGABRT, "sys: abort",
+ {SIGHUP, "hangup"},
+ {SIGINT, "interrupt"},
+ {SIGQUIT, "quit"},
+ {SIGILL, "sys: illegal instruction"},
+ {SIGTRAP, "sys: breakpoint"},
+ {SIGABRT, "sys: abort"},
#ifdef SIGEMT
- SIGEMT, "sys: emulate instruction executed",
+ {SIGEMT, "sys: emulate instruction executed"},
#endif
- SIGFPE, "sys: fp: trap",
- SIGKILL, "sys: kill",
- SIGBUS, "sys: bus error",
- SIGSEGV, "sys: segmentation violation",
- SIGALRM, "alarm",
- SIGTERM, "kill",
- SIGURG, "sys: urgent condition on socket",
- SIGSTOP, "sys: stop",
- SIGTSTP, "sys: tstp",
- SIGCONT, "sys: cont",
- SIGCHLD, "sys: child",
- SIGTTIN, "sys: ttin",
- SIGTTOU, "sys: ttou",
+ {SIGFPE, "sys: fp: trap"},
+ {SIGKILL, "sys: kill"},
+ {SIGBUS, "sys: bus error"},
+ {SIGSEGV, "sys: segmentation violation"},
+ {SIGALRM, "alarm"},
+ {SIGTERM, "kill"},
+ {SIGURG, "sys: urgent condition on socket"},
+ {SIGSTOP, "sys: stop"},
+ {SIGTSTP, "sys: tstp"},
+ {SIGCONT, "sys: cont"},
+ {SIGCHLD, "sys: child"},
+ {SIGTTIN, "sys: ttin"},
+ {SIGTTOU, "sys: ttou"},
#ifdef SIGIO /* not on Mac OS X Tiger */
- SIGIO, "sys: i/o possible on fd",
+ {SIGIO, "sys: i/o possible on fd"},
#endif
- SIGXCPU, "sys: cpu time limit exceeded",
- SIGXFSZ, "sys: file size limit exceeded",
- SIGVTALRM, "sys: virtual time alarm",
- SIGPROF, "sys: profiling timer alarm",
+ {SIGXCPU, "sys: cpu time limit exceeded"},
+ {SIGXFSZ, "sys: file size limit exceeded"},
+ {SIGVTALRM, "sys: virtual time alarm"},
+ {SIGPROF, "sys: profiling timer alarm"},
#ifdef SIGWINCH /* not on Mac OS X Tiger */
- SIGWINCH, "sys: window size change",
+ {SIGWINCH, "sys: window size change"},
#endif
#ifdef SIGINFO
- SIGINFO, "sys: status request",
+ {SIGINFO, "sys: status request"},
#endif
- SIGUSR1, "sys: usr1",
- SIGUSR2, "sys: usr2",
- SIGPIPE, "sys: write on closed pipe",
+ {SIGUSR1, "sys: usr1"},
+ {SIGUSR2, "sys: usr2"},
+ {SIGPIPE, "sys: write on closed pipe"},
};
char*
diff --git a/src/lib9/fmt/fmt.c b/src/lib9/fmt/fmt.c
--- a/src/lib9/fmt/fmt.c
+++ b/src/lib9/fmt/fmt.c
@@ -40,47 +40,47 @@
} fmtalloc;
static Convfmt knownfmt[] = {
- ' ', __flagfmt,
- '#', __flagfmt,
- '%', __percentfmt,
- '\'', __flagfmt,
- '+', __flagfmt,
- ',', __flagfmt,
- '-', __flagfmt,
- 'C', __runefmt, /* Plan 9 addition */
- 'E', __efgfmt,
+ {' ', __flagfmt},
+ {'#', __flagfmt},
+ {'%', __percentfmt},
+ {'\'', __flagfmt},
+ {'+', __flagfmt},
+ {',', __flagfmt},
+ {'-', __flagfmt},
+ {'C', __runefmt}, /* Plan 9 addition */
+ {'E', __efgfmt},
#ifndef PLAN9PORT
- 'F', __efgfmt, /* ANSI only */
+ {'F', __efgfmt}, /* ANSI only */
#endif
- 'G', __efgfmt,
+ {'G', __efgfmt},
#ifndef PLAN9PORT
- 'L', __flagfmt, /* ANSI only */
+ {'L', __flagfmt}, /* ANSI only */
#endif
- 'S', __runesfmt, /* Plan 9 addition */
- 'X', __ifmt,
- 'b', __ifmt, /* Plan 9 addition */
- 'c', __charfmt,
- 'd', __ifmt,
- 'e', __efgfmt,
- 'f', __efgfmt,
- 'g', __efgfmt,
- 'h', __flagfmt,
+ {'S', __runesfmt}, /* Plan 9 addition */
+ {'X', __ifmt},
+ {'b', __ifmt}, /* Plan 9 addition */
+ {'c', __charfmt},
+ {'d', __ifmt},
+ {'e', __efgfmt},
+ {'f', __efgfmt},
+ {'g', __efgfmt},
+ {'h', __flagfmt},
#ifndef PLAN9PORT
- 'i', __ifmt, /* ANSI only */
+ {'i', __ifmt}, /* ANSI only */
#endif
- 'l', __flagfmt,
- 'n', __countfmt,
- 'o', __ifmt,
- 'p', __ifmt,
- 'r', __errfmt,
- 's', __strfmt,
+ {'l', __flagfmt},
+ {'n', __countfmt},
+ {'o', __ifmt},
+ {'p', __ifmt},
+ {'r', __errfmt},
+ {'s', __strfmt},
#ifdef PLAN9PORT
- 'u', __flagfmt,
+ {'u', __flagfmt},
#else
- 'u', __ifmt,
+ {'u', __ifmt},
#endif
- 'x', __ifmt,
- 0, nil,
+ {'x', __ifmt},
+ {0, nil},
};
diff --git a/src/lib9/fmt/strtod.c b/src/lib9/fmt/strtod.c
--- a/src/lib9/fmt/strtod.c
+++ b/src/lib9/fmt/strtod.c
@@ -424,16 +424,16 @@
static Tab tab1[] =
{
- 1, 0, "",
- 3, 1, "7",
- 6, 2, "63",
- 9, 3, "511",
- 13, 4, "8191",
- 16, 5, "65535",
- 19, 6, "524287",
- 23, 7, "8388607",
- 26, 8, "67108863",
- 27, 9, "134217727",
+ { 1, 0, ""},
+ { 3, 1, "7"},
+ { 6, 2, "63"},
+ { 9, 3, "511"},
+ {13, 4, "8191"},
+ {16, 5, "65535"},
+ {19, 6, "524287"},
+ {23, 7, "8388607"},
+ {26, 8, "67108863"},
+ {27, 9, "134217727"},
};
static void
@@ -483,16 +483,16 @@
static Tab tab2[] =
{
- 1, 1, "", /* dp = 0-0 */
- 3, 3, "125",
- 6, 5, "15625",
- 9, 7, "1953125",
- 13, 10, "1220703125",
- 16, 12, "152587890625",
- 19, 14, "19073486328125",
- 23, 17, "11920928955078125",
- 26, 19, "1490116119384765625",
- 27, 19, "7450580596923828125", /* dp 8-9 */
+ { 1, 1, ""}, /* dp = 0-0 */
+ { 3, 3, "125"},
+ { 6, 5, "15625"},
+ { 9, 7, "1953125"},
+ {13, 10, "1220703125"},
+ {16, 12, "152587890625"},
+ {19, 14, "19073486328125"},
+ {23, 17, "11920928955078125"},
+ {26, 19, "1490116119384765625"},
+ {27, 19, "7450580596923828125"}, /* dp 8-9 */
};
static void
diff --git a/src/lib9/notify.c b/src/lib9/notify.c
--- a/src/lib9/notify.c
+++ b/src/lib9/notify.c
@@ -66,36 +66,36 @@
};
static Sig sigs[] = {
- SIGHUP, 0,
- SIGINT, 0,
- SIGQUIT, 0,
- SIGILL, 0,
- SIGTRAP, 0,
-/* SIGABRT, 0, */
+ {SIGHUP, 0},
+ {SIGINT, 0},
+ {SIGQUIT, 0},
+ {SIGILL, 0},
+ {SIGTRAP, 0},
+/* {SIGABRT, 0}, */
#ifdef SIGEMT
- SIGEMT, 0,
+ {SIGEMT, 0},
#endif
- SIGFPE, 0,
- SIGBUS, 0,
-/* SIGSEGV, 0, */
- SIGCHLD, Restart|Ignore,
- SIGSYS, 0,
- SIGPIPE, Ignore,
- SIGALRM, 0,
- SIGTERM, 0,
- SIGTSTP, Restart|Ignore,
-/* SIGTTIN, Restart|Ignore, */
-/* SIGTTOU, Restart|Ignore, */
- SIGXCPU, 0,
- SIGXFSZ, 0,
- SIGVTALRM, 0,
- SIGUSR1, 0,
- SIGUSR2, 0,
+ {SIGFPE, 0},
+ {SIGBUS, 0},
+/* {SIGSEGV, 0}, */
+ {SIGCHLD, Restart|Ignore},
+ {SIGSYS, 0},
+ {SIGPIPE, Ignore},
+ {SIGALRM, 0},
+ {SIGTERM, 0},
+ {SIGTSTP, Restart|Ignore},
+/* {SIGTTIN, Restart|Ignore}, */
+/* {SIGTTOU, Restart|Ignore}, */
+ {SIGXCPU, 0},
+ {SIGXFSZ, 0},
+ {SIGVTALRM, 0},
+ {SIGUSR1, 0},
+ {SIGUSR2, 0},
#ifdef SIGWINCH
- SIGWINCH, Restart|Ignore,
+ {SIGWINCH, Restart|Ignore},
#endif
#ifdef SIGINFO
- SIGINFO, Restart|Ignore,
+ {SIGINFO, Restart|Ignore},
#endif
};
diff --git a/src/libmach/5db.c b/src/libmach/5db.c
--- a/src/libmach/5db.c
+++ b/src/libmach/5db.c
@@ -735,112 +735,112 @@
static Opcode opcodes[] =
{
- "AND%C%S", armdps, 0, "R%s,R%n,R%d",
- "EOR%C%S", armdps, 0, "R%s,R%n,R%d",
- "SUB%C%S", armdps, 0, "R%s,R%n,R%d",
- "RSB%C%S", armdps, 0, "R%s,R%n,R%d",
- "ADD%C%S", armdps, armfadd, "R%s,R%n,R%d",
- "ADC%C%S", armdps, 0, "R%s,R%n,R%d",
- "SBC%C%S", armdps, 0, "R%s,R%n,R%d",
- "RSC%C%S", armdps, 0, "R%s,R%n,R%d",
- "TST%C%S", armdps, 0, "R%s,R%n",
- "TEQ%C%S", armdps, 0, "R%s,R%n",
- "CMP%C%S", armdps, 0, "R%s,R%n",
- "CMN%C%S", armdps, 0, "R%s,R%n",
- "ORR%C%S", armdps, 0, "R%s,R%n,R%d",
- "MOVW%C%S", armdps, armfmov, "R%s,R%d",
- "BIC%C%S", armdps, 0, "R%s,R%n,R%d",
- "MVN%C%S", armdps, 0, "R%s,R%d",
+ {"AND%C%S", armdps, 0, "R%s,R%n,R%d"},
+ {"EOR%C%S", armdps, 0, "R%s,R%n,R%d"},
+ {"SUB%C%S", armdps, 0, "R%s,R%n,R%d"},
+ {"RSB%C%S", armdps, 0, "R%s,R%n,R%d"},
+ {"ADD%C%S", armdps, armfadd, "R%s,R%n,R%d"},
+ {"ADC%C%S", armdps, 0, "R%s,R%n,R%d"},
+ {"SBC%C%S", armdps, 0, "R%s,R%n,R%d"},
+ {"RSC%C%S", armdps, 0, "R%s,R%n,R%d"},
+ {"TST%C%S", armdps, 0, "R%s,R%n"},
+ {"TEQ%C%S", armdps, 0, "R%s,R%n"},
+ {"CMP%C%S", armdps, 0, "R%s,R%n"},
+ {"CMN%C%S", armdps, 0, "R%s,R%n"},
+ {"ORR%C%S", armdps, 0, "R%s,R%n,R%d"},
+ {"MOVW%C%S", armdps, armfmov, "R%s,R%d"},
+ {"BIC%C%S", armdps, 0, "R%s,R%n,R%d"},
+ {"MVN%C%S", armdps, 0, "R%s,R%d"},
/* 16 */
- "AND%C%S", armdps, 0, "(R%s%h%m),R%n,R%d",
- "EOR%C%S", armdps, 0, "(R%s%h%m),R%n,R%d",
- "SUB%C%S", armdps, 0, "(R%s%h%m),R%n,R%d",
- "RSB%C%S", armdps, 0, "(R%s%h%m),R%n,R%d",
- "ADD%C%S", armdps, armfadd, "(R%s%h%m),R%n,R%d",
- "ADC%C%S", armdps, 0, "(R%s%h%m),R%n,R%d",
- "SBC%C%S", armdps, 0, "(R%s%h%m),R%n,R%d",
- "RSC%C%S", armdps, 0, "(R%s%h%m),R%n,R%d",
- "TST%C%S", armdps, 0, "(R%s%h%m),R%n",
- "TEQ%C%S", armdps, 0, "(R%s%h%m),R%n",
- "CMP%C%S", armdps, 0, "(R%s%h%m),R%n",
- "CMN%C%S", armdps, 0, "(R%s%h%m),R%n",
- "ORR%C%S", armdps, 0, "(R%s%h%m),R%n,R%d",
- "MOVW%C%S", armdps, armfmov, "(R%s%h%m),R%d",
- "BIC%C%S", armdps, 0, "(R%s%h%m),R%n,R%d",
- "MVN%C%S", armdps, 0, "(R%s%h%m),R%d",
+ {"AND%C%S", armdps, 0, "(R%s%h%m),R%n,R%d"},
+ {"EOR%C%S", armdps, 0, "(R%s%h%m),R%n,R%d"},
+ {"SUB%C%S", armdps, 0, "(R%s%h%m),R%n,R%d"},
+ {"RSB%C%S", armdps, 0, "(R%s%h%m),R%n,R%d"},
+ {"ADD%C%S", armdps, armfadd, "(R%s%h%m),R%n,R%d"},
+ {"ADC%C%S", armdps, 0, "(R%s%h%m),R%n,R%d"},
+ {"SBC%C%S", armdps, 0, "(R%s%h%m),R%n,R%d"},
+ {"RSC%C%S", armdps, 0, "(R%s%h%m),R%n,R%d"},
+ {"TST%C%S", armdps, 0, "(R%s%h%m),R%n"},
+ {"TEQ%C%S", armdps, 0, "(R%s%h%m),R%n"},
+ {"CMP%C%S", armdps, 0, "(R%s%h%m),R%n"},
+ {"CMN%C%S", armdps, 0, "(R%s%h%m),R%n"},
+ {"ORR%C%S", armdps, 0, "(R%s%h%m),R%n,R%d"},
+ {"MOVW%C%S", armdps, armfmov, "(R%s%h%m),R%d"},
+ {"BIC%C%S", armdps, 0, "(R%s%h%m),R%n,R%d"},
+ {"MVN%C%S", armdps, 0, "(R%s%h%m),R%d"},
/* 32 */
- "AND%C%S", armdps, 0, "(R%s%hR%M),R%n,R%d",
- "EOR%C%S", armdps, 0, "(R%s%hR%M),R%n,R%d",
- "SUB%C%S", armdps, 0, "(R%s%hR%M),R%n,R%d",
- "RSB%C%S", armdps, 0, "(R%s%hR%M),R%n,R%d",
- "ADD%C%S", armdps, armfadd, "(R%s%hR%M),R%n,R%d",
- "ADC%C%S", armdps, 0, "(R%s%hR%M),R%n,R%d",
- "SBC%C%S", armdps, 0, "(R%s%hR%M),R%n,R%d",
- "RSC%C%S", armdps, 0, "(R%s%hR%M),R%n,R%d",
- "TST%C%S", armdps, 0, "(R%s%hR%M),R%n",
- "TEQ%C%S", armdps, 0, "(R%s%hR%M),R%n",
- "CMP%C%S", armdps, 0, "(R%s%hR%M),R%n",
- "CMN%C%S", armdps, 0, "(R%s%hR%M),R%n",
- "ORR%C%S", armdps, 0, "(R%s%hR%M),R%n,R%d",
- "MOVW%C%S", armdps, armfmov, "(R%s%hR%M),R%d",
- "BIC%C%S", armdps, 0, "(R%s%hR%M),R%n,R%d",
- "MVN%C%S", armdps, 0, "(R%s%hR%M),R%d",
+ {"AND%C%S", armdps, 0, "(R%s%hR%M),R%n,R%d"},
+ {"EOR%C%S", armdps, 0, "(R%s%hR%M),R%n,R%d"},
+ {"SUB%C%S", armdps, 0, "(R%s%hR%M),R%n,R%d"},
+ {"RSB%C%S", armdps, 0, "(R%s%hR%M),R%n,R%d"},
+ {"ADD%C%S", armdps, armfadd, "(R%s%hR%M),R%n,R%d"},
+ {"ADC%C%S", armdps, 0, "(R%s%hR%M),R%n,R%d"},
+ {"SBC%C%S", armdps, 0, "(R%s%hR%M),R%n,R%d"},
+ {"RSC%C%S", armdps, 0, "(R%s%hR%M),R%n,R%d"},
+ {"TST%C%S", armdps, 0, "(R%s%hR%M),R%n"},
+ {"TEQ%C%S", armdps, 0, "(R%s%hR%M),R%n"},
+ {"CMP%C%S", armdps, 0, "(R%s%hR%M),R%n"},
+ {"CMN%C%S", armdps, 0, "(R%s%hR%M),R%n"},
+ {"ORR%C%S", armdps, 0, "(R%s%hR%M),R%n,R%d"},
+ {"MOVW%C%S", armdps, armfmov, "(R%s%hR%M),R%d"},
+ {"BIC%C%S", armdps, 0, "(R%s%hR%M),R%n,R%d"},
+ {"MVN%C%S", armdps, 0, "(R%s%hR%M),R%d"},
/* 48 */
- "AND%C%S", armdpi, 0, "$#%i,R%n,R%d",
- "EOR%C%S", armdpi, 0, "$#%i,R%n,R%d",
- "SUB%C%S", armdpi, 0, "$#%i,R%n,R%d",
- "RSB%C%S", armdpi, 0, "$#%i,R%n,R%d",
- "ADD%C%S", armdpi, armfadd, "$#%i,R%n,R%d",
- "ADC%C%S", armdpi, 0, "$#%i,R%n,R%d",
- "SBC%C%S", armdpi, 0, "$#%i,R%n,R%d",
- "RSC%C%S", armdpi, 0, "$#%i,R%n,R%d",
- "TST%C%S", armdpi, 0, "$#%i,R%n",
- "TEQ%C%S", armdpi, 0, "$#%i,R%n",
- "CMP%C%S", armdpi, 0, "$#%i,R%n",
- "CMN%C%S", armdpi, 0, "$#%i,R%n",
- "ORR%C%S", armdpi, 0, "$#%i,R%n,R%d",
- "MOVW%C%S", armdpi, armfmov, "$#%i,R%d",
- "BIC%C%S", armdpi, 0, "$#%i,R%n,R%d",
- "MVN%C%S", armdpi, 0, "$#%i,R%d",
+ {"AND%C%S", armdpi, 0, "$#%i,R%n,R%d"},
+ {"EOR%C%S", armdpi, 0, "$#%i,R%n,R%d"},
+ {"SUB%C%S", armdpi, 0, "$#%i,R%n,R%d"},
+ {"RSB%C%S", armdpi, 0, "$#%i,R%n,R%d"},
+ {"ADD%C%S", armdpi, armfadd, "$#%i,R%n,R%d"},
+ {"ADC%C%S", armdpi, 0, "$#%i,R%n,R%d"},
+ {"SBC%C%S", armdpi, 0, "$#%i,R%n,R%d"},
+ {"RSC%C%S", armdpi, 0, "$#%i,R%n,R%d"},
+ {"TST%C%S", armdpi, 0, "$#%i,R%n"},
+ {"TEQ%C%S", armdpi, 0, "$#%i,R%n"},
+ {"CMP%C%S", armdpi, 0, "$#%i,R%n"},
+ {"CMN%C%S", armdpi, 0, "$#%i,R%n"},
+ {"ORR%C%S", armdpi, 0, "$#%i,R%n,R%d"},
+ {"MOVW%C%S", armdpi, armfmov, "$#%i,R%d"},
+ {"BIC%C%S", armdpi, 0, "$#%i,R%n,R%d"},
+ {"MVN%C%S", armdpi, 0, "$#%i,R%d"},
/* 48+16 */
- "MUL%C%S", armdpi, 0, "R%s,R%M,R%n",
- "MULA%C%S", armdpi, 0, "R%s,R%M,R%n,R%d",
- "SWPW", armdpi, 0, "R%s,(R%n),R%d",
- "SWPB", armdpi, 0, "R%s,(R%n),R%d",
+ {"MUL%C%S", armdpi, 0, "R%s,R%M,R%n"},
+ {"MULA%C%S", armdpi, 0, "R%s,R%M,R%n,R%d"},
+ {"SWPW", armdpi, 0, "R%s,(R%n),R%d"},
+ {"SWPB", armdpi, 0, "R%s,(R%n),R%d"},
/* 48+16+4 */
- "MOV%u%C%p", armhwby, 0, "R%d,(R%n%UR%M)",
- "MOV%u%C%p", armhwby, 0, "R%d,%I",
- "MOV%u%C%p", armhwby, armfmov, "(R%n%UR%M),R%d",
- "MOV%u%C%p", armhwby, armfmov, "%I,R%d",
+ {"MOV%u%C%p", armhwby, 0, "R%d,(R%n%UR%M)"},
+ {"MOV%u%C%p", armhwby, 0, "R%d,%I"},
+ {"MOV%u%C%p", armhwby, armfmov, "(R%n%UR%M),R%d"},
+ {"MOV%u%C%p", armhwby, armfmov, "%I,R%d"},
/* 48+24 */
- "MOVW%C%p", armsdti, 0, "R%d,%I",
- "MOVB%C%p", armsdti, 0, "R%d,%I",
- "MOVW%C%p", armsdti, armfmov, "%I,R%d",
- "MOVBU%C%p", armsdti, armfmov, "%I,R%d",
+ {"MOVW%C%p", armsdti, 0, "R%d,%I"},
+ {"MOVB%C%p", armsdti, 0, "R%d,%I"},
+ {"MOVW%C%p", armsdti, armfmov, "%I,R%d"},
+ {"MOVBU%C%p", armsdti, armfmov, "%I,R%d"},
- "MOVW%C%p", armsdts, 0, "R%d,(R%s%h%m)(R%n)",
- "MOVB%C%p", armsdts, 0, "R%d,(R%s%h%m)(R%n)",
- "MOVW%C%p", armsdts, armfmov, "(R%s%h%m)(R%n),R%d",
- "MOVBU%C%p", armsdts, armfmov, "(R%s%h%m)(R%n),R%d",
+ {"MOVW%C%p", armsdts, 0, "R%d,(R%s%h%m)(R%n)"},
+ {"MOVB%C%p", armsdts, 0, "R%d,(R%s%h%m)(R%n)"},
+ {"MOVW%C%p", armsdts, armfmov, "(R%s%h%m)(R%n),R%d"},
+ {"MOVBU%C%p", armsdts, armfmov, "(R%s%h%m)(R%n),R%d"},
- "MOVM%C%P%a", armbdt, armfmovm, "[%r],(R%n)",
- "MOVM%C%P%a", armbdt, armfmovm, "(R%n),[%r]",
+ {"MOVM%C%P%a", armbdt, armfmovm, "[%r],(R%n)"},
+ {"MOVM%C%P%a", armbdt, armfmovm, "(R%n),[%r]"},
- "B%C", armb, armfbranch, "%b",
- "BL%C", armb, armfbranch, "%b",
+ {"B%C", armb, armfbranch, "%b"},
+ {"BL%C", armb, armfbranch, "%b"},
- "CDP%C", armco, 0, "",
- "CDP%C", armco, 0, "",
- "MCR%C", armco, 0, "",
- "MRC%C", armco, 0, "",
+ {"CDP%C", armco, 0, ""},
+ {"CDP%C", armco, 0, ""},
+ {"MCR%C", armco, 0, ""},
+ {"MRC%C", armco, 0, ""},
- "UNK", armunk, 0, "",
+ {"UNK", armunk, 0, ""},
};
static void
diff --git a/src/libmach/5obj.c b/src/libmach/5obj.c
--- a/src/libmach/5obj.c
+++ b/src/libmach/5obj.c
@@ -99,7 +99,7 @@
skip(bp, 6); /* scond(1), reg(1), lineno(4) */
a = addr(bp);
addr(bp);
- if(a.type != D_OREG || a.name != D_STATIC && a.name != D_EXTERN)
+ if(a.type != D_OREG || (a.name != D_STATIC && a.name != D_EXTERN))
p->kind = aNone;
p->sym = a.sym;
return 1;
diff --git a/src/libmach/8db.c b/src/libmach/8db.c
--- a/src/libmach/8db.c
+++ b/src/libmach/8db.c
@@ -2125,7 +2125,7 @@
bprint(ip, "%s%s", ONAME(ip), reg[ip->rex&REXR? ip->reg+8: ip->reg]);
break;
case 'S':
- if(ip->osize == 'Q' || ip->osize == 'L' && ip->rex & REXW)
+ if(ip->osize == 'Q' || (ip->osize == 'L' && ip->rex & REXW))
bprint(ip, "Q");
else
bprint(ip, "%c", ip->osize);
@@ -2147,7 +2147,7 @@
bprint(ip, "???");
break;
case 'W':
- if (ip->osize == 'Q' || ip->osize == 'L' && ip->rex & REXW)
+ if (ip->osize == 'Q' || (ip->osize == 'L' && ip->rex & REXW))
bprint(ip, "CDQE");
else if (ip->osize == 'L')
bprint(ip,"CWDE");
diff --git a/src/libmach/machdata.c b/src/libmach/machdata.c
--- a/src/libmach/machdata.c
+++ b/src/libmach/machdata.c
@@ -231,7 +231,7 @@
fr /= 1L<<16;
fr += (l>>16) & ((1L<<16)-1L);
fr /= 1L<<16;
- fr += (h & (1L<<20)-1L) | (1L<<20);
+ fr += (h & ((1L<<20)-1L)) | (1L<<20);
fr /= 1L<<21;
fr = ldexp(fr, exp);
return snprint(buf, n, "%.18g", fr);
diff --git a/src/libmach/obj.c b/src/libmach/obj.c
--- a/src/libmach/obj.c
+++ b/src/libmach/obj.c
@@ -339,11 +339,12 @@
Sym *s;
s = names[id];
- if (s && s->name[0])
+ if (s && s->name[0]) {
if (s->type == 'U')
s->type = type;
else if (s->type == 'b')
s->type = tolower(type);
+ }
}
/*
diff --git a/src/libmach/sym.c b/src/libmach/sym.c
--- a/src/libmach/sym.c
+++ b/src/libmach/sym.c
@@ -1051,7 +1051,7 @@
s = sp;
if (*s == 0)
return 0;
- for (i = 1; j = (cp[i]<<8)|cp[i+1]; i += 2) {
+ for (i = 1; (j = (cp[i]<<8)|cp[i+1]); i += 2) {
if(j == 0)
break;
if(*s == j)
@@ -1174,7 +1174,7 @@
bp = buf;
end = buf+n-1;
- for(i = 1; j = (cp[i]<<8)|cp[i+1]; i+=2){
+ for(i = 1; (j = (cp[i]<<8)|cp[i+1]); i+=2){
c = fp[j]->name;
if(bp != buf && bp[-1] != '/' && bp < end)
*bp++ = '/';

View File

@ -1,76 +1,3 @@
-------------------------------------------------------------------
Fri Jun 24 21:41:27 UTC 2011 - saschpe@gmx.de
- No need to set $PATH before building anymore
-------------------------------------------------------------------
Fri Jun 24 21:17:16 UTC 2011 - saschpe@gmx.de
- DISABLE_NET_TESTS was dropped, this causes net tests to fail
on openSUSE:Factory currently. Disable tests temporarily.
-------------------------------------------------------------------
Fri Jun 24 13:39:31 UTC 2011 - saschpe@suse.de
- Update to 24/06/2011 mercurial version
* http: buffer Request.Write (issue 1996)
* libmach: fix disassembly of FCMOVcc and FCOMI
* libmach: fix tracing on linux (for cov)
* ld: don't attempt to build dynamic sections unnecessarily
* syscall: add tty support to StartProcess
* crypto/openpgp: add ElGamal support
* http: add Server.ListenAndServeTLS (issue 1964)
-------------------------------------------------------------------
Thu Jun 16 06:44:04 UTC 2011 - saschpe@suse.de
- %go_requires can't depend on %requires_ge, it isn't available on
Fedora and RHEL.
-------------------------------------------------------------------
Wed Jun 15 20:30:18 UTC 2011 - saschpe@suse.de
- Really set CFLAGS through HOST_EXTRA_CFLAGS environment variable
for building Go itself and for Go macros (used by Go packages)
- Added go-fix-werrors.patch to fix fatal compiler warnings, not
used yet as -Wno-error is passed currently
- Adhere to SUSE patch comment conventions
- Changed %go_requires macro from '%requires_eq go' to
'%requires_ge go'
-------------------------------------------------------------------
Wed Jun 15 11:58:25 UTC 2011 - saschpe@suse.de
- Update to 15/06/2011 mercurial version
* Increase max no of windows callbacks (issue 1912)
* gc: compact stackframe
* http: fix regression permitting io.Copy on HEAD response
* Go memory model: minor clarification (issue 1941)
* go spec: clarif rules for append, scope rules for :=
(issue 1936, issue 1940)
* gc: handle go print() and go println() (issue 1952)
* net: export all fields in Interface (issue 1942)
- Spec file cleanup:
* Remove *.6 and *.8 files from misc documentation
-------------------------------------------------------------------
Wed Jun 8 15:10:17 UTC 2011 - saschpe@suse.de
- Added macro %go_disable_brp_strip_static_archive to disable the
strip check, it breaks on Fedora-based distros and generates
a warning for SUSE-based ones. It can be removed if go binaries
become really stripable
-------------------------------------------------------------------
Wed Jun 8 07:59:53 UTC 2011 - saschpe@suse.de
- Update to 08/05/2011 mercurial version
* ld: fix and simplify ELF symbol generation
* cgo: support non intel gcc machine flags
* gc: enable building under clang/2.9
* countless bugfixes, documentation and speed improvements
- Don't build twice (thru all.bash and make.bash)
-------------------------------------------------------------------
Mon May 23 10:31:23 UTC 2011 - saschpe@suse.de

50
go.spec
View File

@ -1,4 +1,7 @@
#
# spec file for package go
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2011, Sascha Peilicke <saschpe@gmx.de>
#
# All modifications and additions to the file contributed by third parties
@ -10,21 +13,23 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: go
Version: 0.0.r57.1+hg20110624
Release: 0
Version: 0.0.r57.1+hg20110521
Release: 3
Summary: A compiled, garbage-collected, concurrent programming language
Group: Development/Languages/Other
License: BSD3c
URL: http://golang.org/
Url: http://golang.org/
Source0: go-%{version}.tar.bz2
Source1: rpmlintrc
Source1: go-rpmlintrc
Source2: go.sh
Source3: macros.go
# PATCH-FIX-OPENSUSE adjust documentation paths
Patch1: go-godoc-path-locations.patch
## PATCH-FIX-UPSTREAM fix various compiler warnings
#Patch2: go-fix-werrors.patch
Patch1: godoc-path-locations.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: ed
BuildRequires: bison
@ -46,6 +51,8 @@ run-time reflection. It feels like a dynamic language but has the speed and
safety of a static language.
%package doc
Summary: Go documentation
Group: Documentation/Other
Requires: %{name} = %{version}
@ -54,6 +61,8 @@ Requires: %{name} = %{version}
Go examples and documentation.
%package vim
Summary: Go syntax files for Vim
Group: Productivity/Text/Editors
Requires: %{name} = %{version}
@ -62,6 +71,8 @@ Requires: %{name} = %{version}
Vim syntax highlighting scheme for the Go programming language.
%package emacs
Summary: Go language syntax files for Emacs
Group: Productivity/Text/Editors
Requires: %{name} = %{version}
@ -70,6 +81,8 @@ Requires: %{name} = %{version}
Emacs syntax highlighting scheme for the Go programming language.
%package kate
Summary: Go syntax files for Kate and KWrite editors
Group: Productivity/Text/Editors
Requires: %{name} = %{version}
@ -80,16 +93,21 @@ Kate syntax highlighting scheme for the Go programming language.
%prep
%setup -q -n %{name}
%patch1 -p1
#%%patch2 -p1
%build
export GOROOT="`pwd`"
export GOBIN="$GOROOT/bin"
mkdir -p "$GOBIN"
cd src
# compile and run full test suite
HOST_EXTRA_CFLAGS="%{optflags} -Wno-error" ./make.bash
cd src
# remove computer lang benchmark tests, coelab wiki, dashboard... from run.bash
sed '94,113d' $GOROOT/src/run.bash > $GOROOT/src/run.tmp
mv $GOROOT/src/run.tmp $GOROOT/src/run.bash
# compile and run full test suite (disable net tests)
# TODO: testing is broken currently, re-enable with new upstream version
#DISABLE_NET_TESTS=1 CFLAGS=$RPM_OPT_FLAGS LC_ALL=C PATH="$PATH:$GOBIN" ./all.bash
CFLAGS=$RPM_OPT_FLAGS LC_ALL=C PATH="$PATH:$GOBIN" ./make.bash
%install
export GOROOT="%{buildroot}%{_libdir}/%{name}"
@ -126,12 +144,7 @@ cp -r pkg $GOROOT
# fix documetation permissions (rpmlint warning)
find doc/ misc/ -type f -exec chmod 0644 '{}' \;
# remove unwanted arch-dependant binaries (rpmlint warning)
#rm doc/codelab/wiki/{htmlify.bin,srcextract.bin}
rm -rf misc/cgo/test/{_*,*.o,*.out,*.6,*.8}
rm -f misc/dashboard/builder/{gobuilder,*6,*.8}
rm -f misc/goplay/{goplay,*.6,*.8}
rm misc/swig/{callback/run,stdio/hello}
rm -rf misc/cgo/test/{_*,*.o,*.out,*.6,*.8}
# fix bnc#686557, contains image licensed under non-commercial license
rm doc/talks/go_talk-20091030.pdf
@ -157,13 +170,14 @@ ln -s %{_datadir}/go/src/pkg/runtime/{cgocall,runtime}.h %{buildroot}%{_libdir}/
# issue #1242
# Go binaries are supposedly DWARF compliant but brp_strip_debug breaks them
export NO_BRP_STRIP_DEBUG=true
# Disable brp-strip-static-archive on Fedora, breaks build
%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version}
%define __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib/rpm/[^/]*/?brp-strip-static-archive %{__strip}!!g')
%endif
%if 0%{?suse_version} > 1020
%fdupes %{buildroot}%{_prefix}
%fdupes %{buildroot}
%endif
%clean

View File

@ -5,7 +5,7 @@
)
+// for openSUSE packaging of godoc
+const docroot = "/usr/share/doc/packages/go-doc/doc"
+const docroot = "/usr/share/doc/packages/go-doc/"
+const srcroot = "/usr/share/go/"
func initHandlers() {

View File

@ -10,15 +10,12 @@
%go_sitedir %{_libdir}/go/pkg
%go_sitearch %{_libdir}/go/pkg/linux_%{go_arch}
%go_requires %(echo '%*' | LC_ALL=C xargs -r rpm -q --qf 'Requires: %%{name} >= %%{epoch}:%%{version}\\n' | sed -e 's/ (none):/ /' -e 's/ 0:/ /' | grep -v "is not")
%go_requires %requires_eq go
%go_provides \
Provides: %{name}-devel = %{version} \
Provides: %{name}-devel-static = %{version}
%go_disable_brp_strip_static_archive \
%define __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib/rpm/[^/]*/?brp-strip-static-archive %{__strip}!!g')
%go_make HOST_EXTRA_CFLAGS="%{optflags}" gomake
%go_make_install HOST_EXTRA_CFLAGS="%{optflags}" TARGDIR=%{buildroot}%{go_sitearch} gomake install
%go_make_test HOST_EXTRA_CFLAGS="%{optflags}" gomake test
%go_make gomake
%go_make_install TARGDIR=%{buildroot}%{go_sitearch} gomake install
%go_make_test gomake test