From 40af15f28e63709859138f00179dc7bcdfdc834b Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Fri, 4 Sep 2015 14:57:59 +1200 Subject: [PATCH] runtime: teach softfloat interpreter about "add r11, pc, r11" This is generated during fp code when -shared is active. Change-Id: Ia1092299b9c3b63ff771ca4842158b42c34bd008 Reviewed-on: https://go-review.googlesource.com/14286 Reviewed-by: Ian Lance Taylor Reviewed-by: Dave Cheney --- src/runtime/softfloat_arm.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/runtime/softfloat_arm.go b/src/runtime/softfloat_arm.go index c6eba58f1c..202e7bbf86 100644 --- a/src/runtime/softfloat_arm.go +++ b/src/runtime/softfloat_arm.go @@ -157,6 +157,17 @@ execute: } return 1 } + if i == 0xe08fb00b { + // add pc to r11 + // might be part of a PIC floating point move + // (or might not, but again no harm done). + regs[11] += uint32(uintptr(unsafe.Pointer(pc))) + 8 + + if fptrace > 0 { + print("*** cpu R[11] += pc ", hex(regs[11]), "\n") + } + return 1 + } if i == 0xe08bb00d { // add sp to r11. // might be part of a large stack offset address -- 2.48.1