mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: change textflags from numbers to symbols
R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/12798043
This commit is contained in:
parent
2791ef0b67
commit
e838334beb
36 changed files with 156 additions and 119 deletions
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
#include "runtime.h"
|
#include "runtime.h"
|
||||||
#include "type.h"
|
#include "type.h"
|
||||||
|
#include "../../cmd/ld/textflag.h"
|
||||||
|
|
||||||
#define M0 (sizeof(uintptr)==4 ? 2860486313UL : 33054211828000289ULL)
|
#define M0 (sizeof(uintptr)==4 ? 2860486313UL : 33054211828000289ULL)
|
||||||
#define M1 (sizeof(uintptr)==4 ? 3267000013UL : 23344194077549503ULL)
|
#define M1 (sizeof(uintptr)==4 ? 3267000013UL : 23344194077549503ULL)
|
||||||
|
|
@ -499,7 +500,7 @@ runtime·hashinit(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
// func equal(t *Type, x T, y T) (ret bool)
|
// func equal(t *Type, x T, y T) (ret bool)
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·equal(Type *t, ...)
|
runtime·equal(Type *t, ...)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -3,22 +3,23 @@
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
#include "runtime.h"
|
#include "runtime.h"
|
||||||
|
#include "../../cmd/ld/textflag.h"
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
uint32
|
uint32
|
||||||
runtime·atomicload(uint32 volatile* addr)
|
runtime·atomicload(uint32 volatile* addr)
|
||||||
{
|
{
|
||||||
return *addr;
|
return *addr;
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void*
|
void*
|
||||||
runtime·atomicloadp(void* volatile* addr)
|
runtime·atomicloadp(void* volatile* addr)
|
||||||
{
|
{
|
||||||
return *addr;
|
return *addr;
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
uint64
|
uint64
|
||||||
runtime·xadd64(uint64 volatile* addr, int64 v)
|
runtime·xadd64(uint64 volatile* addr, int64 v)
|
||||||
{
|
{
|
||||||
|
|
@ -31,7 +32,7 @@ runtime·xadd64(uint64 volatile* addr, int64 v)
|
||||||
return old+v;
|
return old+v;
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
uint64
|
uint64
|
||||||
runtime·xchg64(uint64 volatile* addr, uint64 v)
|
runtime·xchg64(uint64 volatile* addr, uint64 v)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -3,22 +3,23 @@
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
#include "runtime.h"
|
#include "runtime.h"
|
||||||
|
#include "../../cmd/ld/textflag.h"
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
uint32
|
uint32
|
||||||
runtime·atomicload(uint32 volatile* addr)
|
runtime·atomicload(uint32 volatile* addr)
|
||||||
{
|
{
|
||||||
return *addr;
|
return *addr;
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
uint64
|
uint64
|
||||||
runtime·atomicload64(uint64 volatile* addr)
|
runtime·atomicload64(uint64 volatile* addr)
|
||||||
{
|
{
|
||||||
return *addr;
|
return *addr;
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void*
|
void*
|
||||||
runtime·atomicloadp(void* volatile* addr)
|
runtime·atomicloadp(void* volatile* addr)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
#include "runtime.h"
|
#include "runtime.h"
|
||||||
#include "arch_GOARCH.h"
|
#include "arch_GOARCH.h"
|
||||||
|
#include "../../cmd/ld/textflag.h"
|
||||||
|
|
||||||
static struct {
|
static struct {
|
||||||
Lock l;
|
Lock l;
|
||||||
|
|
@ -13,7 +14,7 @@ static struct {
|
||||||
#define LOCK(addr) (&locktab[((uintptr)(addr)>>3)%nelem(locktab)].l)
|
#define LOCK(addr) (&locktab[((uintptr)(addr)>>3)%nelem(locktab)].l)
|
||||||
|
|
||||||
// Atomic add and return new value.
|
// Atomic add and return new value.
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
uint32
|
uint32
|
||||||
runtime·xadd(uint32 volatile *val, int32 delta)
|
runtime·xadd(uint32 volatile *val, int32 delta)
|
||||||
{
|
{
|
||||||
|
|
@ -27,7 +28,7 @@ runtime·xadd(uint32 volatile *val, int32 delta)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
uint32
|
uint32
|
||||||
runtime·xchg(uint32 volatile* addr, uint32 v)
|
runtime·xchg(uint32 volatile* addr, uint32 v)
|
||||||
{
|
{
|
||||||
|
|
@ -40,7 +41,7 @@ runtime·xchg(uint32 volatile* addr, uint32 v)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·procyield(uint32 cnt)
|
runtime·procyield(uint32 cnt)
|
||||||
{
|
{
|
||||||
|
|
@ -50,21 +51,21 @@ runtime·procyield(uint32 cnt)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
uint32
|
uint32
|
||||||
runtime·atomicload(uint32 volatile* addr)
|
runtime·atomicload(uint32 volatile* addr)
|
||||||
{
|
{
|
||||||
return runtime·xadd(addr, 0);
|
return runtime·xadd(addr, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void*
|
void*
|
||||||
runtime·atomicloadp(void* volatile* addr)
|
runtime·atomicloadp(void* volatile* addr)
|
||||||
{
|
{
|
||||||
return (void*)runtime·xadd((uint32 volatile*)addr, 0);
|
return (void*)runtime·xadd((uint32 volatile*)addr, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·atomicstorep(void* volatile* addr, void* v)
|
runtime·atomicstorep(void* volatile* addr, void* v)
|
||||||
{
|
{
|
||||||
|
|
@ -77,7 +78,7 @@ runtime·atomicstorep(void* volatile* addr, void* v)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·atomicstore(uint32 volatile* addr, uint32 v)
|
runtime·atomicstore(uint32 volatile* addr, uint32 v)
|
||||||
{
|
{
|
||||||
|
|
@ -90,7 +91,7 @@ runtime·atomicstore(uint32 volatile* addr, uint32 v)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
bool
|
bool
|
||||||
runtime·cas64(uint64 volatile *addr, uint64 old, uint64 new)
|
runtime·cas64(uint64 volatile *addr, uint64 old, uint64 new)
|
||||||
{
|
{
|
||||||
|
|
@ -107,7 +108,7 @@ runtime·cas64(uint64 volatile *addr, uint64 old, uint64 new)
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
uint64
|
uint64
|
||||||
runtime·xadd64(uint64 volatile *addr, int64 delta)
|
runtime·xadd64(uint64 volatile *addr, int64 delta)
|
||||||
{
|
{
|
||||||
|
|
@ -120,7 +121,7 @@ runtime·xadd64(uint64 volatile *addr, int64 delta)
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
uint64
|
uint64
|
||||||
runtime·xchg64(uint64 volatile *addr, uint64 v)
|
runtime·xchg64(uint64 volatile *addr, uint64 v)
|
||||||
{
|
{
|
||||||
|
|
@ -133,7 +134,7 @@ runtime·xchg64(uint64 volatile *addr, uint64 v)
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
uint64
|
uint64
|
||||||
runtime·atomicload64(uint64 volatile *addr)
|
runtime·atomicload64(uint64 volatile *addr)
|
||||||
{
|
{
|
||||||
|
|
@ -145,7 +146,7 @@ runtime·atomicload64(uint64 volatile *addr)
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·atomicstore64(uint64 volatile *addr, uint64 v)
|
runtime·atomicstore64(uint64 volatile *addr, uint64 v)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
#include "stack.h"
|
#include "stack.h"
|
||||||
#include "cgocall.h"
|
#include "cgocall.h"
|
||||||
#include "race.h"
|
#include "race.h"
|
||||||
|
#include "../../cmd/ld/textflag.h"
|
||||||
|
|
||||||
// Cgo call and callback support.
|
// Cgo call and callback support.
|
||||||
//
|
//
|
||||||
|
|
@ -244,7 +245,7 @@ struct CallbackArgs
|
||||||
|
|
||||||
void runtime·cgocallbackg1(void);
|
void runtime·cgocallbackg1(void);
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·cgocallbackg(void)
|
runtime·cgocallbackg(void)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
#include "type.h"
|
#include "type.h"
|
||||||
#include "race.h"
|
#include "race.h"
|
||||||
#include "malloc.h"
|
#include "malloc.h"
|
||||||
|
#include "../../cmd/ld/textflag.h"
|
||||||
|
|
||||||
#define MAXALIGN 8
|
#define MAXALIGN 8
|
||||||
#define NOSELGEN 1
|
#define NOSELGEN 1
|
||||||
|
|
@ -436,7 +437,7 @@ closed:
|
||||||
}
|
}
|
||||||
|
|
||||||
// chansend1(hchan *chan any, elem any);
|
// chansend1(hchan *chan any, elem any);
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·chansend1(ChanType *t, Hchan* c, ...)
|
runtime·chansend1(ChanType *t, Hchan* c, ...)
|
||||||
{
|
{
|
||||||
|
|
@ -444,7 +445,7 @@ runtime·chansend1(ChanType *t, Hchan* c, ...)
|
||||||
}
|
}
|
||||||
|
|
||||||
// chanrecv1(hchan *chan any) (elem any);
|
// chanrecv1(hchan *chan any) (elem any);
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·chanrecv1(ChanType *t, Hchan* c, ...)
|
runtime·chanrecv1(ChanType *t, Hchan* c, ...)
|
||||||
{
|
{
|
||||||
|
|
@ -452,7 +453,7 @@ runtime·chanrecv1(ChanType *t, Hchan* c, ...)
|
||||||
}
|
}
|
||||||
|
|
||||||
// chanrecv2(hchan *chan any) (elem any, received bool);
|
// chanrecv2(hchan *chan any) (elem any, received bool);
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·chanrecv2(ChanType *t, Hchan* c, ...)
|
runtime·chanrecv2(ChanType *t, Hchan* c, ...)
|
||||||
{
|
{
|
||||||
|
|
@ -482,7 +483,7 @@ runtime·chanrecv2(ChanType *t, Hchan* c, ...)
|
||||||
// ... bar
|
// ... bar
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·selectnbsend(ChanType *t, Hchan *c, ...)
|
runtime·selectnbsend(ChanType *t, Hchan *c, ...)
|
||||||
{
|
{
|
||||||
|
|
@ -512,7 +513,7 @@ runtime·selectnbsend(ChanType *t, Hchan *c, ...)
|
||||||
// ... bar
|
// ... bar
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·selectnbrecv(ChanType *t, byte *v, Hchan *c, bool selected)
|
runtime·selectnbrecv(ChanType *t, byte *v, Hchan *c, bool selected)
|
||||||
{
|
{
|
||||||
|
|
@ -538,7 +539,7 @@ runtime·selectnbrecv(ChanType *t, byte *v, Hchan *c, bool selected)
|
||||||
// ... bar
|
// ... bar
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·selectnbrecv2(ChanType *t, byte *v, bool *received, Hchan *c, bool selected)
|
runtime·selectnbrecv2(ChanType *t, byte *v, bool *received, Hchan *c, bool selected)
|
||||||
{
|
{
|
||||||
|
|
@ -552,7 +553,7 @@ runtime·selectnbrecv2(ChanType *t, byte *v, bool *received, Hchan *c, bool sele
|
||||||
//
|
//
|
||||||
// The "uintptr selected" is really "bool selected" but saying
|
// The "uintptr selected" is really "bool selected" but saying
|
||||||
// uintptr gets us the right alignment for the output parameter block.
|
// uintptr gets us the right alignment for the output parameter block.
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
reflect·chansend(ChanType *t, Hchan *c, uintptr val, bool nb, uintptr selected)
|
reflect·chansend(ChanType *t, Hchan *c, uintptr val, bool nb, uintptr selected)
|
||||||
{
|
{
|
||||||
|
|
@ -608,7 +609,7 @@ reflect·chanrecv(ChanType *t, Hchan *c, bool nb, uintptr val, bool selected, bo
|
||||||
static void newselect(int32, Select**);
|
static void newselect(int32, Select**);
|
||||||
|
|
||||||
// newselect(size uint32) (sel *byte);
|
// newselect(size uint32) (sel *byte);
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·newselect(int32 size, ...)
|
runtime·newselect(int32 size, ...)
|
||||||
{
|
{
|
||||||
|
|
@ -653,7 +654,7 @@ newselect(int32 size, Select **selp)
|
||||||
static void selectsend(Select *sel, Hchan *c, void *pc, void *elem, int32 so);
|
static void selectsend(Select *sel, Hchan *c, void *pc, void *elem, int32 so);
|
||||||
|
|
||||||
// selectsend(sel *byte, hchan *chan any, elem *any) (selected bool);
|
// selectsend(sel *byte, hchan *chan any, elem *any) (selected bool);
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·selectsend(Select *sel, Hchan *c, void *elem, bool selected)
|
runtime·selectsend(Select *sel, Hchan *c, void *elem, bool selected)
|
||||||
{
|
{
|
||||||
|
|
@ -694,7 +695,7 @@ selectsend(Select *sel, Hchan *c, void *pc, void *elem, int32 so)
|
||||||
static void selectrecv(Select *sel, Hchan *c, void *pc, void *elem, bool*, int32 so);
|
static void selectrecv(Select *sel, Hchan *c, void *pc, void *elem, bool*, int32 so);
|
||||||
|
|
||||||
// selectrecv(sel *byte, hchan *chan any, elem *any) (selected bool);
|
// selectrecv(sel *byte, hchan *chan any, elem *any) (selected bool);
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·selectrecv(Select *sel, Hchan *c, void *elem, bool selected)
|
runtime·selectrecv(Select *sel, Hchan *c, void *elem, bool selected)
|
||||||
{
|
{
|
||||||
|
|
@ -709,7 +710,7 @@ runtime·selectrecv(Select *sel, Hchan *c, void *elem, bool selected)
|
||||||
}
|
}
|
||||||
|
|
||||||
// selectrecv2(sel *byte, hchan *chan any, elem *any, received *bool) (selected bool);
|
// selectrecv2(sel *byte, hchan *chan any, elem *any, received *bool) (selected bool);
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·selectrecv2(Select *sel, Hchan *c, void *elem, bool *received, bool selected)
|
runtime·selectrecv2(Select *sel, Hchan *c, void *elem, bool *received, bool selected)
|
||||||
{
|
{
|
||||||
|
|
@ -751,7 +752,7 @@ selectrecv(Select *sel, Hchan *c, void *pc, void *elem, bool *received, int32 so
|
||||||
static void selectdefault(Select*, void*, int32);
|
static void selectdefault(Select*, void*, int32);
|
||||||
|
|
||||||
// selectdefault(sel *byte) (selected bool);
|
// selectdefault(sel *byte) (selected bool);
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·selectdefault(Select *sel, bool selected)
|
runtime·selectdefault(Select *sel, bool selected)
|
||||||
{
|
{
|
||||||
|
|
@ -838,7 +839,7 @@ static void* selectgo(Select**);
|
||||||
//
|
//
|
||||||
// overwrites return pc on stack to signal which case of the select
|
// overwrites return pc on stack to signal which case of the select
|
||||||
// to run, so cannot appear at the top of a split stack.
|
// to run, so cannot appear at the top of a split stack.
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·selectgo(Select *sel)
|
runtime·selectgo(Select *sel)
|
||||||
{
|
{
|
||||||
|
|
@ -1216,7 +1217,7 @@ reflect·rselect(Slice cases, intgo chosen, uintptr word, bool recvOK)
|
||||||
static void closechan(Hchan *c, void *pc);
|
static void closechan(Hchan *c, void *pc);
|
||||||
|
|
||||||
// closechan(sel *byte);
|
// closechan(sel *byte);
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·closechan(Hchan *c)
|
runtime·closechan(Hchan *c)
|
||||||
{
|
{
|
||||||
|
|
@ -1225,7 +1226,7 @@ runtime·closechan(Hchan *c)
|
||||||
|
|
||||||
// For reflect
|
// For reflect
|
||||||
// func chanclose(c chan)
|
// func chanclose(c chan)
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
reflect·chanclose(Hchan *c)
|
reflect·chanclose(Hchan *c)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -593,6 +593,7 @@ static uint8 empty_value[MAXVALUESIZE];
|
||||||
#define SLOW_EQ(x,y) runtime·memeq((x).str, (y).str, (x).len)
|
#define SLOW_EQ(x,y) runtime·memeq((x).str, (y).str, (x).len)
|
||||||
#define MAYBE_EQ(x,y) (*(CHECKTYPE*)(x).str == *(CHECKTYPE*)(y).str && *(CHECKTYPE*)((x).str + (x).len - sizeof(CHECKTYPE)) == *(CHECKTYPE*)((y).str + (x).len - sizeof(CHECKTYPE)))
|
#define MAYBE_EQ(x,y) (*(CHECKTYPE*)(x).str == *(CHECKTYPE*)(y).str && *(CHECKTYPE*)((x).str + (x).len - sizeof(CHECKTYPE)) == *(CHECKTYPE*)((y).str + (x).len - sizeof(CHECKTYPE)))
|
||||||
#include "hashmap_fast.c"
|
#include "hashmap_fast.c"
|
||||||
|
#include "../../cmd/ld/textflag.h"
|
||||||
|
|
||||||
static void
|
static void
|
||||||
hash_insert(MapType *t, Hmap *h, void *key, void *value)
|
hash_insert(MapType *t, Hmap *h, void *key, void *value)
|
||||||
|
|
@ -1181,7 +1182,7 @@ runtime·mapaccess(MapType *t, Hmap *h, byte *ak, byte *av, bool *pres)
|
||||||
}
|
}
|
||||||
|
|
||||||
// mapaccess1(hmap *map[any]any, key any) (val any);
|
// mapaccess1(hmap *map[any]any, key any) (val any);
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·mapaccess1(MapType *t, Hmap *h, ...)
|
runtime·mapaccess1(MapType *t, Hmap *h, ...)
|
||||||
{
|
{
|
||||||
|
|
@ -1213,7 +1214,7 @@ runtime·mapaccess1(MapType *t, Hmap *h, ...)
|
||||||
}
|
}
|
||||||
|
|
||||||
// mapaccess2(hmap *map[any]any, key any) (val any, pres bool);
|
// mapaccess2(hmap *map[any]any, key any) (val any, pres bool);
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·mapaccess2(MapType *t, Hmap *h, ...)
|
runtime·mapaccess2(MapType *t, Hmap *h, ...)
|
||||||
{
|
{
|
||||||
|
|
@ -1297,7 +1298,7 @@ runtime·mapassign(MapType *t, Hmap *h, byte *ak, byte *av)
|
||||||
}
|
}
|
||||||
|
|
||||||
// mapassign1(mapType *type, hmap *map[any]any, key any, val any);
|
// mapassign1(mapType *type, hmap *map[any]any, key any, val any);
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·mapassign1(MapType *t, Hmap *h, ...)
|
runtime·mapassign1(MapType *t, Hmap *h, ...)
|
||||||
{
|
{
|
||||||
|
|
@ -1315,7 +1316,7 @@ runtime·mapassign1(MapType *t, Hmap *h, ...)
|
||||||
}
|
}
|
||||||
|
|
||||||
// mapdelete(mapType *type, hmap *map[any]any, key any)
|
// mapdelete(mapType *type, hmap *map[any]any, key any)
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·mapdelete(MapType *t, Hmap *h, ...)
|
runtime·mapdelete(MapType *t, Hmap *h, ...)
|
||||||
{
|
{
|
||||||
|
|
@ -1445,7 +1446,7 @@ reflect·mapiternext(struct hash_iter *it)
|
||||||
}
|
}
|
||||||
|
|
||||||
// mapiter1(hiter *any) (key any);
|
// mapiter1(hiter *any) (key any);
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·mapiter1(struct hash_iter *it, ...)
|
runtime·mapiter1(struct hash_iter *it, ...)
|
||||||
{
|
{
|
||||||
|
|
@ -1526,7 +1527,7 @@ reflect·maplen(Hmap *h, intgo len)
|
||||||
}
|
}
|
||||||
|
|
||||||
// mapiter2(hiter *any) (key any, val any);
|
// mapiter2(hiter *any) (key any, val any);
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·mapiter2(struct hash_iter *it, ...)
|
runtime·mapiter2(struct hash_iter *it, ...)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
// +build ignore
|
// +build ignore
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
HASH_LOOKUP1(MapType *t, Hmap *h, KEYTYPE key, byte *value)
|
HASH_LOOKUP1(MapType *t, Hmap *h, KEYTYPE key, byte *value)
|
||||||
{
|
{
|
||||||
|
|
@ -124,7 +124,7 @@ dohash:
|
||||||
FLUSH(&value);
|
FLUSH(&value);
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
HASH_LOOKUP2(MapType *t, Hmap *h, KEYTYPE key, byte *value, bool res)
|
HASH_LOOKUP2(MapType *t, Hmap *h, KEYTYPE key, byte *value, bool res)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
#include "type.h"
|
#include "type.h"
|
||||||
#include "typekind.h"
|
#include "typekind.h"
|
||||||
#include "malloc.h"
|
#include "malloc.h"
|
||||||
|
#include "../../cmd/ld/textflag.h"
|
||||||
|
|
||||||
void
|
void
|
||||||
runtime·printiface(Iface i)
|
runtime·printiface(Iface i)
|
||||||
|
|
@ -170,7 +171,7 @@ copyout(Type *t, void **src, void *dst)
|
||||||
alg->copy(size, dst, *src);
|
alg->copy(size, dst, *src);
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·typ2Itab(Type *t, InterfaceType *inter, Itab **cache, Itab *ret)
|
runtime·typ2Itab(Type *t, InterfaceType *inter, Itab **cache, Itab *ret)
|
||||||
{
|
{
|
||||||
|
|
@ -183,7 +184,7 @@ runtime·typ2Itab(Type *t, InterfaceType *inter, Itab **cache, Itab *ret)
|
||||||
}
|
}
|
||||||
|
|
||||||
// func convT2I(typ *byte, typ2 *byte, cache **byte, elem any) (ret any)
|
// func convT2I(typ *byte, typ2 *byte, cache **byte, elem any) (ret any)
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·convT2I(Type *t, InterfaceType *inter, Itab **cache, ...)
|
runtime·convT2I(Type *t, InterfaceType *inter, Itab **cache, ...)
|
||||||
{
|
{
|
||||||
|
|
@ -205,7 +206,7 @@ runtime·convT2I(Type *t, InterfaceType *inter, Itab **cache, ...)
|
||||||
}
|
}
|
||||||
|
|
||||||
// func convT2E(typ *byte, elem any) (ret any)
|
// func convT2E(typ *byte, elem any) (ret any)
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·convT2E(Type *t, ...)
|
runtime·convT2E(Type *t, ...)
|
||||||
{
|
{
|
||||||
|
|
@ -223,7 +224,7 @@ runtime·convT2E(Type *t, ...)
|
||||||
static void assertI2Tret(Type *t, Iface i, byte *ret);
|
static void assertI2Tret(Type *t, Iface i, byte *ret);
|
||||||
|
|
||||||
// func ifaceI2T(typ *byte, iface any) (ret any)
|
// func ifaceI2T(typ *byte, iface any) (ret any)
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·assertI2T(Type *t, Iface i, ...)
|
runtime·assertI2T(Type *t, Iface i, ...)
|
||||||
{
|
{
|
||||||
|
|
@ -256,7 +257,7 @@ assertI2Tret(Type *t, Iface i, byte *ret)
|
||||||
}
|
}
|
||||||
|
|
||||||
// func ifaceI2T2(typ *byte, iface any) (ret any, ok bool)
|
// func ifaceI2T2(typ *byte, iface any) (ret any, ok bool)
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·assertI2T2(Type *t, Iface i, ...)
|
runtime·assertI2T2(Type *t, Iface i, ...)
|
||||||
{
|
{
|
||||||
|
|
@ -288,7 +289,7 @@ runtime·assertI2TOK(Type *t, Iface i, bool ok)
|
||||||
static void assertE2Tret(Type *t, Eface e, byte *ret);
|
static void assertE2Tret(Type *t, Eface e, byte *ret);
|
||||||
|
|
||||||
// func ifaceE2T(typ *byte, iface any) (ret any)
|
// func ifaceE2T(typ *byte, iface any) (ret any)
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·assertE2T(Type *t, Eface e, ...)
|
runtime·assertE2T(Type *t, Eface e, ...)
|
||||||
{
|
{
|
||||||
|
|
@ -319,7 +320,7 @@ assertE2Tret(Type *t, Eface e, byte *ret)
|
||||||
}
|
}
|
||||||
|
|
||||||
// func ifaceE2T2(sigt *byte, iface any) (ret any, ok bool);
|
// func ifaceE2T2(sigt *byte, iface any) (ret any, ok bool);
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·assertE2T2(Type *t, Eface e, ...)
|
runtime·assertE2T2(Type *t, Eface e, ...)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
#include "runtime.h"
|
#include "runtime.h"
|
||||||
#include "stack.h"
|
#include "stack.h"
|
||||||
|
#include "../../cmd/ld/textflag.h"
|
||||||
|
|
||||||
// This implementation depends on OS-specific implementations of
|
// This implementation depends on OS-specific implementations of
|
||||||
//
|
//
|
||||||
|
|
@ -133,7 +134,7 @@ runtime·notesleep(Note *n)
|
||||||
runtime·futexsleep((uint32*)&n->key, 0, -1);
|
runtime·futexsleep((uint32*)&n->key, 0, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
static bool
|
static bool
|
||||||
notetsleep(Note *n, int64 ns, int64 deadline, int64 now)
|
notetsleep(Note *n, int64 ns, int64 deadline, int64 now)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
#include "runtime.h"
|
#include "runtime.h"
|
||||||
#include "stack.h"
|
#include "stack.h"
|
||||||
|
#include "../../cmd/ld/textflag.h"
|
||||||
|
|
||||||
// This implementation depends on OS-specific implementations of
|
// This implementation depends on OS-specific implementations of
|
||||||
//
|
//
|
||||||
|
|
@ -163,7 +164,7 @@ runtime·notesleep(Note *n)
|
||||||
runtime·semasleep(-1);
|
runtime·semasleep(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
static bool
|
static bool
|
||||||
notetsleep(Note *n, int64 ns, int64 deadline, M *mp)
|
notetsleep(Note *n, int64 ns, int64 deadline, M *mp)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ package runtime
|
||||||
#include "typekind.h"
|
#include "typekind.h"
|
||||||
#include "race.h"
|
#include "race.h"
|
||||||
#include "stack.h"
|
#include "stack.h"
|
||||||
|
#include "../../cmd/ld/textflag.h"
|
||||||
|
|
||||||
// Mark mheap as 'no pointers', it does not contain interesting pointers but occupies ~45K.
|
// Mark mheap as 'no pointers', it does not contain interesting pointers but occupies ~45K.
|
||||||
#pragma dataflag 16
|
#pragma dataflag 16
|
||||||
|
|
@ -696,7 +697,7 @@ runtime·mal(uintptr n)
|
||||||
return runtime·mallocgc(n, 0, 0);
|
return runtime·mallocgc(n, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·new(Type *typ, uint8 *ret)
|
runtime·new(Type *typ, uint8 *ret)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,9 @@
|
||||||
|
|
||||||
package runtime
|
package runtime
|
||||||
#include "runtime.h"
|
#include "runtime.h"
|
||||||
|
#include "../../cmd/ld/textflag.h"
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
func cmpstring(s1 String, s2 String) (v int) {
|
func cmpstring(s1 String, s2 String) (v int) {
|
||||||
uintgo i, l;
|
uintgo i, l;
|
||||||
byte c1, c2;
|
byte c1, c2;
|
||||||
|
|
@ -40,7 +41,7 @@ func cmpstring(s1 String, s2 String) (v int) {
|
||||||
done:;
|
done:;
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
func bytes·Compare(s1 Slice, s2 Slice) (v int) {
|
func bytes·Compare(s1 Slice, s2 Slice) (v int) {
|
||||||
uintgo i, l;
|
uintgo i, l;
|
||||||
byte c1, c2;
|
byte c1, c2;
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
#include "os_GOOS.h"
|
#include "os_GOOS.h"
|
||||||
#include "signal_unix.h"
|
#include "signal_unix.h"
|
||||||
#include "stack.h"
|
#include "stack.h"
|
||||||
|
#include "../../cmd/ld/textflag.h"
|
||||||
|
|
||||||
extern SigTab runtime·sigtab[];
|
extern SigTab runtime·sigtab[];
|
||||||
|
|
||||||
|
|
@ -140,7 +141,7 @@ runtime·unminit(void)
|
||||||
// Mach IPC, to get at semaphores
|
// Mach IPC, to get at semaphores
|
||||||
// Definitions are in /usr/include/mach on a Mac.
|
// Definitions are in /usr/include/mach on a Mac.
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
static void
|
static void
|
||||||
macherror(int32 r, int8 *fn)
|
macherror(int32 r, int8 *fn)
|
||||||
{
|
{
|
||||||
|
|
@ -395,7 +396,7 @@ int32 runtime·mach_semaphore_timedwait(uint32 sema, uint32 sec, uint32 nsec);
|
||||||
int32 runtime·mach_semaphore_signal(uint32 sema);
|
int32 runtime·mach_semaphore_signal(uint32 sema);
|
||||||
int32 runtime·mach_semaphore_signal_all(uint32 sema);
|
int32 runtime·mach_semaphore_signal_all(uint32 sema);
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
int32
|
int32
|
||||||
runtime·semasleep(int64 ns)
|
runtime·semasleep(int64 ns)
|
||||||
{
|
{
|
||||||
|
|
@ -462,7 +463,7 @@ runtime·sigpanic(void)
|
||||||
runtime·panicstring(runtime·sigtab[g->sig].name);
|
runtime·panicstring(runtime·sigtab[g->sig].name);
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·osyield(void)
|
runtime·osyield(void)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
#include "os_GOOS.h"
|
#include "os_GOOS.h"
|
||||||
#include "signal_unix.h"
|
#include "signal_unix.h"
|
||||||
#include "stack.h"
|
#include "stack.h"
|
||||||
|
#include "../../cmd/ld/textflag.h"
|
||||||
|
|
||||||
extern SigTab runtime·sigtab[];
|
extern SigTab runtime·sigtab[];
|
||||||
extern int32 runtime·sys_umtx_op(uint32*, int32, uint32, void*, void*);
|
extern int32 runtime·sys_umtx_op(uint32*, int32, uint32, void*, void*);
|
||||||
|
|
@ -41,7 +42,7 @@ getncpu(void)
|
||||||
// FreeBSD's umtx_op syscall is effectively the same as Linux's futex, and
|
// FreeBSD's umtx_op syscall is effectively the same as Linux's futex, and
|
||||||
// thus the code is largely similar. See linux/thread.c and lock_futex.c for comments.
|
// thus the code is largely similar. See linux/thread.c and lock_futex.c for comments.
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·futexsleep(uint32 *addr, uint32 val, int64 ns)
|
runtime·futexsleep(uint32 *addr, uint32 val, int64 ns)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
#include "runtime.h"
|
#include "runtime.h"
|
||||||
#include "defs_GOOS_GOARCH.h"
|
#include "defs_GOOS_GOARCH.h"
|
||||||
#include "os_GOOS.h"
|
#include "os_GOOS.h"
|
||||||
|
#include "../../cmd/ld/textflag.h"
|
||||||
|
|
||||||
void
|
void
|
||||||
runtime·checkgoarm(void)
|
runtime·checkgoarm(void)
|
||||||
|
|
@ -12,7 +13,7 @@ runtime·checkgoarm(void)
|
||||||
// TODO(minux)
|
// TODO(minux)
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
int64
|
int64
|
||||||
runtime·cputicks(void)
|
runtime·cputicks(void)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
#include "os_GOOS.h"
|
#include "os_GOOS.h"
|
||||||
#include "signal_unix.h"
|
#include "signal_unix.h"
|
||||||
#include "stack.h"
|
#include "stack.h"
|
||||||
|
#include "../../cmd/ld/textflag.h"
|
||||||
|
|
||||||
extern SigTab runtime·sigtab[];
|
extern SigTab runtime·sigtab[];
|
||||||
|
|
||||||
|
|
@ -32,7 +33,7 @@ enum
|
||||||
// if(*addr == val) sleep
|
// if(*addr == val) sleep
|
||||||
// Might be woken up spuriously; that's allowed.
|
// Might be woken up spuriously; that's allowed.
|
||||||
// Don't sleep longer than ns; ns < 0 means forever.
|
// Don't sleep longer than ns; ns < 0 means forever.
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·futexsleep(uint32 *addr, uint32 val, int64 ns)
|
runtime·futexsleep(uint32 *addr, uint32 val, int64 ns)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -5,13 +5,14 @@
|
||||||
#include "runtime.h"
|
#include "runtime.h"
|
||||||
#include "defs_GOOS_GOARCH.h"
|
#include "defs_GOOS_GOARCH.h"
|
||||||
#include "os_GOOS.h"
|
#include "os_GOOS.h"
|
||||||
|
#include "../../cmd/ld/textflag.h"
|
||||||
|
|
||||||
#define AT_NULL 0
|
#define AT_NULL 0
|
||||||
#define AT_RANDOM 25
|
#define AT_RANDOM 25
|
||||||
#define AT_SYSINFO 32
|
#define AT_SYSINFO 32
|
||||||
extern uint32 runtime·_vdso;
|
extern uint32 runtime·_vdso;
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·linux_setup_vdso(int32 argc, byte **argv)
|
runtime·linux_setup_vdso(int32 argc, byte **argv)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
#include "runtime.h"
|
#include "runtime.h"
|
||||||
#include "defs_GOOS_GOARCH.h"
|
#include "defs_GOOS_GOARCH.h"
|
||||||
#include "os_GOOS.h"
|
#include "os_GOOS.h"
|
||||||
|
#include "../../cmd/ld/textflag.h"
|
||||||
|
|
||||||
#define AT_NULL 0
|
#define AT_NULL 0
|
||||||
#define AT_PLATFORM 15 // introduced in at least 2.6.11
|
#define AT_PLATFORM 15 // introduced in at least 2.6.11
|
||||||
|
|
@ -32,7 +33,7 @@ runtime·checkgoarm(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·setup_auxv(int32 argc, void *argv_list)
|
runtime·setup_auxv(int32 argc, void *argv_list)
|
||||||
{
|
{
|
||||||
|
|
@ -71,7 +72,7 @@ runtime·setup_auxv(int32 argc, void *argv_list)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
int64
|
int64
|
||||||
runtime·cputicks(void)
|
runtime·cputicks(void)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
#include "os_GOOS.h"
|
#include "os_GOOS.h"
|
||||||
#include "signal_unix.h"
|
#include "signal_unix.h"
|
||||||
#include "stack.h"
|
#include "stack.h"
|
||||||
|
#include "../../cmd/ld/textflag.h"
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
|
@ -62,7 +63,7 @@ runtime·semacreate(void)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
int32
|
int32
|
||||||
runtime·semasleep(int64 ns)
|
runtime·semasleep(int64 ns)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
#include "defs_GOOS_GOARCH.h"
|
#include "defs_GOOS_GOARCH.h"
|
||||||
#include "os_GOOS.h"
|
#include "os_GOOS.h"
|
||||||
#include "signal_GOOS_GOARCH.h"
|
#include "signal_GOOS_GOARCH.h"
|
||||||
|
#include "../../cmd/ld/textflag.h"
|
||||||
|
|
||||||
void
|
void
|
||||||
runtime·lwp_mcontext_init(McontextT *mc, void *stack, M *mp, G *gp, void (*fn)(void))
|
runtime·lwp_mcontext_init(McontextT *mc, void *stack, M *mp, G *gp, void (*fn)(void))
|
||||||
|
|
@ -23,7 +24,7 @@ runtime·checkgoarm(void)
|
||||||
// TODO(minux)
|
// TODO(minux)
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
int64
|
int64
|
||||||
runtime·cputicks() {
|
runtime·cputicks() {
|
||||||
// Currently cputicks() is used in blocking profiler and to seed runtime·fastrand1().
|
// Currently cputicks() is used in blocking profiler and to seed runtime·fastrand1().
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
#include "os_GOOS.h"
|
#include "os_GOOS.h"
|
||||||
#include "signal_unix.h"
|
#include "signal_unix.h"
|
||||||
#include "stack.h"
|
#include "stack.h"
|
||||||
|
#include "../../cmd/ld/textflag.h"
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
|
@ -59,7 +60,7 @@ runtime·semacreate(void)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
int32
|
int32
|
||||||
runtime·semasleep(int64 ns)
|
runtime·semasleep(int64 ns)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
#include "runtime.h"
|
#include "runtime.h"
|
||||||
#include "os_GOOS.h"
|
#include "os_GOOS.h"
|
||||||
#include "arch_GOARCH.h"
|
#include "arch_GOARCH.h"
|
||||||
|
#include "../../cmd/ld/textflag.h"
|
||||||
|
|
||||||
int8 *goos = "plan9";
|
int8 *goos = "plan9";
|
||||||
extern SigTab runtime·sigtab[];
|
extern SigTab runtime·sigtab[];
|
||||||
|
|
@ -115,14 +116,14 @@ runtime·initsig(void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·osyield(void)
|
runtime·osyield(void)
|
||||||
{
|
{
|
||||||
runtime·sleep(0);
|
runtime·sleep(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·usleep(uint32 µs)
|
runtime·usleep(uint32 µs)
|
||||||
{
|
{
|
||||||
|
|
@ -261,7 +262,7 @@ runtime·semacreate(void)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
int32
|
int32
|
||||||
runtime·semasleep(int64 ns)
|
runtime·semasleep(int64 ns)
|
||||||
{
|
{
|
||||||
|
|
@ -327,7 +328,7 @@ runtime·memlimit(void)
|
||||||
static int8 badsignal[] = "runtime: signal received on thread not created by Go.\n";
|
static int8 badsignal[] = "runtime: signal received on thread not created by Go.\n";
|
||||||
|
|
||||||
// This runs on a foreign stack, without an m or a g. No stack split.
|
// This runs on a foreign stack, without an m or a g. No stack split.
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·badsignal2(void)
|
runtime·badsignal2(void)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
#include "type.h"
|
#include "type.h"
|
||||||
#include "defs_GOOS_GOARCH.h"
|
#include "defs_GOOS_GOARCH.h"
|
||||||
#include "os_GOOS.h"
|
#include "os_GOOS.h"
|
||||||
|
#include "../../cmd/ld/textflag.h"
|
||||||
|
|
||||||
#pragma dynimport runtime·CloseHandle CloseHandle "kernel32.dll"
|
#pragma dynimport runtime·CloseHandle CloseHandle "kernel32.dll"
|
||||||
#pragma dynimport runtime·CreateEvent CreateEventA "kernel32.dll"
|
#pragma dynimport runtime·CreateEvent CreateEventA "kernel32.dll"
|
||||||
|
|
@ -183,7 +184,7 @@ runtime·write(int32 fd, void *buf, int32 n)
|
||||||
|
|
||||||
#define INFINITE ((uintptr)0xFFFFFFFF)
|
#define INFINITE ((uintptr)0xFFFFFFFF)
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
int32
|
int32
|
||||||
runtime·semasleep(int64 ns)
|
runtime·semasleep(int64 ns)
|
||||||
{
|
{
|
||||||
|
|
@ -254,7 +255,7 @@ runtime·unminit(void)
|
||||||
runtime·remove_exception_handler();
|
runtime·remove_exception_handler();
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
int64
|
int64
|
||||||
runtime·nanotime(void)
|
runtime·nanotime(void)
|
||||||
{
|
{
|
||||||
|
|
@ -280,7 +281,7 @@ time·now(int64 sec, int32 usec)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Calling stdcall on os stack.
|
// Calling stdcall on os stack.
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void *
|
void *
|
||||||
runtime·stdcall(void *fn, int32 count, ...)
|
runtime·stdcall(void *fn, int32 count, ...)
|
||||||
{
|
{
|
||||||
|
|
@ -293,14 +294,14 @@ runtime·stdcall(void *fn, int32 count, ...)
|
||||||
|
|
||||||
extern void runtime·usleep1(uint32);
|
extern void runtime·usleep1(uint32);
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·osyield(void)
|
runtime·osyield(void)
|
||||||
{
|
{
|
||||||
runtime·usleep1(1);
|
runtime·usleep1(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·usleep(uint32 us)
|
runtime·usleep(uint32 us)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
#include "arch_GOARCH.h"
|
#include "arch_GOARCH.h"
|
||||||
#include "stack.h"
|
#include "stack.h"
|
||||||
#include "malloc.h"
|
#include "malloc.h"
|
||||||
|
#include "../../cmd/ld/textflag.h"
|
||||||
|
|
||||||
// Code related to defer, panic and recover.
|
// Code related to defer, panic and recover.
|
||||||
|
|
||||||
|
|
@ -122,7 +123,7 @@ freedefer(Defer *d)
|
||||||
// are available sequentially after &fn; they would not be
|
// are available sequentially after &fn; they would not be
|
||||||
// copied if a stack split occurred. It's OK for this to call
|
// copied if a stack split occurred. It's OK for this to call
|
||||||
// functions that split the stack.
|
// functions that split the stack.
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
uintptr
|
uintptr
|
||||||
runtime·deferproc(int32 siz, FuncVal *fn, ...)
|
runtime·deferproc(int32 siz, FuncVal *fn, ...)
|
||||||
{
|
{
|
||||||
|
|
@ -161,7 +162,7 @@ runtime·deferproc(int32 siz, FuncVal *fn, ...)
|
||||||
// an argument frame size. deferreturn is a very special function,
|
// an argument frame size. deferreturn is a very special function,
|
||||||
// and if the runtime ever asks for its frame size, that means
|
// and if the runtime ever asks for its frame size, that means
|
||||||
// the traceback routines are probably broken.
|
// the traceback routines are probably broken.
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·deferreturn(uintptr arg0, ...)
|
runtime·deferreturn(uintptr arg0, ...)
|
||||||
{
|
{
|
||||||
|
|
@ -332,7 +333,7 @@ runtime·unwindstack(G *gp, byte *sp)
|
||||||
// The implementation of the predeclared function recover.
|
// The implementation of the predeclared function recover.
|
||||||
// Cannot split the stack because it needs to reliably
|
// Cannot split the stack because it needs to reliably
|
||||||
// find the stack segment of its caller.
|
// find the stack segment of its caller.
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·recover(byte *argp, Eface ret)
|
runtime·recover(byte *argp, Eface ret)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
#include "runtime.h"
|
#include "runtime.h"
|
||||||
#include "type.h"
|
#include "type.h"
|
||||||
|
#include "../../cmd/ld/textflag.h"
|
||||||
|
|
||||||
//static Lock debuglock;
|
//static Lock debuglock;
|
||||||
|
|
||||||
|
|
@ -52,7 +53,7 @@ runtime·prints(int8 *s)
|
||||||
gwrite(s, runtime·findnull((byte*)s));
|
gwrite(s, runtime·findnull((byte*)s));
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·printf(int8 *s, ...)
|
runtime·printf(int8 *s, ...)
|
||||||
{
|
{
|
||||||
|
|
@ -179,7 +180,7 @@ vprintf(int8 *s, byte *base)
|
||||||
//runtime·unlock(&debuglock);
|
//runtime·unlock(&debuglock);
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·goprintf(String s, ...)
|
runtime·goprintf(String s, ...)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@
|
||||||
#include "stack.h"
|
#include "stack.h"
|
||||||
#include "race.h"
|
#include "race.h"
|
||||||
#include "type.h"
|
#include "type.h"
|
||||||
|
#include "../../cmd/ld/textflag.h"
|
||||||
|
|
||||||
// Goroutine scheduler
|
// Goroutine scheduler
|
||||||
// The scheduler's job is to distribute ready-to-run goroutines over worker threads.
|
// The scheduler's job is to distribute ready-to-run goroutines over worker threads.
|
||||||
|
|
@ -665,7 +666,7 @@ static void unlockextra(M*);
|
||||||
//
|
//
|
||||||
// When the callback is done with the m, it calls dropm to
|
// When the callback is done with the m, it calls dropm to
|
||||||
// put the m back on the list.
|
// put the m back on the list.
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·needm(byte x)
|
runtime·needm(byte x)
|
||||||
{
|
{
|
||||||
|
|
@ -821,7 +822,7 @@ runtime·dropm(void)
|
||||||
// to runtime.extram. If nilokay is true, then lockextra will
|
// to runtime.extram. If nilokay is true, then lockextra will
|
||||||
// return a nil list head if that's what it finds. If nilokay is false,
|
// return a nil list head if that's what it finds. If nilokay is false,
|
||||||
// lockextra will keep waiting until the list head is no longer nil.
|
// lockextra will keep waiting until the list head is no longer nil.
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
static M*
|
static M*
|
||||||
lockextra(bool nilokay)
|
lockextra(bool nilokay)
|
||||||
{
|
{
|
||||||
|
|
@ -849,7 +850,7 @@ lockextra(bool nilokay)
|
||||||
return mp;
|
return mp;
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
static void
|
static void
|
||||||
unlockextra(M *mp)
|
unlockextra(M *mp)
|
||||||
{
|
{
|
||||||
|
|
@ -1359,7 +1360,7 @@ runtime·gosched0(G *gp)
|
||||||
// Need to mark it as nosplit, because it runs with sp > stackbase (as runtime·lessstack).
|
// Need to mark it as nosplit, because it runs with sp > stackbase (as runtime·lessstack).
|
||||||
// Since it does not return it does not matter. But if it is preempted
|
// Since it does not return it does not matter. But if it is preempted
|
||||||
// at the split stack check, GC will complain about inconsistent sp.
|
// at the split stack check, GC will complain about inconsistent sp.
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·goexit(void)
|
runtime·goexit(void)
|
||||||
{
|
{
|
||||||
|
|
@ -1387,7 +1388,7 @@ goexit0(G *gp)
|
||||||
schedule();
|
schedule();
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
static void
|
static void
|
||||||
save(void *pc, uintptr sp)
|
save(void *pc, uintptr sp)
|
||||||
{
|
{
|
||||||
|
|
@ -1407,7 +1408,7 @@ save(void *pc, uintptr sp)
|
||||||
// Entersyscall cannot split the stack: the runtime·gosave must
|
// Entersyscall cannot split the stack: the runtime·gosave must
|
||||||
// make g->sched refer to the caller's stack segment, because
|
// make g->sched refer to the caller's stack segment, because
|
||||||
// entersyscall is going to return immediately after.
|
// entersyscall is going to return immediately after.
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
·entersyscall(int32 dummy)
|
·entersyscall(int32 dummy)
|
||||||
{
|
{
|
||||||
|
|
@ -1460,7 +1461,7 @@ void
|
||||||
}
|
}
|
||||||
|
|
||||||
// The same as runtime·entersyscall(), but with a hint that the syscall is blocking.
|
// The same as runtime·entersyscall(), but with a hint that the syscall is blocking.
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
·entersyscallblock(int32 dummy)
|
·entersyscallblock(int32 dummy)
|
||||||
{
|
{
|
||||||
|
|
@ -1497,7 +1498,7 @@ void
|
||||||
// Arrange for it to run on a cpu again.
|
// Arrange for it to run on a cpu again.
|
||||||
// This is called only from the go syscall library, not
|
// This is called only from the go syscall library, not
|
||||||
// from the low-level system calls used by the runtime.
|
// from the low-level system calls used by the runtime.
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·exitsyscall(void)
|
runtime·exitsyscall(void)
|
||||||
{
|
{
|
||||||
|
|
@ -1540,7 +1541,7 @@ runtime·exitsyscall(void)
|
||||||
g->syscallsp = (uintptr)nil;
|
g->syscallsp = (uintptr)nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
static bool
|
static bool
|
||||||
exitsyscallfast(void)
|
exitsyscallfast(void)
|
||||||
{
|
{
|
||||||
|
|
@ -1660,7 +1661,7 @@ runtime·malg(int32 stacksize)
|
||||||
// are available sequentially after &fn; they would not be
|
// are available sequentially after &fn; they would not be
|
||||||
// copied if a stack split occurred. It's OK for this to call
|
// copied if a stack split occurred. It's OK for this to call
|
||||||
// functions that split the stack.
|
// functions that split the stack.
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·newproc(int32 siz, FuncVal* fn, ...)
|
runtime·newproc(int32 siz, FuncVal* fn, ...)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@
|
||||||
#include "arch_GOARCH.h"
|
#include "arch_GOARCH.h"
|
||||||
#include "malloc.h"
|
#include "malloc.h"
|
||||||
#include "race.h"
|
#include "race.h"
|
||||||
|
#include "../../cmd/ld/textflag.h"
|
||||||
|
|
||||||
void runtime∕race·Initialize(uintptr *racectx);
|
void runtime∕race·Initialize(uintptr *racectx);
|
||||||
void runtime∕race·MapShadow(void *addr, uintptr size);
|
void runtime∕race·MapShadow(void *addr, uintptr size);
|
||||||
|
|
@ -66,7 +67,7 @@ runtime·racemapshadow(void *addr, uintptr size)
|
||||||
|
|
||||||
// Called from instrumented code.
|
// Called from instrumented code.
|
||||||
// If we split stack, getcallerpc() can return runtime·lessstack().
|
// If we split stack, getcallerpc() can return runtime·lessstack().
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·racewrite(uintptr addr)
|
runtime·racewrite(uintptr addr)
|
||||||
{
|
{
|
||||||
|
|
@ -77,7 +78,7 @@ runtime·racewrite(uintptr addr)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·racewriterange(uintptr addr, uintptr sz)
|
runtime·racewriterange(uintptr addr, uintptr sz)
|
||||||
{
|
{
|
||||||
|
|
@ -90,7 +91,7 @@ runtime·racewriterange(uintptr addr, uintptr sz)
|
||||||
|
|
||||||
// Called from instrumented code.
|
// Called from instrumented code.
|
||||||
// If we split stack, getcallerpc() can return runtime·lessstack().
|
// If we split stack, getcallerpc() can return runtime·lessstack().
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·raceread(uintptr addr)
|
runtime·raceread(uintptr addr)
|
||||||
{
|
{
|
||||||
|
|
@ -101,7 +102,7 @@ runtime·raceread(uintptr addr)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·racereadrange(uintptr addr, uintptr sz)
|
runtime·racereadrange(uintptr addr, uintptr sz)
|
||||||
{
|
{
|
||||||
|
|
@ -113,7 +114,7 @@ runtime·racereadrange(uintptr addr, uintptr sz)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called from runtime·racefuncenter (assembly).
|
// Called from runtime·racefuncenter (assembly).
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·racefuncenter1(uintptr pc)
|
runtime·racefuncenter1(uintptr pc)
|
||||||
{
|
{
|
||||||
|
|
@ -128,7 +129,7 @@ runtime·racefuncenter1(uintptr pc)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called from instrumented code.
|
// Called from instrumented code.
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·racefuncexit(void)
|
runtime·racefuncexit(void)
|
||||||
{
|
{
|
||||||
|
|
@ -337,7 +338,7 @@ runtime·RaceSemrelease(uint32 *s)
|
||||||
}
|
}
|
||||||
|
|
||||||
// func RaceRead(addr unsafe.Pointer)
|
// func RaceRead(addr unsafe.Pointer)
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·RaceRead(void *addr)
|
runtime·RaceRead(void *addr)
|
||||||
{
|
{
|
||||||
|
|
@ -345,7 +346,7 @@ runtime·RaceRead(void *addr)
|
||||||
}
|
}
|
||||||
|
|
||||||
// func RaceWrite(addr unsafe.Pointer)
|
// func RaceWrite(addr unsafe.Pointer)
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·RaceWrite(void *addr)
|
runtime·RaceWrite(void *addr)
|
||||||
{
|
{
|
||||||
|
|
@ -353,7 +354,7 @@ runtime·RaceWrite(void *addr)
|
||||||
}
|
}
|
||||||
|
|
||||||
// func RaceReadRange(addr unsafe.Pointer, len int)
|
// func RaceReadRange(addr unsafe.Pointer, len int)
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·RaceReadRange(void *addr, intgo len)
|
runtime·RaceReadRange(void *addr, intgo len)
|
||||||
{
|
{
|
||||||
|
|
@ -361,7 +362,7 @@ runtime·RaceReadRange(void *addr, intgo len)
|
||||||
}
|
}
|
||||||
|
|
||||||
// func RaceWriteRange(addr unsafe.Pointer, len int)
|
// func RaceWriteRange(addr unsafe.Pointer, len int)
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·RaceWriteRange(void *addr, intgo len)
|
runtime·RaceWriteRange(void *addr, intgo len)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
#include "runtime.h"
|
#include "runtime.h"
|
||||||
#include "arch_GOARCH.h"
|
#include "arch_GOARCH.h"
|
||||||
|
#include "../../cmd/ld/textflag.h"
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
maxround = sizeof(uintptr),
|
maxround = sizeof(uintptr),
|
||||||
|
|
@ -415,7 +416,7 @@ runtime·parsedebugvars(void)
|
||||||
// This is a very special function, do not use it if you are not sure what you are doing.
|
// This is a very special function, do not use it if you are not sure what you are doing.
|
||||||
// int64 division is lowered into _divv() call on 386, which does not fit into nosplit functions.
|
// int64 division is lowered into _divv() call on 386, which does not fit into nosplit functions.
|
||||||
// Handles overflow in a time-specific manner.
|
// Handles overflow in a time-specific manner.
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
int32
|
int32
|
||||||
runtime·timediv(int64 v, int32 div, int32 *rem)
|
runtime·timediv(int64 v, int32 div, int32 *rem)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@ package runtime
|
||||||
#include "defs_GOOS_GOARCH.h"
|
#include "defs_GOOS_GOARCH.h"
|
||||||
#include "os_GOOS.h"
|
#include "os_GOOS.h"
|
||||||
#include "cgocall.h"
|
#include "cgocall.h"
|
||||||
|
#include "../../cmd/ld/textflag.h"
|
||||||
|
|
||||||
static struct {
|
static struct {
|
||||||
Note;
|
Note;
|
||||||
|
|
@ -156,7 +157,7 @@ func signal_disable(s uint32) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// This runs on a foreign stack, without an m or a g. No stack split.
|
// This runs on a foreign stack, without an m or a g. No stack split.
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·badsignal(uintptr sig)
|
runtime·badsignal(uintptr sig)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@
|
||||||
#include "typekind.h"
|
#include "typekind.h"
|
||||||
#include "malloc.h"
|
#include "malloc.h"
|
||||||
#include "race.h"
|
#include "race.h"
|
||||||
|
#include "../../cmd/ld/textflag.h"
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
|
@ -57,7 +58,7 @@ makeslice1(SliceType *t, intgo len, intgo cap, Slice *ret)
|
||||||
}
|
}
|
||||||
|
|
||||||
// appendslice(type *Type, x, y, []T) []T
|
// appendslice(type *Type, x, y, []T) []T
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·appendslice(SliceType *t, Slice x, Slice y, Slice ret)
|
runtime·appendslice(SliceType *t, Slice x, Slice y, Slice ret)
|
||||||
{
|
{
|
||||||
|
|
@ -114,7 +115,7 @@ runtime·appendslice(SliceType *t, Slice x, Slice y, Slice ret)
|
||||||
|
|
||||||
|
|
||||||
// appendstr([]byte, string) []byte
|
// appendstr([]byte, string) []byte
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·appendstr(SliceType *t, Slice x, String y, Slice ret)
|
runtime·appendstr(SliceType *t, Slice x, String y, Slice ret)
|
||||||
{
|
{
|
||||||
|
|
@ -217,7 +218,7 @@ growslice1(SliceType *t, Slice x, intgo newcap, Slice *ret)
|
||||||
}
|
}
|
||||||
|
|
||||||
// copy(to any, fr any, wid uintptr) int
|
// copy(to any, fr any, wid uintptr) int
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·copy(Slice to, Slice fm, uintptr width, intgo ret)
|
runtime·copy(Slice to, Slice fm, uintptr width, intgo ret)
|
||||||
{
|
{
|
||||||
|
|
@ -260,7 +261,7 @@ out:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·slicestringcopy(Slice to, String fm, intgo ret)
|
runtime·slicestringcopy(Slice to, String fm, intgo ret)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
// It uses true little-endian doubles, while the 7500 used mixed-endian.
|
// It uses true little-endian doubles, while the 7500 used mixed-endian.
|
||||||
|
|
||||||
#include "runtime.h"
|
#include "runtime.h"
|
||||||
|
#include "../../cmd/ld/textflag.h"
|
||||||
|
|
||||||
#define CPSR 14
|
#define CPSR 14
|
||||||
#define FLAGS_N (1U << 31)
|
#define FLAGS_N (1U << 31)
|
||||||
|
|
@ -600,7 +601,7 @@ struct Sfregs
|
||||||
uint32 cspr;
|
uint32 cspr;
|
||||||
};
|
};
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
uint32*
|
uint32*
|
||||||
runtime·_sfloat2(uint32 *lr, Sfregs regs)
|
runtime·_sfloat2(uint32 *lr, Sfregs regs)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,11 @@ package runtime
|
||||||
#include "arch_GOARCH.h"
|
#include "arch_GOARCH.h"
|
||||||
#include "malloc.h"
|
#include "malloc.h"
|
||||||
#include "race.h"
|
#include "race.h"
|
||||||
|
#include "../../cmd/ld/textflag.h"
|
||||||
|
|
||||||
String runtime·emptystring;
|
String runtime·emptystring;
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
intgo
|
intgo
|
||||||
runtime·findnull(byte *s)
|
runtime·findnull(byte *s)
|
||||||
{
|
{
|
||||||
|
|
@ -174,7 +175,7 @@ concatstring(intgo n, String *s)
|
||||||
// NOTE: Cannot use func syntax, because we need the ...,
|
// NOTE: Cannot use func syntax, because we need the ...,
|
||||||
// to signal to the garbage collector that this function does
|
// to signal to the garbage collector that this function does
|
||||||
// not have a fixed size argument count.
|
// not have a fixed size argument count.
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
runtime·concatstring(intgo n, String s1, ...)
|
runtime·concatstring(intgo n, String s1, ...)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,9 @@
|
||||||
|
|
||||||
#include "runtime.h"
|
#include "runtime.h"
|
||||||
#include "os_GOOS.h"
|
#include "os_GOOS.h"
|
||||||
|
#include "../../cmd/ld/textflag.h"
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
int64
|
int64
|
||||||
runtime·nanotime(void)
|
runtime·nanotime(void)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,8 @@
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
// THE SOFTWARE.
|
// THE SOFTWARE.
|
||||||
|
|
||||||
|
#include "../../cmd/ld/textflag.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* C runtime for 64-bit divide, others.
|
* C runtime for 64-bit divide, others.
|
||||||
*
|
*
|
||||||
|
|
@ -423,7 +425,7 @@ _rshlv(Vlong *r, Vlong a, int b)
|
||||||
r->lo = (t << (32-b)) | (a.lo >> b);
|
r->lo = (t << (32-b)) | (a.lo >> b);
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
_lshv(Vlong *r, Vlong a, int b)
|
_lshv(Vlong *r, Vlong a, int b)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,8 @@
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
// THE SOFTWARE.
|
// THE SOFTWARE.
|
||||||
|
|
||||||
|
#include "../../cmd/ld/textflag.h"
|
||||||
|
|
||||||
// declared here to avoid include of runtime.h
|
// declared here to avoid include of runtime.h
|
||||||
void runtime·panicstring(char*);
|
void runtime·panicstring(char*);
|
||||||
|
|
||||||
|
|
@ -62,7 +64,7 @@ struct Vlong
|
||||||
|
|
||||||
void runtime·abort(void);
|
void runtime·abort(void);
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
_addv(Vlong *r, Vlong a, Vlong b)
|
_addv(Vlong *r, Vlong a, Vlong b)
|
||||||
{
|
{
|
||||||
|
|
@ -72,7 +74,7 @@ _addv(Vlong *r, Vlong a, Vlong b)
|
||||||
r->hi++;
|
r->hi++;
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
_subv(Vlong *r, Vlong a, Vlong b)
|
_subv(Vlong *r, Vlong a, Vlong b)
|
||||||
{
|
{
|
||||||
|
|
@ -421,7 +423,7 @@ _rshlv(Vlong *r, Vlong a, int b)
|
||||||
r->lo = (t << (32-b)) | (a.lo >> b);
|
r->lo = (t << (32-b)) | (a.lo >> b);
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
_lshv(Vlong *r, Vlong a, int b)
|
_lshv(Vlong *r, Vlong a, int b)
|
||||||
{
|
{
|
||||||
|
|
@ -615,7 +617,7 @@ _ul2v(Vlong *ret, ulong ul)
|
||||||
ret->hi = 0;
|
ret->hi = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
void
|
void
|
||||||
_si2v(Vlong *ret, int si)
|
_si2v(Vlong *ret, int si)
|
||||||
{
|
{
|
||||||
|
|
@ -719,7 +721,7 @@ _v2ul(Vlong rv)
|
||||||
return rv.lo;
|
return rv.lo;
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
long
|
long
|
||||||
_v2si(Vlong rv)
|
_v2si(Vlong rv)
|
||||||
{
|
{
|
||||||
|
|
@ -773,7 +775,7 @@ _gtv(Vlong lv, Vlong rv)
|
||||||
(lv.hi == rv.hi && lv.lo > rv.lo);
|
(lv.hi == rv.hi && lv.lo > rv.lo);
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma textflag 7
|
#pragma textflag NOSPLIT
|
||||||
int
|
int
|
||||||
_gev(Vlong lv, Vlong rv)
|
_gev(Vlong lv, Vlong rv)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue