You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// IsMSize returns true if op is a memory operand using general-purpose address// registers of the given size in bytes.funcIsMSize(opOp, nuint) bool {
// TODO(mbm): should memory operands have a size attribute as well?// TODO(mbm): m8,m16,m32,m64 checks do not actually check sizem, ok:=op.(Mem)
returnok&&IsMReg(m.Base) && (m.Index==nil||IsMReg(m.Index))
}
I think it is not very hard to implement this feature.
Meanwhile I wouldn't expect XORQ(tmp, tmp) to be a huge overhead and use that as base. For most CPUs zeroing a register is basically ignored, since they just use a virtual zero register.
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: