-
Notifications
You must be signed in to change notification settings - Fork 89
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
Allow user to use a Mem with a nil Base #403
Comments
Line 189 in 3bfcefe
// IsMSize returns true if op is a memory operand using general-purpose address
// registers of the given size in bytes.
func IsMSize(op Op, n uint) bool {
// TODO(mbm): should memory operands have a size attribute as well?
// TODO(mbm): m8,m16,m32,m64 checks do not actually check size
m, ok := op.(Mem)
return ok && IsMReg(m.Base) && (m.Index == nil || IsMReg(m.Index))
} I think it is not very hard to implement this feature. |
A PR would make the change easy to add. Meanwhile I wouldn't expect |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's very useful for users who want to leverage LEAQ to speed up some integer computations.
For example:
is much efficiency than:
The text was updated successfully, but these errors were encountered: