diff options
Diffstat (limited to 'libgo/runtime/go-unsafe-pointer.c')
-rw-r--r-- | libgo/runtime/go-unsafe-pointer.c | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/libgo/runtime/go-unsafe-pointer.c b/libgo/runtime/go-unsafe-pointer.c index 3a97ee1..9df7f3a 100644 --- a/libgo/runtime/go-unsafe-pointer.c +++ b/libgo/runtime/go-unsafe-pointer.c @@ -8,7 +8,6 @@ #include "runtime.h" #include "go-type.h" -#include "mgc0.h" /* This file provides the type descriptor for the unsafe.Pointer type. The unsafe package is defined by the compiler itself, which means @@ -18,7 +17,7 @@ extern const struct __go_type_descriptor unsafe_Pointer __asm__ (GOSYM_PREFIX "__go_tdn_unsafe.Pointer"); -extern const uintptr unsafe_Pointer_gc[] +extern const byte unsafe_Pointer_gc[] __asm__ (GOSYM_PREFIX "__go_tdn_unsafe.Pointer$gc"); /* Used to determine the field alignment. */ @@ -36,8 +35,7 @@ static const String reflection_string = sizeof REFLECTION - 1 }; -const uintptr unsafe_Pointer_gc[] __attribute__((aligned(4))) = - {sizeof(void*), GC_APTR, 0, GC_END}; +const byte unsafe_Pointer_gc[] = { 1 }; extern const FuncVal runtime_pointerhash_descriptor __asm__ (GOSYM_PREFIX "runtime.pointerhash$descriptor"); @@ -46,21 +44,23 @@ extern const FuncVal runtime_pointerequal_descriptor const struct __go_type_descriptor unsafe_Pointer = { + /* __size */ + sizeof (void *), + /* __ptrdata */ + sizeof (void *), + /* __hash */ + 78501163U, /* __code */ GO_UNSAFE_POINTER | GO_DIRECT_IFACE, /* __align */ __alignof (void *), /* __field_align */ offsetof (struct field_align, p) - 1, - /* __size */ - sizeof (void *), - /* __hash */ - 78501163U, /* __hashfn */ &runtime_pointerhash_descriptor, /* __equalfn */ &runtime_pointerequal_descriptor, - /* __gc */ + /* __gcdata */ unsafe_Pointer_gc, /* __reflection */ &reflection_string, @@ -85,31 +85,32 @@ static const String preflection_string = sizeof PREFLECTION - 1, }; -extern const uintptr pointer_unsafe_Pointer_gc[] +extern const byte pointer_unsafe_Pointer_gc[] __asm__ (GOSYM_PREFIX "__go_td_pN14_unsafe.Pointer$gc"); -const uintptr pointer_unsafe_Pointer_gc[] __attribute__((aligned(4))) = - {sizeof(void*), GC_APTR, 0, GC_END}; +const byte pointer_unsafe_Pointer_gc[] = { 1 }; const struct __go_ptr_type pointer_unsafe_Pointer = { /* __common */ { + /* __size */ + sizeof (void *), + /* __ptrdata */ + sizeof (void *), + /* __hash */ + 1256018616U, /* __code */ GO_PTR | GO_DIRECT_IFACE, /* __align */ __alignof (void *), /* __field_align */ offsetof (struct field_align, p) - 1, - /* __size */ - sizeof (void *), - /* __hash */ - 1256018616U, /* __hashfn */ &runtime_pointerhash_descriptor, /* __equalfn */ &runtime_pointerequal_descriptor, - /* __gc */ + /* __gcdata */ pointer_unsafe_Pointer_gc, /* __reflection */ &preflection_string, |