diff options
| author | Keith Randall <khr@golang.org> | 2013-07-19 11:19:18 -0700 |
|---|---|---|
| committer | Keith Randall <khr@golang.org> | 2013-07-19 11:19:18 -0700 |
| commit | 6fc49c18540938cd4699c1eb8cb05bd00ff9f59c (patch) | |
| tree | db7220ee8c655facf9f9492e4d75137d4eb3b81b /src/pkg/runtime | |
| parent | eb04df75cd87722f396fb66583279afe5abfb1ca (diff) | |
| download | go-6fc49c18540938cd4699c1eb8cb05bd00ff9f59c.tar.xz | |
runtime: cleanup: use ArgsSizeUnknown to mark all functions
whose argument size is unknown (C vararg functions, and
assembly code without an explicit specification).
We used to use 0 to mean "unknown" and 1 to mean "zero".
Now we use ArgsSizeUnknown (0x80000000) to mean "unknown".
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/11590043
Diffstat (limited to 'src/pkg/runtime')
| -rw-r--r-- | src/pkg/runtime/funcdata.h | 6 | ||||
| -rw-r--r-- | src/pkg/runtime/runtime.h | 6 | ||||
| -rw-r--r-- | src/pkg/runtime/traceback_arm.c | 1 | ||||
| -rw-r--r-- | src/pkg/runtime/traceback_x86.c | 1 |
4 files changed, 8 insertions, 6 deletions
diff --git a/src/pkg/runtime/funcdata.h b/src/pkg/runtime/funcdata.h index 8fcadcb611..850288bf64 100644 --- a/src/pkg/runtime/funcdata.h +++ b/src/pkg/runtime/funcdata.h @@ -11,3 +11,9 @@ // To be used in assembly. #define ARGSIZE(n) PCDATA $PCDATA_ArgSize, $n + +// ArgsSizeUnknown is set in Func.argsize to mark all functions +// whose argument size is unknown (C vararg functions, and +// assembly code without an explicit specification). +// This value is generated by the compiler, assembler, or linker. +#define ArgsSizeUnknown 0x80000000 diff --git a/src/pkg/runtime/runtime.h b/src/pkg/runtime/runtime.h index 3a11f88954..811ec76653 100644 --- a/src/pkg/runtime/runtime.h +++ b/src/pkg/runtime/runtime.h @@ -148,12 +148,6 @@ enum // Global <-> per-M stack segment cache transfer batch size. StackCacheBatch = 16, }; -enum -{ - // This value is generated by the linker and should be kept in - // sync with cmd/ld/lib.h - ArgsSizeUnknown = 0x80000000, -}; /* * structures */ diff --git a/src/pkg/runtime/traceback_arm.c b/src/pkg/runtime/traceback_arm.c index 73ae2225bb..5aea699e34 100644 --- a/src/pkg/runtime/traceback_arm.c +++ b/src/pkg/runtime/traceback_arm.c @@ -5,6 +5,7 @@ #include "runtime.h" #include "arch_GOARCH.h" #include "malloc.h" +#include "funcdata.h" void runtime·sigpanic(void); diff --git a/src/pkg/runtime/traceback_x86.c b/src/pkg/runtime/traceback_x86.c index 10f69c47ec..3153103d34 100644 --- a/src/pkg/runtime/traceback_x86.c +++ b/src/pkg/runtime/traceback_x86.c @@ -7,6 +7,7 @@ #include "runtime.h" #include "arch_GOARCH.h" #include "malloc.h" +#include "funcdata.h" void runtime·deferproc(void); void runtime·newproc(void); |
