mirror of
https://github.com/golang/go
synced 2024-11-11 18:51:37 -07:00
all: power64 is now ppc64
Fixes #8654. LGTM=austin R=austin CC=golang-codereviews https://golang.org/cl/180600043
This commit is contained in:
parent
dcb2ec3b65
commit
09d92b6bbf
@ -93,10 +93,10 @@ struct Prog
|
|||||||
|
|
||||||
// operands
|
// operands
|
||||||
Addr from;
|
Addr from;
|
||||||
uchar reg; // arm, power64 only (e.g., ADD from, reg, to);
|
uchar reg; // arm, ppc64 only (e.g., ADD from, reg, to);
|
||||||
// starts at 0 for both GPRs and FPRs;
|
// starts at 0 for both GPRs and FPRs;
|
||||||
// also used for ADATA width on arm, power64
|
// also used for ADATA width on arm, ppc64
|
||||||
Addr from3; // power64 only (e.g., RLWM/FMADD from, reg, from3, to)
|
Addr from3; // ppc64 only (e.g., RLWM/FMADD from, reg, from3, to)
|
||||||
Addr to;
|
Addr to;
|
||||||
|
|
||||||
// for 5g, 6g, 8g internal use
|
// for 5g, 6g, 8g internal use
|
||||||
@ -636,8 +636,8 @@ extern LinkArch link386;
|
|||||||
extern LinkArch linkamd64;
|
extern LinkArch linkamd64;
|
||||||
extern LinkArch linkamd64p32;
|
extern LinkArch linkamd64p32;
|
||||||
extern LinkArch linkarm;
|
extern LinkArch linkarm;
|
||||||
extern LinkArch linkpower64;
|
extern LinkArch linkppc64;
|
||||||
extern LinkArch linkpower64le;
|
extern LinkArch linkppc64le;
|
||||||
|
|
||||||
#pragma varargck type "A" int
|
#pragma varargck type "A" int
|
||||||
#pragma varargck type "E" uint
|
#pragma varargck type "E" uint
|
||||||
|
@ -14,8 +14,8 @@ Go-specific considerations are documented at
|
|||||||
|
|
||||||
http://golang.org/doc/asm
|
http://golang.org/doc/asm
|
||||||
|
|
||||||
Its target architecture is the Power64, referred to by these tools as
|
Its target architecture is 64-bit PowerPC and Power Architecture processors,
|
||||||
power64 (big endian) or power64le (little endian).
|
referred to by these tools as ppc64 (big endian) or ppc64le (little endian).
|
||||||
|
|
||||||
*/
|
*/
|
||||||
package main
|
package main
|
||||||
|
@ -71,7 +71,7 @@ dodef(char *p)
|
|||||||
Dlist[nDlist++] = p;
|
Dlist[nDlist++] = p;
|
||||||
}
|
}
|
||||||
|
|
||||||
LinkArch* thelinkarch = &linkpower64;
|
LinkArch* thelinkarch = &linkppc64;
|
||||||
|
|
||||||
void
|
void
|
||||||
usage(void)
|
usage(void)
|
||||||
@ -87,15 +87,15 @@ main(int argc, char *argv[])
|
|||||||
char *p;
|
char *p;
|
||||||
|
|
||||||
thechar = '9';
|
thechar = '9';
|
||||||
thestring = "power64";
|
thestring = "ppc64";
|
||||||
|
|
||||||
// Allow GOARCH=thestring or GOARCH=thestringsuffix,
|
// Allow GOARCH=thestring or GOARCH=thestringsuffix,
|
||||||
// but not other values.
|
// but not other values.
|
||||||
p = getgoarch();
|
p = getgoarch();
|
||||||
if(strncmp(p, thestring, strlen(thestring)) != 0)
|
if(strncmp(p, thestring, strlen(thestring)) != 0)
|
||||||
sysfatal("cannot use %cc with GOARCH=%s", thechar, p);
|
sysfatal("cannot use %cc with GOARCH=%s", thechar, p);
|
||||||
if(strcmp(p, "power64le") == 0)
|
if(strcmp(p, "ppc64le") == 0)
|
||||||
thelinkarch = &linkpower64le;
|
thelinkarch = &linkppc64le;
|
||||||
|
|
||||||
ctxt = linknew(thelinkarch);
|
ctxt = linknew(thelinkarch);
|
||||||
ctxt->diag = yyerror;
|
ctxt->diag = yyerror;
|
||||||
|
@ -6,9 +6,9 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
9g is the version of the gc compiler for the Power64.
|
9g is the version of the gc compiler for 64-bit PowerPC or Power Architecture processors.
|
||||||
The $GOARCH for these tools is power64 (big endian) or
|
The $GOARCH for these tools is ppc64 (big endian) or
|
||||||
power64le (little endian).
|
ppc64le (little endian).
|
||||||
|
|
||||||
It reads .go files and outputs .9 files. The flags are documented in ../gc/doc.go.
|
It reads .go files and outputs .9 files. The flags are documented in ../gc/doc.go.
|
||||||
|
|
||||||
|
@ -7,17 +7,17 @@
|
|||||||
#include "gg.h"
|
#include "gg.h"
|
||||||
|
|
||||||
int thechar = '9';
|
int thechar = '9';
|
||||||
char* thestring = "power64";
|
char* thestring = "ppc64";
|
||||||
LinkArch* thelinkarch;
|
LinkArch* thelinkarch;
|
||||||
|
|
||||||
void
|
void
|
||||||
linkarchinit(void)
|
linkarchinit(void)
|
||||||
{
|
{
|
||||||
thestring = getgoarch();
|
thestring = getgoarch();
|
||||||
if(strcmp(thestring, "power64le") == 0)
|
if(strcmp(thestring, "ppc64le") == 0)
|
||||||
thelinkarch = &linkpower64le;
|
thelinkarch = &linkppc64le;
|
||||||
else
|
else
|
||||||
thelinkarch = &linkpower64;
|
thelinkarch = &linkppc64;
|
||||||
}
|
}
|
||||||
|
|
||||||
vlong MAXWIDTH = 1LL<<50;
|
vlong MAXWIDTH = 1LL<<50;
|
||||||
|
@ -212,8 +212,8 @@ ginscall(Node *f, int proc)
|
|||||||
// However, the stack trace code will show the line
|
// However, the stack trace code will show the line
|
||||||
// of the instruction byte before the return PC.
|
// of the instruction byte before the return PC.
|
||||||
// To avoid that being an unrelated instruction,
|
// To avoid that being an unrelated instruction,
|
||||||
// insert a Power64 NOP that we will have the right line number.
|
// insert a ppc64 NOP that we will have the right line number.
|
||||||
// Power64 NOP is really or r0, r0, r0; use that description
|
// The ppc64 NOP is really or r0, r0, r0; use that description
|
||||||
// because the NOP pseudo-instruction would be removed by
|
// because the NOP pseudo-instruction would be removed by
|
||||||
// the linker.
|
// the linker.
|
||||||
nodreg(®, types[TINT], D_R0);
|
nodreg(®, types[TINT], D_R0);
|
||||||
@ -953,7 +953,7 @@ clearfat(Node *nl)
|
|||||||
f = sysfunc("duffzero");
|
f = sysfunc("duffzero");
|
||||||
p = gins(ADUFFZERO, N, f);
|
p = gins(ADUFFZERO, N, f);
|
||||||
afunclit(&p->to, f);
|
afunclit(&p->to, f);
|
||||||
// 4 and 128 = magic constants: see ../../runtime/asm_power64x.s
|
// 4 and 128 = magic constants: see ../../runtime/asm_ppc64x.s
|
||||||
p->to.offset = 4*(128-q);
|
p->to.offset = 4*(128-q);
|
||||||
// duffzero leaves R3 on the last zeroed dword
|
// duffzero leaves R3 on the last zeroed dword
|
||||||
boff = 8;
|
boff = 8;
|
||||||
|
@ -935,7 +935,7 @@ copyau1(Prog *p, Addr *v)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// copysub replaces v with s in a if f!=0 or indicates it if could if f==0.
|
// copysub replaces v with s in a if f!=0 or indicates it if could if f==0.
|
||||||
// Returns 1 on failure to substitute (it always succeeds on power64).
|
// Returns 1 on failure to substitute (it always succeeds on ppc64).
|
||||||
static int
|
static int
|
||||||
copysub(Addr *a, Addr *v, Addr *s, int f)
|
copysub(Addr *a, Addr *v, Addr *s, int f)
|
||||||
{
|
{
|
||||||
@ -946,7 +946,7 @@ copysub(Addr *a, Addr *v, Addr *s, int f)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// copysub1 replaces v with s in p1->reg if f!=0 or indicates if it could if f==0.
|
// copysub1 replaces v with s in p1->reg if f!=0 or indicates if it could if f==0.
|
||||||
// Returns 1 on failure to substitute (it always succeeds on power64).
|
// Returns 1 on failure to substitute (it always succeeds on ppc64).
|
||||||
static int
|
static int
|
||||||
copysub1(Prog *p1, Addr *v, Addr *s, int f)
|
copysub1(Prog *p1, Addr *v, Addr *s, int f)
|
||||||
{
|
{
|
||||||
|
@ -129,7 +129,7 @@ archreloc(Reloc *r, LSym *s, vlong *val)
|
|||||||
*val = symaddr(r->sym) + r->add - symaddr(linklookup(ctxt, ".got", 0));
|
*val = symaddr(r->sym) + r->add - symaddr(linklookup(ctxt, ".got", 0));
|
||||||
return 0;
|
return 0;
|
||||||
case R_ADDRPOWER:
|
case R_ADDRPOWER:
|
||||||
// r->add is two power64 instructions holding an immediate 32-bit constant.
|
// r->add is two ppc64 instructions holding an immediate 32-bit constant.
|
||||||
// We want to add r->sym's address to that constant.
|
// We want to add r->sym's address to that constant.
|
||||||
// The encoding of the immediate x<<16 + y,
|
// The encoding of the immediate x<<16 + y,
|
||||||
// where x is the low 16 bits of the first instruction and y is the low 16
|
// where x is the low 16 bits of the first instruction and y is the low 16
|
||||||
|
@ -6,9 +6,9 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
9l is the linker for the Power64.
|
9l is the linker for 64-bit PowerPC and Power Architecture processors.
|
||||||
The $GOARCH for these tools is power64 (big endian) or
|
The $GOARCH for these tools is ppc64 (big endian) or
|
||||||
power64le (little endian).
|
ppc64le (little endian).
|
||||||
|
|
||||||
The flags are documented in ../ld/doc.go.
|
The flags are documented in ../ld/doc.go.
|
||||||
|
|
||||||
|
@ -36,17 +36,17 @@
|
|||||||
#include "../ld/dwarf.h"
|
#include "../ld/dwarf.h"
|
||||||
#include <ar.h>
|
#include <ar.h>
|
||||||
|
|
||||||
char *thestring = "power64";
|
char *thestring = "ppc64";
|
||||||
LinkArch *thelinkarch;
|
LinkArch *thelinkarch;
|
||||||
|
|
||||||
void
|
void
|
||||||
linkarchinit(void)
|
linkarchinit(void)
|
||||||
{
|
{
|
||||||
thestring = getgoarch();
|
thestring = getgoarch();
|
||||||
if(strcmp(thestring, "power64le") == 0)
|
if(strcmp(thestring, "ppc64le") == 0)
|
||||||
thelinkarch = &linkpower64le;
|
thelinkarch = &linkppc64le;
|
||||||
else
|
else
|
||||||
thelinkarch = &linkpower64;
|
thelinkarch = &linkppc64;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -79,7 +79,7 @@ archinit(void)
|
|||||||
if(INITRND == -1)
|
if(INITRND == -1)
|
||||||
INITRND = 4096;
|
INITRND = 4096;
|
||||||
break;
|
break;
|
||||||
case Hlinux: /* power64 elf */
|
case Hlinux: /* ppc64 elf */
|
||||||
debug['d'] = 1; // TODO(minux): dynamic linking is not supported yet.
|
debug['d'] = 1; // TODO(minux): dynamic linking is not supported yet.
|
||||||
elfinit();
|
elfinit();
|
||||||
HEADR = ELFRESERVE;
|
HEADR = ELFRESERVE;
|
||||||
|
@ -130,23 +130,19 @@ func usage() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var ptrSizeMap = map[string]int64{
|
var ptrSizeMap = map[string]int64{
|
||||||
"386": 4,
|
"386": 4,
|
||||||
"amd64": 8,
|
"amd64": 8,
|
||||||
"arm": 4,
|
"arm": 4,
|
||||||
"ppc64": 8,
|
"ppc64": 8,
|
||||||
"ppc64le": 8,
|
"ppc64le": 8,
|
||||||
"power64": 8,
|
|
||||||
"power64le": 8,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var intSizeMap = map[string]int64{
|
var intSizeMap = map[string]int64{
|
||||||
"386": 4,
|
"386": 4,
|
||||||
"amd64": 8,
|
"amd64": 8,
|
||||||
"arm": 4,
|
"arm": 4,
|
||||||
"ppc64": 8,
|
"ppc64": 8,
|
||||||
"ppc64le": 8,
|
"ppc64le": 8,
|
||||||
"power64": 8,
|
|
||||||
"power64le": 8,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var cPrefix string
|
var cPrefix string
|
||||||
|
4
src/cmd/dist/build.c
vendored
4
src/cmd/dist/build.c
vendored
@ -48,8 +48,8 @@ static char *okgoarch[] = {
|
|||||||
"amd64",
|
"amd64",
|
||||||
"amd64p32",
|
"amd64p32",
|
||||||
"386",
|
"386",
|
||||||
"power64",
|
"ppc64",
|
||||||
"power64le",
|
"ppc64le",
|
||||||
};
|
};
|
||||||
|
|
||||||
// The known operating systems.
|
// The known operating systems.
|
||||||
|
4
src/cmd/dist/unix.c
vendored
4
src/cmd/dist/unix.c
vendored
@ -709,9 +709,9 @@ main(int argc, char **argv)
|
|||||||
else if(contains(u.machine, "arm"))
|
else if(contains(u.machine, "arm"))
|
||||||
gohostarch = "arm";
|
gohostarch = "arm";
|
||||||
else if(contains(u.machine, "ppc64le"))
|
else if(contains(u.machine, "ppc64le"))
|
||||||
gohostarch = "power64le";
|
gohostarch = "ppc64le";
|
||||||
else if(contains(u.machine, "ppc64"))
|
else if(contains(u.machine, "ppc64"))
|
||||||
gohostarch = "power64";
|
gohostarch = "ppc64";
|
||||||
else
|
else
|
||||||
fatal("unknown architecture: %s", u.machine);
|
fatal("unknown architecture: %s", u.machine);
|
||||||
}
|
}
|
||||||
|
@ -240,9 +240,9 @@ var disasms = map[string]disasmFunc{
|
|||||||
}
|
}
|
||||||
|
|
||||||
var byteOrders = map[string]binary.ByteOrder{
|
var byteOrders = map[string]binary.ByteOrder{
|
||||||
"386": binary.LittleEndian,
|
"386": binary.LittleEndian,
|
||||||
"amd64": binary.LittleEndian,
|
"amd64": binary.LittleEndian,
|
||||||
"arm": binary.LittleEndian,
|
"arm": binary.LittleEndian,
|
||||||
"power64": binary.BigEndian,
|
"ppc64": binary.BigEndian,
|
||||||
"power64le": binary.LittleEndian,
|
"ppc64le": binary.LittleEndian,
|
||||||
}
|
}
|
||||||
|
@ -98,7 +98,7 @@ func (f *elfFile) goarch() string {
|
|||||||
case elf.EM_ARM:
|
case elf.EM_ARM:
|
||||||
return "arm"
|
return "arm"
|
||||||
case elf.EM_PPC64:
|
case elf.EM_PPC64:
|
||||||
return "power64"
|
return "ppc64"
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
@ -104,7 +104,7 @@ func (f *machoFile) goarch() string {
|
|||||||
case macho.CpuArm:
|
case macho.CpuArm:
|
||||||
return "arm"
|
return "arm"
|
||||||
case macho.CpuPpc64:
|
case macho.CpuPpc64:
|
||||||
return "power64"
|
return "ppc64"
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,7 @@ enum
|
|||||||
ElfMachSparc32Plus, /* SPARC V8+ */
|
ElfMachSparc32Plus, /* SPARC V8+ */
|
||||||
ElfMach960, /* Intel 80960 */
|
ElfMach960, /* Intel 80960 */
|
||||||
ElfMachPower, /* PowerPC */
|
ElfMachPower, /* PowerPC */
|
||||||
ElfMachPower64, /* PowerPC 64 */
|
ElfMachPower64, /* PowerPC 64-bit */
|
||||||
ElfMachS390, /* IBM System/390 */
|
ElfMachS390, /* IBM System/390 */
|
||||||
ElfMachV800 = 36, /* NEC V800 */
|
ElfMachV800 = 36, /* NEC V800 */
|
||||||
ElfMachFr20, /* Fujitsu FR20 */
|
ElfMachFr20, /* Fujitsu FR20 */
|
||||||
@ -438,7 +438,7 @@ ldelf(Biobuf *f, char *pkg, int64 len, char *pn)
|
|||||||
break;
|
break;
|
||||||
case '9':
|
case '9':
|
||||||
if(obj->machine != ElfMachPower64 || hdr->ident[4] != ElfClass64) {
|
if(obj->machine != ElfMachPower64 || hdr->ident[4] != ElfClass64) {
|
||||||
diag("%s: elf object but not power64", pn);
|
diag("%s: elf object but not ppc64", pn);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -102,7 +102,7 @@ func testDisasm(t *testing.T, flags ...string) {
|
|||||||
|
|
||||||
func TestDisasm(t *testing.T) {
|
func TestDisasm(t *testing.T) {
|
||||||
switch runtime.GOARCH {
|
switch runtime.GOARCH {
|
||||||
case "power64", "power64le":
|
case "ppc64", "ppc64le":
|
||||||
t.Skipf("skipping on %s, issue 9039", runtime.GOARCH)
|
t.Skipf("skipping on %s, issue 9039", runtime.GOARCH)
|
||||||
}
|
}
|
||||||
testDisasm(t)
|
testDisasm(t)
|
||||||
@ -114,7 +114,7 @@ func TestDisasmExtld(t *testing.T) {
|
|||||||
t.Skipf("skipping on %s", runtime.GOOS)
|
t.Skipf("skipping on %s", runtime.GOOS)
|
||||||
}
|
}
|
||||||
switch runtime.GOARCH {
|
switch runtime.GOARCH {
|
||||||
case "power64", "power64le":
|
case "ppc64", "ppc64le":
|
||||||
t.Skipf("skipping on %s, no support for external linking, issue 9038", runtime.GOARCH)
|
t.Skipf("skipping on %s, no support for external linking, issue 9038", runtime.GOARCH)
|
||||||
}
|
}
|
||||||
testDisasm(t, "-ldflags=-linkmode=external")
|
testDisasm(t, "-ldflags=-linkmode=external")
|
||||||
|
@ -1414,7 +1414,7 @@ var rppcStrings = []intName{
|
|||||||
func (i R_PPC) String() string { return stringName(uint32(i), rppcStrings, false) }
|
func (i R_PPC) String() string { return stringName(uint32(i), rppcStrings, false) }
|
||||||
func (i R_PPC) GoString() string { return stringName(uint32(i), rppcStrings, true) }
|
func (i R_PPC) GoString() string { return stringName(uint32(i), rppcStrings, true) }
|
||||||
|
|
||||||
// Relocation types for PowerPC 64.
|
// Relocation types for 64-bit PowerPC or Power Architecture processors.
|
||||||
type R_PPC64 int
|
type R_PPC64 int
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -1386,7 +1386,7 @@ func ArchChar(goarch string) (string, error) {
|
|||||||
return "6", nil
|
return "6", nil
|
||||||
case "arm":
|
case "arm":
|
||||||
return "5", nil
|
return "5", nil
|
||||||
case "power64", "power64le":
|
case "ppc64", "ppc64le":
|
||||||
return "9", nil
|
return "9", nil
|
||||||
}
|
}
|
||||||
return "", errors.New("unsupported GOARCH " + goarch)
|
return "", errors.New("unsupported GOARCH " + goarch)
|
||||||
|
@ -5,4 +5,4 @@
|
|||||||
package build
|
package build
|
||||||
|
|
||||||
const goosList = "android darwin dragonfly freebsd linux nacl netbsd openbsd plan9 solaris windows "
|
const goosList = "android darwin dragonfly freebsd linux nacl netbsd openbsd plan9 solaris windows "
|
||||||
const goarchList = "386 amd64 amd64p32 arm power64 power64le "
|
const goarchList = "386 amd64 amd64p32 arm ppc64 ppc64le "
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
// +build 386 arm power64 power64le
|
// +build 386 arm ppc64 ppc64le
|
||||||
|
|
||||||
package crc32
|
package crc32
|
||||||
|
|
||||||
|
@ -484,7 +484,7 @@ addstacksplit(Link *ctxt, LSym *cursym)
|
|||||||
// NOP
|
// NOP
|
||||||
//
|
//
|
||||||
// The NOP is needed to give the jumps somewhere to land.
|
// The NOP is needed to give the jumps somewhere to land.
|
||||||
// It is a liblink NOP, not a Power64 NOP: it encodes to 0 instruction bytes.
|
// It is a liblink NOP, not a ppc64 NOP: it encodes to 0 instruction bytes.
|
||||||
|
|
||||||
|
|
||||||
q = appendp(ctxt, q);
|
q = appendp(ctxt, q);
|
||||||
@ -988,8 +988,8 @@ prg(void)
|
|||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
LinkArch linkpower64 = {
|
LinkArch linkppc64 = {
|
||||||
.name = "power64",
|
.name = "ppc64",
|
||||||
.thechar = '9',
|
.thechar = '9',
|
||||||
.endian = BigEndian,
|
.endian = BigEndian,
|
||||||
|
|
||||||
@ -1035,8 +1035,8 @@ LinkArch linkpower64 = {
|
|||||||
.AUSEFIELD = AUSEFIELD,
|
.AUSEFIELD = AUSEFIELD,
|
||||||
};
|
};
|
||||||
|
|
||||||
LinkArch linkpower64le = {
|
LinkArch linkppc64le = {
|
||||||
.name = "power64le",
|
.name = "ppc64le",
|
||||||
.thechar = '9',
|
.thechar = '9',
|
||||||
.endian = LittleEndian,
|
.endian = LittleEndian,
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
// +build power64 power64le
|
// +build ppc64 ppc64le
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
@ -2,7 +2,7 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
// +build power64 power64le
|
// +build ppc64 ppc64le
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
@ -2,7 +2,7 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
// +build power64 power64le
|
// +build ppc64 ppc64le
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
@ -4,17 +4,17 @@
|
|||||||
|
|
||||||
// Assembly to get into package runtime without using exported symbols.
|
// Assembly to get into package runtime without using exported symbols.
|
||||||
|
|
||||||
// +build amd64 amd64p32 arm 386 power64 power64le
|
// +build amd64 amd64p32 arm 386 ppc64 ppc64le
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
||||||
#ifdef GOARCH_arm
|
#ifdef GOARCH_arm
|
||||||
#define JMP B
|
#define JMP B
|
||||||
#endif
|
#endif
|
||||||
#ifdef GOARCH_power64
|
#ifdef GOARCH_ppc64
|
||||||
#define JMP BR
|
#define JMP BR
|
||||||
#endif
|
#endif
|
||||||
#ifdef GOARCH_power64le
|
#ifdef GOARCH_ppc64le
|
||||||
#define JMP BR
|
#define JMP BR
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
// +build power64 power64le
|
// +build ppc64 ppc64le
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
#include "funcdata.h"
|
#include "funcdata.h"
|
@ -2,7 +2,7 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
// +build power64 power64le
|
// +build ppc64 ppc64le
|
||||||
|
|
||||||
#include "go_asm.h"
|
#include "go_asm.h"
|
||||||
#include "go_tls.h"
|
#include "go_tls.h"
|
||||||
@ -550,7 +550,7 @@ TEXT runtime·atomicor8(SB), NOSPLIT, $0-9
|
|||||||
// R5 = (R3 << 0) & ~3
|
// R5 = (R3 << 0) & ~3
|
||||||
RLDCR $0, R3, $~3, R5
|
RLDCR $0, R3, $~3, R5
|
||||||
// Compute val shift.
|
// Compute val shift.
|
||||||
#ifdef GOARCH_power64
|
#ifdef GOARCH_ppc64
|
||||||
// Big endian. ptr = ptr ^ 3
|
// Big endian. ptr = ptr ^ 3
|
||||||
XOR $3, R3
|
XOR $3, R3
|
||||||
#endif
|
#endif
|
||||||
@ -669,7 +669,7 @@ TEXT runtime·cputicks(SB),NOSPLIT,$0-8
|
|||||||
MOVD R3, ret+0(FP)
|
MOVD R3, ret+0(FP)
|
||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
// AES hashing not implemented for Power
|
// AES hashing not implemented for ppc64
|
||||||
TEXT runtime·aeshash(SB),NOSPLIT,$-8-0
|
TEXT runtime·aeshash(SB),NOSPLIT,$-8-0
|
||||||
MOVW (R0), R1
|
MOVW (R0), R1
|
||||||
TEXT runtime·aeshash32(SB),NOSPLIT,$-8-0
|
TEXT runtime·aeshash32(SB),NOSPLIT,$-8-0
|
@ -2,7 +2,7 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
// +build power64 power64le
|
// +build ppc64 ppc64le
|
||||||
|
|
||||||
package runtime
|
package runtime
|
||||||
|
|
@ -2,7 +2,7 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
// +build power64 power64le
|
// +build ppc64 ppc64le
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
@ -7,10 +7,10 @@
|
|||||||
#ifdef GOARCH_arm
|
#ifdef GOARCH_arm
|
||||||
#define JMP B
|
#define JMP B
|
||||||
#endif
|
#endif
|
||||||
#ifdef GOARCH_power64
|
#ifdef GOARCH_ppc64
|
||||||
#define JMP BR
|
#define JMP BR
|
||||||
#endif
|
#endif
|
||||||
#ifdef GOARCH_power64le
|
#ifdef GOARCH_ppc64le
|
||||||
#define JMP BR
|
#define JMP BR
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
/*
|
/*
|
||||||
Input to cgo -cdefs
|
Input to cgo -cdefs
|
||||||
|
|
||||||
GOARCH=power64 cgo -cdefs defs_linux.go defs3_linux.go > defs_linux_power64.h
|
GOARCH=ppc64 cgo -cdefs defs_linux.go defs3_linux.go > defs_linux_ppc64.h
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package runtime
|
package runtime
|
||||||
|
@ -134,7 +134,7 @@ func infoBigStruct() []byte {
|
|||||||
BitsScalar, BitsScalar, BitsScalar, BitsScalar, // t int; y uint16; u uint64
|
BitsScalar, BitsScalar, BitsScalar, BitsScalar, // t int; y uint16; u uint64
|
||||||
BitsPointer, BitsDead, // i string
|
BitsPointer, BitsDead, // i string
|
||||||
}
|
}
|
||||||
case "amd64", "power64", "power64le":
|
case "amd64", "ppc64", "ppc64le":
|
||||||
return []byte{
|
return []byte{
|
||||||
BitsPointer, // q *int
|
BitsPointer, // q *int
|
||||||
BitsScalar, BitsScalar, BitsScalar, // w byte; e [17]byte
|
BitsScalar, BitsScalar, BitsScalar, // w byte; e [17]byte
|
||||||
|
@ -2,14 +2,14 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
// +build power64 power64le
|
// +build ppc64 ppc64le
|
||||||
// +build linux
|
// +build linux
|
||||||
|
|
||||||
package runtime
|
package runtime
|
||||||
|
|
||||||
import "unsafe"
|
import "unsafe"
|
||||||
|
|
||||||
// On Power64, Linux limits the user address space to 46 bits (see
|
// On ppc64, Linux limits the user address space to 46 bits (see
|
||||||
// TASK_SIZE_USER64 in the Linux kernel). This has grown over time,
|
// TASK_SIZE_USER64 in the Linux kernel). This has grown over time,
|
||||||
// so here we allow 48 bit addresses.
|
// so here we allow 48 bit addresses.
|
||||||
//
|
//
|
@ -2,7 +2,7 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
// +build power64 power64le
|
// +build ppc64 ppc64le
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
@ -2,7 +2,7 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
// +build power64 power64le
|
// +build ppc64 ppc64le
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
@ -5,7 +5,7 @@
|
|||||||
// Routines that are implemented in assembly in asm_{amd64,386}.s
|
// Routines that are implemented in assembly in asm_{amd64,386}.s
|
||||||
// but are implemented in Go for arm.
|
// but are implemented in Go for arm.
|
||||||
|
|
||||||
// +build arm power64 power64le
|
// +build arm ppc64 ppc64le
|
||||||
|
|
||||||
package runtime
|
package runtime
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ func deferproc(siz int32, fn *funcval) { // arguments of fn follow fn
|
|||||||
// we can only call nosplit routines.
|
// we can only call nosplit routines.
|
||||||
argp := uintptr(unsafe.Pointer(&fn))
|
argp := uintptr(unsafe.Pointer(&fn))
|
||||||
argp += unsafe.Sizeof(fn)
|
argp += unsafe.Sizeof(fn)
|
||||||
if GOARCH == "arm" || GOARCH == "power64" || GOARCH == "power64le" {
|
if GOARCH == "arm" || GOARCH == "ppc64" || GOARCH == "ppc64le" {
|
||||||
argp += ptrSize // skip caller's saved link register
|
argp += ptrSize // skip caller's saved link register
|
||||||
}
|
}
|
||||||
callerpc := getcallerpc(unsafe.Pointer(&siz))
|
callerpc := getcallerpc(unsafe.Pointer(&siz))
|
||||||
|
@ -12,7 +12,7 @@ import "unsafe"
|
|||||||
//uint32 runtime·panicking;
|
//uint32 runtime·panicking;
|
||||||
var paniclk mutex
|
var paniclk mutex
|
||||||
|
|
||||||
const hasLinkRegister = GOARCH == "arm" || GOARCH == "power64" || GOARCH == "power64le"
|
const hasLinkRegister = GOARCH == "arm" || GOARCH == "ppc64" || GOARCH == "ppc64le"
|
||||||
|
|
||||||
// Unwind the stack after a deferred function calls recover
|
// Unwind the stack after a deferred function calls recover
|
||||||
// after a panic. Then arrange to continue running as though
|
// after a panic. Then arrange to continue running as though
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
||||||
// actually a function descriptor for _main<>(SB)
|
// actually a function descriptor for _main<>(SB)
|
||||||
TEXT _rt0_power64_linux(SB),NOSPLIT,$0
|
TEXT _rt0_ppc64_linux(SB),NOSPLIT,$0
|
||||||
DWORD $_main<>(SB)
|
DWORD $_main<>(SB)
|
||||||
DWORD $0
|
DWORD $0
|
||||||
DWORD $0
|
DWORD $0
|
@ -1,6 +1,6 @@
|
|||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
||||||
TEXT _rt0_power64le_linux(SB),NOSPLIT,$0
|
TEXT _rt0_ppc64le_linux(SB),NOSPLIT,$0
|
||||||
BR _main<>(SB)
|
BR _main<>(SB)
|
||||||
|
|
||||||
TEXT _main<>(SB),NOSPLIT,$-8
|
TEXT _main<>(SB),NOSPLIT,$-8
|
@ -3,7 +3,7 @@
|
|||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
// +build linux
|
// +build linux
|
||||||
// +build power64 power64le
|
// +build ppc64 ppc64le
|
||||||
|
|
||||||
package runtime
|
package runtime
|
||||||
|
|
@ -3,7 +3,7 @@
|
|||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
// +build linux
|
// +build linux
|
||||||
// +build power64 power64le
|
// +build ppc64 ppc64le
|
||||||
|
|
||||||
package runtime
|
package runtime
|
||||||
|
|
@ -3,10 +3,10 @@
|
|||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
// +build linux
|
// +build linux
|
||||||
// +build power64 power64le
|
// +build ppc64 ppc64le
|
||||||
|
|
||||||
//
|
//
|
||||||
// System calls and other sys.stuff for Power64, Linux
|
// System calls and other sys.stuff for ppc64, Linux
|
||||||
//
|
//
|
||||||
|
|
||||||
#include "go_asm.h"
|
#include "go_asm.h"
|
||||||
@ -179,8 +179,8 @@ TEXT runtime·rt_sigaction(SB),NOSPLIT,$-8-36
|
|||||||
MOVW R3, ret+32(FP)
|
MOVW R3, ret+32(FP)
|
||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
#ifdef GOARCH_power64le
|
#ifdef GOARCH_ppc64le
|
||||||
// power64le doesn't need function descriptors
|
// ppc64le doesn't need function descriptors
|
||||||
TEXT runtime·sigtramp(SB),NOSPLIT,$64
|
TEXT runtime·sigtramp(SB),NOSPLIT,$64
|
||||||
#else
|
#else
|
||||||
// function descriptor for the real sigtramp
|
// function descriptor for the real sigtramp
|
@ -2,7 +2,7 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
// +build power64 power64le
|
// +build ppc64 ppc64le
|
||||||
|
|
||||||
package runtime
|
package runtime
|
||||||
|
|
@ -9,10 +9,10 @@
|
|||||||
#ifdef GOARCH_arm
|
#ifdef GOARCH_arm
|
||||||
#define JMP B
|
#define JMP B
|
||||||
#endif
|
#endif
|
||||||
#ifdef GOARCH_power64
|
#ifdef GOARCH_ppc64
|
||||||
#define JMP BR
|
#define JMP BR
|
||||||
#endif
|
#endif
|
||||||
#ifdef GOARCH_power64le
|
#ifdef GOARCH_ppc64le
|
||||||
#define JMP BR
|
#define JMP BR
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -8,5 +8,5 @@ const goarch_386 = 1
|
|||||||
const goarch_amd64 = 0
|
const goarch_amd64 = 0
|
||||||
const goarch_amd64p32 = 0
|
const goarch_amd64p32 = 0
|
||||||
const goarch_arm = 0
|
const goarch_arm = 0
|
||||||
const goarch_power64 = 0
|
const goarch_ppc64 = 0
|
||||||
const goarch_power64le = 0
|
const goarch_ppc64le = 0
|
||||||
|
@ -8,5 +8,5 @@ const goarch_386 = 0
|
|||||||
const goarch_amd64 = 1
|
const goarch_amd64 = 1
|
||||||
const goarch_amd64p32 = 0
|
const goarch_amd64p32 = 0
|
||||||
const goarch_arm = 0
|
const goarch_arm = 0
|
||||||
const goarch_power64 = 0
|
const goarch_ppc64 = 0
|
||||||
const goarch_power64le = 0
|
const goarch_ppc64le = 0
|
||||||
|
@ -8,5 +8,5 @@ const goarch_386 = 0
|
|||||||
const goarch_amd64 = 0
|
const goarch_amd64 = 0
|
||||||
const goarch_amd64p32 = 1
|
const goarch_amd64p32 = 1
|
||||||
const goarch_arm = 0
|
const goarch_arm = 0
|
||||||
const goarch_power64 = 0
|
const goarch_ppc64 = 0
|
||||||
const goarch_power64le = 0
|
const goarch_ppc64le = 0
|
||||||
|
@ -8,5 +8,5 @@ const goarch_386 = 0
|
|||||||
const goarch_amd64 = 0
|
const goarch_amd64 = 0
|
||||||
const goarch_amd64p32 = 0
|
const goarch_amd64p32 = 0
|
||||||
const goarch_arm = 1
|
const goarch_arm = 1
|
||||||
const goarch_power64 = 0
|
const goarch_ppc64 = 0
|
||||||
const goarch_power64le = 0
|
const goarch_ppc64le = 0
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
package runtime
|
package runtime
|
||||||
|
|
||||||
const theGoarch = `power64`
|
const theGoarch = `ppc64`
|
||||||
|
|
||||||
const goarch_386 = 0
|
const goarch_386 = 0
|
||||||
const goarch_amd64 = 0
|
const goarch_amd64 = 0
|
||||||
const goarch_amd64p32 = 0
|
const goarch_amd64p32 = 0
|
||||||
const goarch_arm = 0
|
const goarch_arm = 0
|
||||||
const goarch_power64 = 1
|
const goarch_ppc64 = 1
|
||||||
const goarch_power64le = 0
|
const goarch_ppc64le = 0
|
@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
package runtime
|
package runtime
|
||||||
|
|
||||||
const theGoarch = `power64le`
|
const theGoarch = `ppc64le`
|
||||||
|
|
||||||
const goarch_386 = 0
|
const goarch_386 = 0
|
||||||
const goarch_amd64 = 0
|
const goarch_amd64 = 0
|
||||||
const goarch_amd64p32 = 0
|
const goarch_amd64p32 = 0
|
||||||
const goarch_arm = 0
|
const goarch_arm = 0
|
||||||
const goarch_power64 = 0
|
const goarch_ppc64 = 0
|
||||||
const goarch_power64le = 1
|
const goarch_ppc64le = 1
|
@ -2,7 +2,7 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
// +build power64 power64le
|
// +build ppc64 ppc64le
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
@ -4,10 +4,10 @@
|
|||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
||||||
#ifdef GOARCH_power64
|
#ifdef GOARCH_ppc64
|
||||||
#define RET RETURN
|
#define RET RETURN
|
||||||
#endif
|
#endif
|
||||||
#ifdef GOARCH_power64le
|
#ifdef GOARCH_ppc64le
|
||||||
#define RET RETURN
|
#define RET RETURN
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -3,12 +3,12 @@
|
|||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
// +build linux
|
// +build linux
|
||||||
// +build power64 power64le
|
// +build ppc64 ppc64le
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
||||||
//
|
//
|
||||||
// System calls for Power64, Linux
|
// System calls for ppc64, Linux
|
||||||
//
|
//
|
||||||
|
|
||||||
// func Syscall(trap int64, a1, a2, a3 int64) (r1, r2, err int64);
|
// func Syscall(trap int64, a1, a2, a3 int64) (r1, r2, err int64);
|
@ -177,15 +177,15 @@ linux_arm)
|
|||||||
mksysnum="curl -s 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/arch/arm/include/uapi/asm/unistd.h' | ./mksysnum_linux.pl"
|
mksysnum="curl -s 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/arch/arm/include/uapi/asm/unistd.h' | ./mksysnum_linux.pl"
|
||||||
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
|
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
|
||||||
;;
|
;;
|
||||||
linux_power64)
|
linux_ppc64)
|
||||||
GOOSARCH_in=syscall_linux_power64x.go
|
GOOSARCH_in=syscall_linux_ppc64x.go
|
||||||
unistd_h=/usr/include/asm/unistd.h
|
unistd_h=/usr/include/asm/unistd.h
|
||||||
mkerrors="$mkerrors -m64"
|
mkerrors="$mkerrors -m64"
|
||||||
mksysnum="./mksysnum_linux.pl $unistd_h"
|
mksysnum="./mksysnum_linux.pl $unistd_h"
|
||||||
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
|
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
|
||||||
;;
|
;;
|
||||||
linux_power64le)
|
linux_ppc64le)
|
||||||
GOOSARCH_in=syscall_linux_power64x.go
|
GOOSARCH_in=syscall_linux_ppc64x.go
|
||||||
unistd_h=/usr/include/powerpc64le-linux-gnu/asm/unistd.h
|
unistd_h=/usr/include/powerpc64le-linux-gnu/asm/unistd.h
|
||||||
mkerrors="$mkerrors -m64"
|
mkerrors="$mkerrors -m64"
|
||||||
mksysnum="./mksysnum_linux.pl $unistd_h"
|
mksysnum="./mksysnum_linux.pl $unistd_h"
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
// +build linux
|
// +build linux
|
||||||
// +build power64 power64le
|
// +build ppc64 ppc64le
|
||||||
|
|
||||||
package syscall
|
package syscall
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
// mksyscall.pl syscall_linux.go syscall_linux_power64x.go
|
// mksyscall.pl syscall_linux.go syscall_linux_ppc64x.go
|
||||||
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||||
|
|
||||||
package syscall
|
package syscall
|
@ -1,4 +1,4 @@
|
|||||||
// mksyscall.pl syscall_linux.go syscall_linux_power64x.go
|
// mksyscall.pl syscall_linux.go syscall_linux_ppc64x.go
|
||||||
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||||
|
|
||||||
package syscall
|
package syscall
|
@ -1,6 +1,6 @@
|
|||||||
// errorcheck -0 -d=nil
|
// errorcheck -0 -d=nil
|
||||||
// Fails on power64x because of incomplete optimization. See issue 9058.
|
// Fails on ppc64x because of incomplete optimization. See issue 9058.
|
||||||
// +build !power64,!power64le
|
// +build !ppc64,!ppc64le
|
||||||
|
|
||||||
// Copyright 2013 The Go Authors. All rights reserved.
|
// Copyright 2013 The Go Authors. All rights reserved.
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
|
@ -127,7 +127,7 @@ main 136 nosplit; REJECT
|
|||||||
# Calling a nosplit function from a nosplit function requires
|
# Calling a nosplit function from a nosplit function requires
|
||||||
# having room for the saved caller PC and the called frame.
|
# having room for the saved caller PC and the called frame.
|
||||||
# Because ARM doesn't save LR in the leaf, it gets an extra 4 bytes.
|
# Because ARM doesn't save LR in the leaf, it gets an extra 4 bytes.
|
||||||
# Because Power64 doesn't save LR in the leaf, it gets an extra 8 bytes.
|
# Because ppc64 doesn't save LR in the leaf, it gets an extra 8 bytes.
|
||||||
main 112 nosplit call f; f 0 nosplit
|
main 112 nosplit call f; f 0 nosplit
|
||||||
main 116 nosplit call f; f 0 nosplit
|
main 116 nosplit call f; f 0 nosplit
|
||||||
main 120 nosplit call f; f 0 nosplit; REJECT amd64
|
main 120 nosplit call f; f 0 nosplit; REJECT amd64
|
||||||
@ -139,7 +139,7 @@ main 136 nosplit call f; f 0 nosplit; REJECT
|
|||||||
# Calling a splitting function from a nosplit function requires
|
# Calling a splitting function from a nosplit function requires
|
||||||
# having room for the saved caller PC of the call but also the
|
# having room for the saved caller PC of the call but also the
|
||||||
# saved caller PC for the call to morestack.
|
# saved caller PC for the call to morestack.
|
||||||
# Again the ARM and Power64 work in less space.
|
# Again the ARM and ppc64 work in less space.
|
||||||
main 104 nosplit call f; f 0 call f
|
main 104 nosplit call f; f 0 call f
|
||||||
main 108 nosplit call f; f 0 call f
|
main 108 nosplit call f; f 0 call f
|
||||||
main 112 nosplit call f; f 0 call f; REJECT amd64
|
main 112 nosplit call f; f 0 call f; REJECT amd64
|
||||||
@ -237,7 +237,7 @@ TestCases:
|
|||||||
var buf bytes.Buffer
|
var buf bytes.Buffer
|
||||||
ptrSize := 4
|
ptrSize := 4
|
||||||
switch goarch {
|
switch goarch {
|
||||||
case "power64", "power64le":
|
case "ppc64", "ppc64le":
|
||||||
ptrSize = 8
|
ptrSize = 8
|
||||||
fmt.Fprintf(&buf, "#define CALL BL\n#define REGISTER (CTR)\n#define RET RETURN\n")
|
fmt.Fprintf(&buf, "#define CALL BL\n#define REGISTER (CTR)\n#define RET RETURN\n")
|
||||||
case "arm":
|
case "arm":
|
||||||
|
Loading…
Reference in New Issue
Block a user