Skip to content

x/arch/x86/x86asm: endbr64 does not disassemble #46196

@TACIXAT

Description

@TACIXAT

What version of Go are you using (go version)?

$ go version
go version go1.15.8 windows/amd64

Does this issue reproduce with the latest release?

Didn't check.

What operating system and processor architecture are you using (go env)?

windows, amd64

What did you do?

package main

import (
	"golang.org/x/arch/x86/x86asm"
	"log"
)

func main() {
	bs := []byte{0xf3, 0x0f, 0x1e, 0xfa}
	inst, err := x86asm.Decode(bs, 64)
	if err != nil {
		log.Fatal(err)
	}
	log.Println(inst)
	log.Println("len", inst.Len)
}

What did you expect to see?

It should disassemble as endbr64 or repz nop edx. It should have an instruction length of 4.

What did you see instead?

REP Op(0)
len 1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions