]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/obj/x86: forbid mem args for MOV_DR and MOV_CR
authorquasilyte <quasilyte@gmail.com>
Sat, 14 Apr 2018 09:17:09 +0000 (12:17 +0300)
committerIlya Tocar <ilya.tocar@intel.com>
Tue, 24 Apr 2018 16:09:50 +0000 (16:09 +0000)
commit70c5839fe0e2149d505c0e28c42e133d4bc01503
tree88cb822018f203344020c28271ce9d4f349c4f17
parentcb44c8debb3c3b0157b569bc30367b21e7e3cded
cmd/internal/obj/x86: forbid mem args for MOV_DR and MOV_CR

Memory arguments for debug/control register moves are a
minefield for programmer: not useful, but can lead to errors.

See referenced issue for detailed explanation.

Fixes #24981

Change-Id: I918e81cd4a8b1dfcfc9023cdfc3de45abe29e749
Reviewed-on: https://go-review.googlesource.com/107075
Run-TryBot: Iskander Sharipov <iskander.sharipov@intel.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/cmd/asm/internal/asm/testdata/386enc.s
src/cmd/asm/internal/asm/testdata/amd64enc_extra.s
src/cmd/asm/internal/asm/testdata/amd64error.s
src/cmd/internal/obj/x86/asm6.go