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

cmd/compile: SETcc could directly write to memory on 386/amd64 #21630

rasky opened this issue Aug 25, 2017 · 1 comment


None yet
3 participants
Copy link

commented Aug 25, 2017

package main

type Foo struct {
	a bool

var f Foo
var x int = 2

func main() {
	f.a = x <= 4

Code generated for main:

	main.go:11	0x104bfe4	4883f804		CMPQ $0x4, AX
	main.go:11	0x104bfe8	0f9ec0			SETLE AL
	main.go:11	0x104bfeb	8844240f		MOVB AL, 0xf(SP)

should be:

	CMPQ $0x4, AX
	SETLE 0xf(SP)

more compact, and saves one register.

@randall77 randall77 added this to the Go1.10 milestone Aug 28, 2017


This comment has been minimized.

Copy link

commented Oct 3, 2017

Change mentions this issue: cmd/compile/internal/amd64: add SETccmem

@gopherbot gopherbot closed this in 6b8a3c8 Oct 5, 2017

@golang golang locked and limited conversation to collaborators Oct 5, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.