aboutsummaryrefslogtreecommitdiff
path: root/libgo/runtime/runtime.h
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2016-10-28 22:34:47 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2016-10-28 22:34:47 +0000
commit94f56408db96e2e12f6e1322ed2c1c465df934f6 (patch)
treef5eaac76bc47cc2637e5e30b9ff6c27499fac2d9 /libgo/runtime/runtime.h
parent21f1031d6cc228e2b468338b3dfa4303d54ac207 (diff)
downloadgcc-94f56408db96e2e12f6e1322ed2c1c465df934f6.zip
gcc-94f56408db96e2e12f6e1322ed2c1c465df934f6.tar.gz
gcc-94f56408db96e2e12f6e1322ed2c1c465df934f6.tar.bz2
compiler, runtime: copy slice code from Go 1.7 runtime
Change the compiler handle append as the gc compiler does: call a function to grow the slice, but otherwise assign the new elements directly to the final slice. For the current gccgo memory allocator the slice code has to call runtime_newarray, not mallocgc directly, so that the allocator sets the TypeInfo_Array bit in the type pointer. Rename the static function cnew to runtime_docnew, so that the stack trace ignores it when ignoring runtime functions. This was needed to fix the runtime/pprof tests on 386. Reviewed-on: https://go-review.googlesource.com/32218 From-SVN: r241667
Diffstat (limited to 'libgo/runtime/runtime.h')
-rw-r--r--libgo/runtime/runtime.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/libgo/runtime/runtime.h b/libgo/runtime/runtime.h
index 8be0df4..501f1b4 100644
--- a/libgo/runtime/runtime.h
+++ b/libgo/runtime/runtime.h
@@ -234,7 +234,8 @@ enum
/*
* external data
*/
-extern uintptr runtime_zerobase;
+extern uintptr* runtime_getZerobase(void)
+ __asm__(GOSYM_PREFIX "runtime.getZerobase");
extern G** runtime_allg;
extern uintptr runtime_allglen;
extern G* runtime_lastg;