]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/obj/arm64: fix assemble hlt/hvc/smc/brk/clrex bug
authorfanzha02 <fannie.zhang@arm.com>
Wed, 14 Jun 2017 03:42:36 +0000 (03:42 +0000)
committerCherry Zhang <cherryyz@google.com>
Mon, 20 Nov 2017 14:39:51 +0000 (14:39 +0000)
commit436f2d8d974954ef052f1b71c751df713704ab00
tree6cad73d6f5ab7bf3897229a1f724447247d9915d
parent337f04bd6c2b049a68eabd9dcec4f47cd6933d94
cmd/internal/obj/arm64: fix assemble hlt/hvc/smc/brk/clrex bug

When instruction has only one argument, Go parser saves the
argument value into prog.From without any special handling.
But assembler gets the argument value from prog.To.

The fix adds special handling for CLREX and puts other instructions
arguments value into prog.From.

Uncomment hlt/hvc/smc/brk/dcps1/dcps2/dcps3/clrex test cases.

Fixes #20765

Change-Id: I1fc0d2faafb19b537cab5a665bd4af56c3a2c925
Reviewed-on: https://go-review.googlesource.com/78275
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/cmd/asm/internal/asm/testdata/arm64enc.s
src/cmd/internal/obj/arm64/asm7.go
src/cmd/internal/obj/arm64/obj7.go