aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/vlop_arm.s
diff options
context:
space:
mode:
authorCherry Zhang <cherryyz@google.com>2018-02-09 12:47:33 -0500
committerCherry Zhang <cherryyz@google.com>2018-02-14 17:09:15 +0000
commit5a43a271e8cc589e077b4e056298d3711e233cd3 (patch)
tree733564dad60c29db850dc96691836da21fad14f4 /src/runtime/vlop_arm.s
parent633b38c5d2bd66e0a4688d80f13ccd3c0837948d (diff)
downloadgo-5a43a271e8cc589e077b4e056298d3711e233cd3.tar.gz
go-5a43a271e8cc589e077b4e056298d3711e233cd3.zip
cmd/compile: CALLudiv on nacl/arm doesn't clobber R12
On nacl/arm, R12 is clobbered by the RET instruction in function that has a frame. runtime.udiv doesn't have a frame, so it does not clobber R12. Change-Id: I0de448749f615908f6659e92d201ba3eb2f8266d Reviewed-on: https://go-review.googlesource.com/93116 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com>
Diffstat (limited to 'src/runtime/vlop_arm.s')
-rw-r--r--src/runtime/vlop_arm.s3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/runtime/vlop_arm.s b/src/runtime/vlop_arm.s
index e7e8ed2e05..52143b86e7 100644
--- a/src/runtime/vlop_arm.s
+++ b/src/runtime/vlop_arm.s
@@ -102,6 +102,9 @@ TEXT runtime·_sfloatpanic(SB),NOSPLIT|NOFRAME,$0
#define Ra R11
// Be careful: Ra == R11 will be used by the linker for synthesized instructions.
+// Note: this function does not have a frame. If it ever needs a frame,
+// the RET instruction will clobber R12 on nacl, and the compiler's register
+// allocator needs to know.
TEXT runtime·udiv(SB),NOSPLIT|NOFRAME,$0
MOVBU runtime·hardDiv(SB), Ra
CMP $0, Ra