Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/arch/x86/x86asm: Inst.MemBytes is 0 for movsb/movsw/movsd/movsq instructions #47626

Open
TACIXAT opened this issue Aug 10, 2021 · 1 comment
Open

Comments

@TACIXAT
Copy link

@TACIXAT TACIXAT commented Aug 10, 2021

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

$ go version
1.15.8 windows/amd64

Does this issue reproduce with the latest release?

Checked on play.golang.org, yes.

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

go env Output
$ go env

What did you do?

package main

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

)

func main() {
	// rep movsw [rdi], [rsi]
	bs := []byte{ 0x66, 0xf3, 0xa5 }
	
	inst, err := x86asm.Decode(bs, 64)
	if err != nil {
		log.Fatal(err)
	}
	
	log.Println(inst.MemBytes)
}

https://play.golang.org/p/PzsK1XpOgWZ

What did you expect to see?

2

What did you see instead?

0

@seankhliao seankhliao changed the title x86asm.Inst.MemBytes is 0 for movsb/movsw/movsd/movsq instructions x/arch/x86/x86asm: Inst.MemBytes is 0 for movsb/movsw/movsd/movsq instructions Aug 12, 2021
@gopherbot gopherbot added this to the Unreleased milestone Aug 12, 2021
@seankhliao
Copy link
Contributor

@seankhliao seankhliao commented Aug 12, 2021

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants