summaryrefslogtreecommitdiffstats
path: root/libgo/go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go')
-rw-r--r--libgo/go/bytes/indexbyte.c4
-rw-r--r--libgo/go/log/syslog/syslog_c.c2
-rw-r--r--libgo/go/sync/atomic/atomic.c48
-rw-r--r--libgo/go/sync/cas.c4
-rw-r--r--libgo/go/syscall/errno.c7
-rw-r--r--libgo/go/syscall/signame.c2
-rw-r--r--libgo/go/syscall/wait.c20
7 files changed, 47 insertions, 40 deletions
diff --git a/libgo/go/bytes/indexbyte.c b/libgo/go/bytes/indexbyte.c
index 1f4399c446a..cbc7847efe8 100644
--- a/libgo/go/bytes/indexbyte.c
+++ b/libgo/go/bytes/indexbyte.c
@@ -14,7 +14,7 @@
library function, which shouldn't need much stack space. */
intgo IndexByte (struct __go_open_array, char)
- asm ("bytes.IndexByte")
+ __asm__ (GOSYM_PREFIX "bytes.IndexByte")
__attribute__ ((no_split_stack));
intgo
@@ -31,7 +31,7 @@ IndexByte (struct __go_open_array s, char b)
/* Comparison. */
_Bool Equal (struct __go_open_array a, struct __go_open_array b)
- asm ("bytes.Equal")
+ __asm__ (GOSYM_PREFIX "bytes.Equal")
__attribute__ ((no_split_stack));
_Bool
diff --git a/libgo/go/log/syslog/syslog_c.c b/libgo/go/log/syslog/syslog_c.c
index d79cba3757b..5b33d78288b 100644
--- a/libgo/go/log/syslog/syslog_c.c
+++ b/libgo/go/log/syslog/syslog_c.c
@@ -12,7 +12,7 @@
can't represent a C varargs function in Go. */
void syslog_c(intgo, const char*)
- asm ("log_syslog.syslog_c");
+ __asm__ (GOSYM_PREFIX "log_syslog.syslog_c");
void
syslog_c (intgo priority, const char *msg)
diff --git a/libgo/go/sync/atomic/atomic.c b/libgo/go/sync/atomic/atomic.c
index 14bc7895621..32430df2ba2 100644
--- a/libgo/go/sync/atomic/atomic.c
+++ b/libgo/go/sync/atomic/atomic.c
@@ -6,8 +6,10 @@
#include <stdint.h>
+#include "runtime.h"
+
_Bool CompareAndSwapInt32 (int32_t *, int32_t, int32_t)
- asm ("sync_atomic.CompareAndSwapInt32");
+ __asm__ (GOSYM_PREFIX "sync_atomic.CompareAndSwapInt32");
_Bool
CompareAndSwapInt32 (int32_t *val, int32_t old, int32_t new)
@@ -16,7 +18,7 @@ CompareAndSwapInt32 (int32_t *val, int32_t old, int32_t new)
}
_Bool CompareAndSwapInt64 (int64_t *, int64_t, int64_t)
- asm ("sync_atomic.CompareAndSwapInt64");
+ __asm__ (GOSYM_PREFIX "sync_atomic.CompareAndSwapInt64");
_Bool
CompareAndSwapInt64 (int64_t *val, int64_t old, int64_t new)
@@ -25,7 +27,7 @@ CompareAndSwapInt64 (int64_t *val, int64_t old, int64_t new)
}
_Bool CompareAndSwapUint32 (uint32_t *, uint32_t, uint32_t)
- asm ("sync_atomic.CompareAndSwapUint32");
+ __asm__ (GOSYM_PREFIX "sync_atomic.CompareAndSwapUint32");
_Bool
CompareAndSwapUint32 (uint32_t *val, uint32_t old, uint32_t new)
@@ -34,7 +36,7 @@ CompareAndSwapUint32 (uint32_t *val, uint32_t old, uint32_t new)
}
_Bool CompareAndSwapUint64 (uint64_t *, uint64_t, uint64_t)
- asm ("sync_atomic.CompareAndSwapUint64");
+ __asm__ (GOSYM_PREFIX "sync_atomic.CompareAndSwapUint64");
_Bool
CompareAndSwapUint64 (uint64_t *val, uint64_t old, uint64_t new)
@@ -43,7 +45,7 @@ CompareAndSwapUint64 (uint64_t *val, uint64_t old, uint64_t new)
}
_Bool CompareAndSwapUintptr (uintptr_t *, uintptr_t, uintptr_t)
- asm ("sync_atomic.CompareAndSwapUintptr");
+ __asm__ (GOSYM_PREFIX "sync_atomic.CompareAndSwapUintptr");
_Bool
CompareAndSwapUintptr (uintptr_t *val, uintptr_t old, uintptr_t new)
@@ -52,7 +54,7 @@ CompareAndSwapUintptr (uintptr_t *val, uintptr_t old, uintptr_t new)
}
_Bool CompareAndSwapPointer (void **, void *, void *)
- asm ("sync_atomic.CompareAndSwapPointer");
+ __asm__ (GOSYM_PREFIX "sync_atomic.CompareAndSwapPointer");
_Bool
CompareAndSwapPointer (void **val, void *old, void *new)
@@ -61,7 +63,7 @@ CompareAndSwapPointer (void **val, void *old, void *new)
}
int32_t AddInt32 (int32_t *, int32_t)
- asm ("sync_atomic.AddInt32");
+ __asm__ (GOSYM_PREFIX "sync_atomic.AddInt32");
int32_t
AddInt32 (int32_t *val, int32_t delta)
@@ -70,7 +72,7 @@ AddInt32 (int32_t *val, int32_t delta)
}
uint32_t AddUint32 (uint32_t *, uint32_t)
- asm ("sync_atomic.AddUint32");
+ __asm__ (GOSYM_PREFIX "sync_atomic.AddUint32");
uint32_t
AddUint32 (uint32_t *val, uint32_t delta)
@@ -79,7 +81,7 @@ AddUint32 (uint32_t *val, uint32_t delta)
}
int64_t AddInt64 (int64_t *, int64_t)
- asm ("sync_atomic.AddInt64");
+ __asm__ (GOSYM_PREFIX "sync_atomic.AddInt64");
int64_t
AddInt64 (int64_t *val, int64_t delta)
@@ -88,7 +90,7 @@ AddInt64 (int64_t *val, int64_t delta)
}
uint64_t AddUint64 (uint64_t *, uint64_t)
- asm ("sync_atomic.AddUint64");
+ __asm__ (GOSYM_PREFIX "sync_atomic.AddUint64");
uint64_t
AddUint64 (uint64_t *val, uint64_t delta)
@@ -97,7 +99,7 @@ AddUint64 (uint64_t *val, uint64_t delta)
}
uintptr_t AddUintptr (uintptr_t *, uintptr_t)
- asm ("sync_atomic.AddUintptr");
+ __asm__ (GOSYM_PREFIX "sync_atomic.AddUintptr");
uintptr_t
AddUintptr (uintptr_t *val, uintptr_t delta)
@@ -106,7 +108,7 @@ AddUintptr (uintptr_t *val, uintptr_t delta)
}
int32_t LoadInt32 (int32_t *addr)
- asm ("sync_atomic.LoadInt32");
+ __asm__ (GOSYM_PREFIX "sync_atomic.LoadInt32");
int32_t
LoadInt32 (int32_t *addr)
@@ -120,7 +122,7 @@ LoadInt32 (int32_t *addr)
}
int64_t LoadInt64 (int64_t *addr)
- asm ("sync_atomic.LoadInt64");
+ __asm__ (GOSYM_PREFIX "sync_atomic.LoadInt64");
int64_t
LoadInt64 (int64_t *addr)
@@ -134,7 +136,7 @@ LoadInt64 (int64_t *addr)
}
uint32_t LoadUint32 (uint32_t *addr)
- asm ("sync_atomic.LoadUint32");
+ __asm__ (GOSYM_PREFIX "sync_atomic.LoadUint32");
uint32_t
LoadUint32 (uint32_t *addr)
@@ -148,7 +150,7 @@ LoadUint32 (uint32_t *addr)
}
uint64_t LoadUint64 (uint64_t *addr)
- asm ("sync_atomic.LoadUint64");
+ __asm__ (GOSYM_PREFIX "sync_atomic.LoadUint64");
uint64_t
LoadUint64 (uint64_t *addr)
@@ -162,7 +164,7 @@ LoadUint64 (uint64_t *addr)
}
uintptr_t LoadUintptr (uintptr_t *addr)
- asm ("sync_atomic.LoadUintptr");
+ __asm__ (GOSYM_PREFIX "sync_atomic.LoadUintptr");
uintptr_t
LoadUintptr (uintptr_t *addr)
@@ -176,7 +178,7 @@ LoadUintptr (uintptr_t *addr)
}
void *LoadPointer (void **addr)
- asm ("sync_atomic.LoadPointer");
+ __asm__ (GOSYM_PREFIX "sync_atomic.LoadPointer");
void *
LoadPointer (void **addr)
@@ -190,7 +192,7 @@ LoadPointer (void **addr)
}
void StoreInt32 (int32_t *addr, int32_t val)
- asm ("sync_atomic.StoreInt32");
+ __asm__ (GOSYM_PREFIX "sync_atomic.StoreInt32");
void
StoreInt32 (int32_t *addr, int32_t val)
@@ -203,7 +205,7 @@ StoreInt32 (int32_t *addr, int32_t val)
}
void StoreInt64 (int64_t *addr, int64_t val)
- asm ("sync_atomic.StoreInt64");
+ __asm__ (GOSYM_PREFIX "sync_atomic.StoreInt64");
void
StoreInt64 (int64_t *addr, int64_t val)
@@ -216,7 +218,7 @@ StoreInt64 (int64_t *addr, int64_t val)
}
void StoreUint32 (uint32_t *addr, uint32_t val)
- asm ("sync_atomic.StoreUint32");
+ __asm__ (GOSYM_PREFIX "sync_atomic.StoreUint32");
void
StoreUint32 (uint32_t *addr, uint32_t val)
@@ -229,7 +231,7 @@ StoreUint32 (uint32_t *addr, uint32_t val)
}
void StoreUint64 (uint64_t *addr, uint64_t val)
- asm ("sync_atomic.StoreUint64");
+ __asm__ (GOSYM_PREFIX "sync_atomic.StoreUint64");
void
StoreUint64 (uint64_t *addr, uint64_t val)
@@ -242,7 +244,7 @@ StoreUint64 (uint64_t *addr, uint64_t val)
}
void StoreUintptr (uintptr_t *addr, uintptr_t val)
- asm ("sync_atomic.StoreUintptr");
+ __asm__ (GOSYM_PREFIX "sync_atomic.StoreUintptr");
void
StoreUintptr (uintptr_t *addr, uintptr_t val)
@@ -255,7 +257,7 @@ StoreUintptr (uintptr_t *addr, uintptr_t val)
}
void StorePointer (void **addr, void *val)
- asm ("sync_atomic.StorePointer");
+ __asm__ (GOSYM_PREFIX "sync_atomic.StorePointer");
void
StorePointer (void **addr, void *val)
diff --git a/libgo/go/sync/cas.c b/libgo/go/sync/cas.c
index ffcd133cb3a..7571c64ddc4 100644
--- a/libgo/go/sync/cas.c
+++ b/libgo/go/sync/cas.c
@@ -6,7 +6,9 @@
#include <stdint.h>
-_Bool cas (int32_t *, int32_t, int32_t) asm ("libgo_sync.sync.cas");
+#include "runtime.h"
+
+_Bool cas (int32_t *, int32_t, int32_t) __asm__ (GOSYM_PREFIX "libgo_sync.sync.cas");
_Bool
cas (int32_t *ptr, int32_t old, int32_t new)
diff --git a/libgo/go/syscall/errno.c b/libgo/go/syscall/errno.c
index d01f4c973d7..5cdc7730445 100644
--- a/libgo/go/syscall/errno.c
+++ b/libgo/go/syscall/errno.c
@@ -3,15 +3,16 @@
Copyright 2010 The Go Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file. */
-
#include <errno.h>
#include <stdint.h>
+#include "runtime.h"
+
/* errno is typically a macro. These functions set
and get errno specific to the libc being used. */
-uintptr_t GetErrno() asm ("syscall.GetErrno");
-void SetErrno(uintptr_t) asm ("syscall.SetErrno");
+uintptr_t GetErrno() __asm__ (GOSYM_PREFIX "syscall.GetErrno");
+void SetErrno(uintptr_t) __asm__ (GOSYM_PREFIX "syscall.SetErrno");
uintptr_t
GetErrno()
diff --git a/libgo/go/syscall/signame.c b/libgo/go/syscall/signame.c
index c2d3b9fac70..6f5c2972bab 100644
--- a/libgo/go/syscall/signame.c
+++ b/libgo/go/syscall/signame.c
@@ -10,7 +10,7 @@
#include "arch.h"
#include "malloc.h"
-String Signame (intgo sig) asm ("syscall.Signame");
+String Signame (intgo sig) __asm__ (GOSYM_PREFIX "syscall.Signame");
String
Signame (intgo sig)
diff --git a/libgo/go/syscall/wait.c b/libgo/go/syscall/wait.c
index 98ad245c2c4..8c3b53fa456 100644
--- a/libgo/go/syscall/wait.c
+++ b/libgo/go/syscall/wait.c
@@ -10,8 +10,10 @@
#include <stdint.h>
#include <sys/wait.h>
+#include "runtime.h"
+
extern _Bool Exited (uint32_t *w)
- __asm__ ("syscall.Exited.N18_syscall.WaitStatus");
+ __asm__ (GOSYM_PREFIX "syscall.Exited.N18_syscall.WaitStatus");
_Bool
Exited (uint32_t *w)
@@ -20,7 +22,7 @@ Exited (uint32_t *w)
}
extern _Bool Signaled (uint32_t *w)
- __asm__ ("syscall.Signaled.N18_syscall.WaitStatus");
+ __asm__ (GOSYM_PREFIX "syscall.Signaled.N18_syscall.WaitStatus");
_Bool
Signaled (uint32_t *w)
@@ -29,7 +31,7 @@ Signaled (uint32_t *w)
}
extern _Bool Stopped (uint32_t *w)
- __asm__ ("syscall.Stopped.N18_syscall.WaitStatus");
+ __asm__ (GOSYM_PREFIX "syscall.Stopped.N18_syscall.WaitStatus");
_Bool
Stopped (uint32_t *w)
@@ -38,7 +40,7 @@ Stopped (uint32_t *w)
}
extern _Bool Continued (uint32_t *w)
- __asm__ ("syscall.Continued.N18_syscall.WaitStatus");
+ __asm__ (GOSYM_PREFIX "syscall.Continued.N18_syscall.WaitStatus");
_Bool
Continued (uint32_t *w)
@@ -47,7 +49,7 @@ Continued (uint32_t *w)
}
extern _Bool CoreDump (uint32_t *w)
- __asm__ ("syscall.CoreDump.N18_syscall.WaitStatus");
+ __asm__ (GOSYM_PREFIX "syscall.CoreDump.N18_syscall.WaitStatus");
_Bool
CoreDump (uint32_t *w)
@@ -56,7 +58,7 @@ CoreDump (uint32_t *w)
}
extern int ExitStatus (uint32_t *w)
- __asm__ ("syscall.ExitStatus.N18_syscall.WaitStatus");
+ __asm__ (GOSYM_PREFIX "syscall.ExitStatus.N18_syscall.WaitStatus");
int
ExitStatus (uint32_t *w)
@@ -67,7 +69,7 @@ ExitStatus (uint32_t *w)
}
extern int Signal (uint32_t *w)
- __asm__ ("syscall.Signal.N18_syscall.WaitStatus");
+ __asm__ (GOSYM_PREFIX "syscall.Signal.N18_syscall.WaitStatus");
int
Signal (uint32_t *w)
@@ -78,7 +80,7 @@ Signal (uint32_t *w)
}
extern int StopSignal (uint32_t *w)
- __asm__ ("syscall.StopSignal.N18_syscall.WaitStatus");
+ __asm__ (GOSYM_PREFIX "syscall.StopSignal.N18_syscall.WaitStatus");
int
StopSignal (uint32_t *w)
@@ -89,7 +91,7 @@ StopSignal (uint32_t *w)
}
extern int TrapCause (uint32_t *w)
- __asm__ ("syscall.TrapCause.N18_syscall.WaitStatus");
+ __asm__ (GOSYM_PREFIX "syscall.TrapCause.N18_syscall.WaitStatus");
int
TrapCause (uint32_t *w __attribute__ ((unused)))
OpenPOWER on IntegriCloud