Skip to content

Commit 15e5839

Browse files
committed
runtime: teach softfloat interpreter about "add r11, pc, r11"
This is generated during fp code when -shared is active. Change-Id: Ia1092299b9c3b63ff771ca4842158b42c34bd008
1 parent 2c2cbb6 commit 15e5839

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/runtime/softfloat_arm.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,17 @@ execute:
157157
}
158158
return 1
159159
}
160+
if i == 0xe08fb00b {
161+
// add pc to r11
162+
// might be part of a PIC floating point move
163+
// (or might not, but again no harm done).
164+
regs[11] += uint32(uintptr(unsafe.Pointer(pc))) + 8
165+
166+
if fptrace > 0 {
167+
print("*** cpu R[11] += pc ", hex(regs[11]), "\n")
168+
}
169+
return 1
170+
}
160171
if i == 0xe08bb00d {
161172
// add sp to r11.
162173
// might be part of a large stack offset address

0 commit comments

Comments
 (0)