]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.power64] runtime: rename traceback_arm.c to traceback_lr.c
authorShenghou Ma <minux@golang.org>
Tue, 12 Aug 2014 03:32:08 +0000 (23:32 -0400)
committerShenghou Ma <minux@golang.org>
Tue, 12 Aug 2014 03:32:08 +0000 (23:32 -0400)
Also make it more portable by not hardcoding pointer sizes.

LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/127780043

src/pkg/runtime/traceback_lr.c [moved from src/pkg/runtime/traceback_arm.c with 99% similarity]

similarity index 99%
rename from src/pkg/runtime/traceback_arm.c
rename to src/pkg/runtime/traceback_lr.c
index 778d95a28b1659bcd7dc13d905cef75885d1a537..d8fcddf68bde240908440a8be76a2476ffc16005 100644 (file)
@@ -2,6 +2,8 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+// +build arm power64 power64le
+
 #include "runtime.h"
 #include "arch_GOARCH.h"
 #include "malloc.h"
@@ -267,7 +269,7 @@ runtime·gentraceback(uintptr pc0, uintptr sp0, uintptr lr0, G *gp, int32 skip,
                // sighandler saves the lr on stack before faking a call to sigpanic
                if(waspanic) {
                        x = *(uintptr*)frame.sp;
-                       frame.sp += 4;
+                       frame.sp += sizeof(uintptr);
                        frame.fn = f = runtime·findfunc(frame.pc);
                        if(f == nil)
                                frame.pc = x;