#include "runtime.h"
#include "type.h"
+#include "../../cmd/ld/textflag.h"
#define M0 (sizeof(uintptr)==4 ? 2860486313UL : 33054211828000289ULL)
#define M1 (sizeof(uintptr)==4 ? 3267000013UL : 23344194077549503ULL)
}
// func equal(t *Type, x T, y T) (ret bool)
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·equal(Type *t, ...)
{
// license that can be found in the LICENSE file.
#include "runtime.h"
+#include "../../cmd/ld/textflag.h"
-#pragma textflag 7
+#pragma textflag NOSPLIT
uint32
runtime·atomicload(uint32 volatile* addr)
{
return *addr;
}
-#pragma textflag 7
+#pragma textflag NOSPLIT
void*
runtime·atomicloadp(void* volatile* addr)
{
return *addr;
}
-#pragma textflag 7
+#pragma textflag NOSPLIT
uint64
runtime·xadd64(uint64 volatile* addr, int64 v)
{
return old+v;
}
-#pragma textflag 7
+#pragma textflag NOSPLIT
uint64
runtime·xchg64(uint64 volatile* addr, uint64 v)
{
// license that can be found in the LICENSE file.
#include "runtime.h"
+#include "../../cmd/ld/textflag.h"
-#pragma textflag 7
+#pragma textflag NOSPLIT
uint32
runtime·atomicload(uint32 volatile* addr)
{
return *addr;
}
-#pragma textflag 7
+#pragma textflag NOSPLIT
uint64
runtime·atomicload64(uint64 volatile* addr)
{
return *addr;
}
-#pragma textflag 7
+#pragma textflag NOSPLIT
void*
runtime·atomicloadp(void* volatile* addr)
{
#include "runtime.h"
#include "arch_GOARCH.h"
+#include "../../cmd/ld/textflag.h"
static struct {
Lock l;
#define LOCK(addr) (&locktab[((uintptr)(addr)>>3)%nelem(locktab)].l)
// Atomic add and return new value.
-#pragma textflag 7
+#pragma textflag NOSPLIT
uint32
runtime·xadd(uint32 volatile *val, int32 delta)
{
}
}
-#pragma textflag 7
+#pragma textflag NOSPLIT
uint32
runtime·xchg(uint32 volatile* addr, uint32 v)
{
}
}
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·procyield(uint32 cnt)
{
}
}
-#pragma textflag 7
+#pragma textflag NOSPLIT
uint32
runtime·atomicload(uint32 volatile* addr)
{
return runtime·xadd(addr, 0);
}
-#pragma textflag 7
+#pragma textflag NOSPLIT
void*
runtime·atomicloadp(void* volatile* addr)
{
return (void*)runtime·xadd((uint32 volatile*)addr, 0);
}
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·atomicstorep(void* volatile* addr, void* v)
{
}
}
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·atomicstore(uint32 volatile* addr, uint32 v)
{
}
}
-#pragma textflag 7
+#pragma textflag NOSPLIT
bool
runtime·cas64(uint64 volatile *addr, uint64 old, uint64 new)
{
return res;
}
-#pragma textflag 7
+#pragma textflag NOSPLIT
uint64
runtime·xadd64(uint64 volatile *addr, int64 delta)
{
return res;
}
-#pragma textflag 7
+#pragma textflag NOSPLIT
uint64
runtime·xchg64(uint64 volatile *addr, uint64 v)
{
return res;
}
-#pragma textflag 7
+#pragma textflag NOSPLIT
uint64
runtime·atomicload64(uint64 volatile *addr)
{
return res;
}
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·atomicstore64(uint64 volatile *addr, uint64 v)
{
#include "stack.h"
#include "cgocall.h"
#include "race.h"
+#include "../../cmd/ld/textflag.h"
// Cgo call and callback support.
//
void runtime·cgocallbackg1(void);
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·cgocallbackg(void)
{
#include "type.h"
#include "race.h"
#include "malloc.h"
+#include "../../cmd/ld/textflag.h"
#define MAXALIGN 8
#define NOSELGEN 1
}
// chansend1(hchan *chan any, elem any);
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·chansend1(ChanType *t, Hchan* c, ...)
{
}
// chanrecv1(hchan *chan any) (elem any);
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·chanrecv1(ChanType *t, Hchan* c, ...)
{
}
// chanrecv2(hchan *chan any) (elem any, received bool);
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·chanrecv2(ChanType *t, Hchan* c, ...)
{
// ... bar
// }
//
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·selectnbsend(ChanType *t, Hchan *c, ...)
{
// ... bar
// }
//
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·selectnbrecv(ChanType *t, byte *v, Hchan *c, bool selected)
{
// ... bar
// }
//
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·selectnbrecv2(ChanType *t, byte *v, bool *received, Hchan *c, bool selected)
{
//
// The "uintptr selected" is really "bool selected" but saying
// uintptr gets us the right alignment for the output parameter block.
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
reflect·chansend(ChanType *t, Hchan *c, uintptr val, bool nb, uintptr selected)
{
static void newselect(int32, Select**);
// newselect(size uint32) (sel *byte);
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·newselect(int32 size, ...)
{
static void selectsend(Select *sel, Hchan *c, void *pc, void *elem, int32 so);
// selectsend(sel *byte, hchan *chan any, elem *any) (selected bool);
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·selectsend(Select *sel, Hchan *c, void *elem, bool selected)
{
static void selectrecv(Select *sel, Hchan *c, void *pc, void *elem, bool*, int32 so);
// selectrecv(sel *byte, hchan *chan any, elem *any) (selected bool);
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·selectrecv(Select *sel, Hchan *c, void *elem, bool selected)
{
}
// selectrecv2(sel *byte, hchan *chan any, elem *any, received *bool) (selected bool);
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·selectrecv2(Select *sel, Hchan *c, void *elem, bool *received, bool selected)
{
static void selectdefault(Select*, void*, int32);
// selectdefault(sel *byte) (selected bool);
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·selectdefault(Select *sel, bool selected)
{
//
// overwrites return pc on stack to signal which case of the select
// to run, so cannot appear at the top of a split stack.
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·selectgo(Select *sel)
{
static void closechan(Hchan *c, void *pc);
// closechan(sel *byte);
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·closechan(Hchan *c)
{
// For reflect
// func chanclose(c chan)
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
reflect·chanclose(Hchan *c)
{
#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)))
#include "hashmap_fast.c"
+#include "../../cmd/ld/textflag.h"
static void
hash_insert(MapType *t, Hmap *h, void *key, void *value)
}
// mapaccess1(hmap *map[any]any, key any) (val any);
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·mapaccess1(MapType *t, Hmap *h, ...)
{
}
// mapaccess2(hmap *map[any]any, key any) (val any, pres bool);
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·mapaccess2(MapType *t, Hmap *h, ...)
{
}
// mapassign1(mapType *type, hmap *map[any]any, key any, val any);
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·mapassign1(MapType *t, Hmap *h, ...)
{
}
// mapdelete(mapType *type, hmap *map[any]any, key any)
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·mapdelete(MapType *t, Hmap *h, ...)
{
}
// mapiter1(hiter *any) (key any);
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·mapiter1(struct hash_iter *it, ...)
{
}
// mapiter2(hiter *any) (key any, val any);
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·mapiter2(struct hash_iter *it, ...)
{
// +build ignore
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
HASH_LOOKUP1(MapType *t, Hmap *h, KEYTYPE key, byte *value)
{
FLUSH(&value);
}
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
HASH_LOOKUP2(MapType *t, Hmap *h, KEYTYPE key, byte *value, bool res)
{
#include "type.h"
#include "typekind.h"
#include "malloc.h"
+#include "../../cmd/ld/textflag.h"
void
runtime·printiface(Iface i)
alg->copy(size, dst, *src);
}
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·typ2Itab(Type *t, InterfaceType *inter, Itab **cache, Itab *ret)
{
}
// func convT2I(typ *byte, typ2 *byte, cache **byte, elem any) (ret any)
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·convT2I(Type *t, InterfaceType *inter, Itab **cache, ...)
{
}
// func convT2E(typ *byte, elem any) (ret any)
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·convT2E(Type *t, ...)
{
static void assertI2Tret(Type *t, Iface i, byte *ret);
// func ifaceI2T(typ *byte, iface any) (ret any)
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·assertI2T(Type *t, Iface i, ...)
{
}
// func ifaceI2T2(typ *byte, iface any) (ret any, ok bool)
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·assertI2T2(Type *t, Iface i, ...)
{
static void assertE2Tret(Type *t, Eface e, byte *ret);
// func ifaceE2T(typ *byte, iface any) (ret any)
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·assertE2T(Type *t, Eface e, ...)
{
}
// func ifaceE2T2(sigt *byte, iface any) (ret any, ok bool);
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·assertE2T2(Type *t, Eface e, ...)
{
#include "runtime.h"
#include "stack.h"
+#include "../../cmd/ld/textflag.h"
// This implementation depends on OS-specific implementations of
//
runtime·futexsleep((uint32*)&n->key, 0, -1);
}
-#pragma textflag 7
+#pragma textflag NOSPLIT
static bool
notetsleep(Note *n, int64 ns, int64 deadline, int64 now)
{
#include "runtime.h"
#include "stack.h"
+#include "../../cmd/ld/textflag.h"
// This implementation depends on OS-specific implementations of
//
runtime·semasleep(-1);
}
-#pragma textflag 7
+#pragma textflag NOSPLIT
static bool
notetsleep(Note *n, int64 ns, int64 deadline, M *mp)
{
#include "typekind.h"
#include "race.h"
#include "stack.h"
+#include "../../cmd/ld/textflag.h"
// Mark mheap as 'no pointers', it does not contain interesting pointers but occupies ~45K.
#pragma dataflag 16
return runtime·mallocgc(n, 0, 0);
}
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·new(Type *typ, uint8 *ret)
{
package runtime
#include "runtime.h"
+#include "../../cmd/ld/textflag.h"
-#pragma textflag 7
+#pragma textflag NOSPLIT
func cmpstring(s1 String, s2 String) (v int) {
uintgo i, l;
byte c1, c2;
done:;
}
-#pragma textflag 7
+#pragma textflag NOSPLIT
func bytes·Compare(s1 Slice, s2 Slice) (v int) {
uintgo i, l;
byte c1, c2;
#include "os_GOOS.h"
#include "signal_unix.h"
#include "stack.h"
+#include "../../cmd/ld/textflag.h"
extern SigTab runtime·sigtab[];
// Mach IPC, to get at semaphores
// Definitions are in /usr/include/mach on a Mac.
-#pragma textflag 7
+#pragma textflag NOSPLIT
static void
macherror(int32 r, int8 *fn)
{
int32 runtime·mach_semaphore_signal(uint32 sema);
int32 runtime·mach_semaphore_signal_all(uint32 sema);
-#pragma textflag 7
+#pragma textflag NOSPLIT
int32
runtime·semasleep(int64 ns)
{
runtime·panicstring(runtime·sigtab[g->sig].name);
}
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·osyield(void)
{
#include "os_GOOS.h"
#include "signal_unix.h"
#include "stack.h"
+#include "../../cmd/ld/textflag.h"
extern SigTab runtime·sigtab[];
extern int32 runtime·sys_umtx_op(uint32*, int32, uint32, void*, void*);
// 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.
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·futexsleep(uint32 *addr, uint32 val, int64 ns)
{
#include "runtime.h"
#include "defs_GOOS_GOARCH.h"
#include "os_GOOS.h"
+#include "../../cmd/ld/textflag.h"
void
runtime·checkgoarm(void)
// TODO(minux)
}
-#pragma textflag 7
+#pragma textflag NOSPLIT
int64
runtime·cputicks(void)
{
#include "os_GOOS.h"
#include "signal_unix.h"
#include "stack.h"
+#include "../../cmd/ld/textflag.h"
extern SigTab runtime·sigtab[];
// if(*addr == val) sleep
// Might be woken up spuriously; that's allowed.
// Don't sleep longer than ns; ns < 0 means forever.
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·futexsleep(uint32 *addr, uint32 val, int64 ns)
{
#include "runtime.h"
#include "defs_GOOS_GOARCH.h"
#include "os_GOOS.h"
+#include "../../cmd/ld/textflag.h"
#define AT_NULL 0
#define AT_RANDOM 25
#define AT_SYSINFO 32
extern uint32 runtime·_vdso;
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·linux_setup_vdso(int32 argc, byte **argv)
{
#include "runtime.h"
#include "defs_GOOS_GOARCH.h"
#include "os_GOOS.h"
+#include "../../cmd/ld/textflag.h"
#define AT_NULL 0
#define AT_PLATFORM 15 // introduced in at least 2.6.11
}
}
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·setup_auxv(int32 argc, void *argv_list)
{
}
}
-#pragma textflag 7
+#pragma textflag NOSPLIT
int64
runtime·cputicks(void)
{
#include "os_GOOS.h"
#include "signal_unix.h"
#include "stack.h"
+#include "../../cmd/ld/textflag.h"
enum
{
return 1;
}
-#pragma textflag 7
+#pragma textflag NOSPLIT
int32
runtime·semasleep(int64 ns)
{
#include "defs_GOOS_GOARCH.h"
#include "os_GOOS.h"
#include "signal_GOOS_GOARCH.h"
+#include "../../cmd/ld/textflag.h"
void
runtime·lwp_mcontext_init(McontextT *mc, void *stack, M *mp, G *gp, void (*fn)(void))
// TODO(minux)
}
-#pragma textflag 7
+#pragma textflag NOSPLIT
int64
runtime·cputicks() {
// Currently cputicks() is used in blocking profiler and to seed runtime·fastrand1().
#include "os_GOOS.h"
#include "signal_unix.h"
#include "stack.h"
+#include "../../cmd/ld/textflag.h"
enum
{
return 1;
}
-#pragma textflag 7
+#pragma textflag NOSPLIT
int32
runtime·semasleep(int64 ns)
{
#include "runtime.h"
#include "os_GOOS.h"
#include "arch_GOARCH.h"
+#include "../../cmd/ld/textflag.h"
int8 *goos = "plan9";
extern SigTab runtime·sigtab[];
{
}
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·osyield(void)
{
runtime·sleep(0);
}
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·usleep(uint32 µs)
{
return 1;
}
-#pragma textflag 7
+#pragma textflag NOSPLIT
int32
runtime·semasleep(int64 ns)
{
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.
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·badsignal2(void)
{
#include "type.h"
#include "defs_GOOS_GOARCH.h"
#include "os_GOOS.h"
+#include "../../cmd/ld/textflag.h"
#pragma dynimport runtime·CloseHandle CloseHandle "kernel32.dll"
#pragma dynimport runtime·CreateEvent CreateEventA "kernel32.dll"
#define INFINITE ((uintptr)0xFFFFFFFF)
-#pragma textflag 7
+#pragma textflag NOSPLIT
int32
runtime·semasleep(int64 ns)
{
runtime·remove_exception_handler();
}
-#pragma textflag 7
+#pragma textflag NOSPLIT
int64
runtime·nanotime(void)
{
}
// Calling stdcall on os stack.
-#pragma textflag 7
+#pragma textflag NOSPLIT
void *
runtime·stdcall(void *fn, int32 count, ...)
{
extern void runtime·usleep1(uint32);
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·osyield(void)
{
runtime·usleep1(1);
}
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·usleep(uint32 us)
{
#include "arch_GOARCH.h"
#include "stack.h"
#include "malloc.h"
+#include "../../cmd/ld/textflag.h"
// Code related to defer, panic and recover.
// are available sequentially after &fn; they would not be
// copied if a stack split occurred. It's OK for this to call
// functions that split the stack.
-#pragma textflag 7
+#pragma textflag NOSPLIT
uintptr
runtime·deferproc(int32 siz, FuncVal *fn, ...)
{
// an argument frame size. deferreturn is a very special function,
// and if the runtime ever asks for its frame size, that means
// the traceback routines are probably broken.
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·deferreturn(uintptr arg0, ...)
{
// The implementation of the predeclared function recover.
// Cannot split the stack because it needs to reliably
// find the stack segment of its caller.
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·recover(byte *argp, Eface ret)
{
#include "runtime.h"
#include "type.h"
+#include "../../cmd/ld/textflag.h"
//static Lock debuglock;
gwrite(s, runtime·findnull((byte*)s));
}
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·printf(int8 *s, ...)
{
//runtime·unlock(&debuglock);
}
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·goprintf(String s, ...)
{
#include "stack.h"
#include "race.h"
#include "type.h"
+#include "../../cmd/ld/textflag.h"
// Goroutine scheduler
// The scheduler's job is to distribute ready-to-run goroutines over worker threads.
//
// When the callback is done with the m, it calls dropm to
// put the m back on the list.
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·needm(byte x)
{
// 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,
// lockextra will keep waiting until the list head is no longer nil.
-#pragma textflag 7
+#pragma textflag NOSPLIT
static M*
lockextra(bool nilokay)
{
return mp;
}
-#pragma textflag 7
+#pragma textflag NOSPLIT
static void
unlockextra(M *mp)
{
// 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
// at the split stack check, GC will complain about inconsistent sp.
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·goexit(void)
{
schedule();
}
-#pragma textflag 7
+#pragma textflag NOSPLIT
static void
save(void *pc, uintptr sp)
{
// Entersyscall cannot split the stack: the runtime·gosave must
// make g->sched refer to the caller's stack segment, because
// entersyscall is going to return immediately after.
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
·entersyscall(int32 dummy)
{
}
// The same as runtime·entersyscall(), but with a hint that the syscall is blocking.
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
·entersyscallblock(int32 dummy)
{
// Arrange for it to run on a cpu again.
// This is called only from the go syscall library, not
// from the low-level system calls used by the runtime.
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·exitsyscall(void)
{
g->syscallsp = (uintptr)nil;
}
-#pragma textflag 7
+#pragma textflag NOSPLIT
static bool
exitsyscallfast(void)
{
// are available sequentially after &fn; they would not be
// copied if a stack split occurred. It's OK for this to call
// functions that split the stack.
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·newproc(int32 siz, FuncVal* fn, ...)
{
#include "arch_GOARCH.h"
#include "malloc.h"
#include "race.h"
+#include "../../cmd/ld/textflag.h"
void runtime∕race·Initialize(uintptr *racectx);
void runtime∕race·MapShadow(void *addr, uintptr size);
// Called from instrumented code.
// If we split stack, getcallerpc() can return runtime·lessstack().
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·racewrite(uintptr addr)
{
}
}
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·racewriterange(uintptr addr, uintptr sz)
{
// Called from instrumented code.
// If we split stack, getcallerpc() can return runtime·lessstack().
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·raceread(uintptr addr)
{
}
}
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·racereadrange(uintptr addr, uintptr sz)
{
}
// Called from runtime·racefuncenter (assembly).
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·racefuncenter1(uintptr pc)
{
}
// Called from instrumented code.
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·racefuncexit(void)
{
}
// func RaceRead(addr unsafe.Pointer)
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·RaceRead(void *addr)
{
}
// func RaceWrite(addr unsafe.Pointer)
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·RaceWrite(void *addr)
{
}
// func RaceReadRange(addr unsafe.Pointer, len int)
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·RaceReadRange(void *addr, intgo len)
{
}
// func RaceWriteRange(addr unsafe.Pointer, len int)
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·RaceWriteRange(void *addr, intgo len)
{
#include "runtime.h"
#include "arch_GOARCH.h"
+#include "../../cmd/ld/textflag.h"
enum {
maxround = sizeof(uintptr),
// 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.
// Handles overflow in a time-specific manner.
-#pragma textflag 7
+#pragma textflag NOSPLIT
int32
runtime·timediv(int64 v, int32 div, int32 *rem)
{
#include "defs_GOOS_GOARCH.h"
#include "os_GOOS.h"
#include "cgocall.h"
+#include "../../cmd/ld/textflag.h"
static struct {
Note;
}
// This runs on a foreign stack, without an m or a g. No stack split.
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·badsignal(uintptr sig)
{
#include "typekind.h"
#include "malloc.h"
#include "race.h"
+#include "../../cmd/ld/textflag.h"
enum
{
}
// appendslice(type *Type, x, y, []T) []T
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·appendslice(SliceType *t, Slice x, Slice y, Slice ret)
{
// appendstr([]byte, string) []byte
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·appendstr(SliceType *t, Slice x, String y, Slice ret)
{
}
// copy(to any, fr any, wid uintptr) int
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·copy(Slice to, Slice fm, uintptr width, intgo ret)
{
}
}
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·slicestringcopy(Slice to, String fm, intgo ret)
{
// It uses true little-endian doubles, while the 7500 used mixed-endian.
#include "runtime.h"
+#include "../../cmd/ld/textflag.h"
#define CPSR 14
#define FLAGS_N (1U << 31)
uint32 cspr;
};
-#pragma textflag 7
+#pragma textflag NOSPLIT
uint32*
runtime·_sfloat2(uint32 *lr, Sfregs regs)
{
#include "arch_GOARCH.h"
#include "malloc.h"
#include "race.h"
+#include "../../cmd/ld/textflag.h"
String runtime·emptystring;
-#pragma textflag 7
+#pragma textflag NOSPLIT
intgo
runtime·findnull(byte *s)
{
// NOTE: Cannot use func syntax, because we need the ...,
// to signal to the garbage collector that this function does
// not have a fixed size argument count.
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
runtime·concatstring(intgo n, String s1, ...)
{
#include "runtime.h"
#include "os_GOOS.h"
+#include "../../cmd/ld/textflag.h"
-#pragma textflag 7
+#pragma textflag NOSPLIT
int64
runtime·nanotime(void)
{
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+#include "../../cmd/ld/textflag.h"
+
/*
* C runtime for 64-bit divide, others.
*
r->lo = (t << (32-b)) | (a.lo >> b);
}
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
_lshv(Vlong *r, Vlong a, int b)
{
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+#include "../../cmd/ld/textflag.h"
+
// declared here to avoid include of runtime.h
void runtime·panicstring(char*);
void runtime·abort(void);
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
_addv(Vlong *r, Vlong a, Vlong b)
{
r->hi++;
}
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
_subv(Vlong *r, Vlong a, Vlong b)
{
r->lo = (t << (32-b)) | (a.lo >> b);
}
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
_lshv(Vlong *r, Vlong a, int b)
{
ret->hi = 0;
}
-#pragma textflag 7
+#pragma textflag NOSPLIT
void
_si2v(Vlong *ret, int si)
{
return rv.lo;
}
-#pragma textflag 7
+#pragma textflag NOSPLIT
long
_v2si(Vlong rv)
{
(lv.hi == rv.hi && lv.lo > rv.lo);
}
-#pragma textflag 7
+#pragma textflag NOSPLIT
int
_gev(Vlong lv, Vlong rv)
{