]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: teach softfloat interpreter about "add r11, pc, r11"
authorMichael Hudson-Doyle <michael.hudson@canonical.com>
Fri, 4 Sep 2015 02:57:59 +0000 (14:57 +1200)
committerMichael Hudson-Doyle <michael.hudson@canonical.com>
Fri, 4 Sep 2015 06:43:35 +0000 (06:43 +0000)
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 <iant@golang.org>
Reviewed-by: Dave Cheney <dave@cheney.net>
src/runtime/softfloat_arm.go

index c6eba58f1cfdf5d2f8819c9d316e7ba6668da2d1..202e7bbf862bac6bdaabd1e492aae96c2383fa0b 100644 (file)
@@ -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