x86asm: fix ud1 encoding, add ud0

An internal test fails due to processing an instruction stream with ud1 instructions, and because the arguments aren't properly accounted for, the instruction stream gets lost and eventually fails to decode later instructions due to being at the wrong offsets.

According to the latest intel x86 manual, ud1 takes operands "r32, r/m32", and so we need to specify that so the full instruction gets decoded. There is also a ud0 instruction with a similar encoding to ud1.

Change-Id: Id84bd9a0206bfef9832e63a4cabe8b5db3bf6fee
Reviewed-on: https://go-review.googlesource.com/c/arch/+/282752
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Ian Lance Taylor <iant@golang.org>
3 files changed
tree: ff92702920457fb2e9e80eb4cb6f4d79617ada1f
  1. arm/
  2. arm64/
  3. ppc64/
  4. x86/
  5. AUTHORS
  6. codereview.cfg
  7. CONTRIBUTING.md
  8. CONTRIBUTORS
  9. go.mod
  10. go.sum
  11. LICENSE
  12. PATENTS
  13. README.md
README.md

arch

Go Reference

This repository holds machine architecture information used by the Go toolchain. The parts needed in the main Go repository are copied in.

Report Issues / Send Patches

This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://golang.org/doc/contribute.html.

The main issue tracker for the arch repository is located at https://github.com/golang/go/issues. Prefix your issue with “x/arch:” in the subject line, so it is easy to find.