add reg.Type

This commit is contained in:
Michael McLoughlin
2018-12-02 15:15:00 -08:00
parent bc7d0fa410
commit f18271ada5
3 changed files with 20 additions and 8 deletions

View File

@@ -115,7 +115,7 @@ func IsYmm(op Op) bool {
// IsRegisterKindSize returns true if op is a register of the given kind and size in bytes.
func IsRegisterKindSize(op Op, k reg.Kind, n uint) bool {
r, ok := op.(reg.Register)
r, ok := op.(reg.Type)
return ok && r.Kind() == k && r.Bytes() == n
}