From 6c1496ae75762575108ba042f555f009d3777046 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Fri, 20 Nov 2020 19:35:24 +0100 Subject: pkg/ifuzz/iset: make Mode and Type unsigned Presumably with older Go versions we are getting: pkg/ifuzz/x86/decode.go:100:19: invalid operation: 1 << mode (shift count type int, must be unsigned integer) Fix that and maybe some future similar errors by making these types unsigned. --- pkg/ifuzz/iset/iset.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pkg') diff --git a/pkg/ifuzz/iset/iset.go b/pkg/ifuzz/iset/iset.go index 46c42537d..d6c3518dc 100644 --- a/pkg/ifuzz/iset/iset.go +++ b/pkg/ifuzz/iset/iset.go @@ -16,8 +16,8 @@ const ( var Arches = make(map[string]InsnSet) type ( - Mode int - Type int + Mode uint + Type uint ) type Insn interface { @@ -86,7 +86,7 @@ func (modeInsns *ModeInsns) Add(insn Insn) { func (cfg *Config) IsCompatible(insn Insn) bool { _, mode, pseudo, priv := insn.Info() - if cfg.Mode < 0 || cfg.Mode >= ModeLast { + if cfg.Mode >= ModeLast { panic("bad mode") } if priv && !cfg.Priv { -- cgit mrf-deployment