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
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@TACIXAT
Copy link

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 seankhliao added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Aug 12, 2021
@seankhliao
Copy link
Member

cc @cherrymui

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

3 participants