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. AUTHORS
  2. CONTRIBUTING.md
  3. CONTRIBUTORS
  4. LICENSE
  5. PATENTS
  6. README.md
  7. arm/
  8. arm64/
  9. codereview.cfg
  10. go.mod
  11. go.sum
  12. ppc64/
  13. x86/
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.