]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/asm: fix assembling return jump
authorCherry Zhang <cherryyz@google.com>
Thu, 15 Feb 2018 00:35:03 +0000 (19:35 -0500)
committerCherry Zhang <cherryyz@google.com>
Thu, 1 Mar 2018 21:11:16 +0000 (21:11 +0000)
commit2baed3856deb9b077cc9b604c8247865bd3adec0
tree3f1781307a691d729d568d5aec218ba2ea96021d
parent213a75171df1c1fb0ae76fe7c8ff877b1fa9c0b9
cmd/asm: fix assembling return jump

In RET instruction, the operand is the return jump's target,
which should be put in Prog.To.

Add an action "buildrundir" to the test driver, which builds
(compile+assemble+link) the code in a directory and runs the
resulting binary.

Fixes #23838.

Change-Id: I7ebe7eda49024b40a69a24857322c5ca9c67babb
Reviewed-on: https://go-review.googlesource.com/94175
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
13 files changed:
src/cmd/asm/internal/asm/asm.go
src/cmd/asm/internal/asm/testdata/386.s
src/cmd/asm/internal/asm/testdata/amd64.s
src/cmd/asm/internal/asm/testdata/arm.s
src/cmd/asm/internal/asm/testdata/arm64.s
src/cmd/asm/internal/asm/testdata/mips.s
src/cmd/asm/internal/asm/testdata/mips64.s
src/cmd/asm/internal/asm/testdata/ppc64.s
src/cmd/asm/internal/asm/testdata/s390x.s
test/retjmp.dir/a.s [new file with mode: 0644]
test/retjmp.dir/main.go [new file with mode: 0644]
test/retjmp.go [new file with mode: 0644]
test/run.go