From 9071fc0e22cf194e6e048dff403155cbb0205a1f Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Fri, 20 Nov 2020 18:24:56 +0100 Subject: pkg/ifuzz/ifuzzimpl: move ModeInsns into tests ModeInsns is only used in tests. Move it there. --- pkg/ifuzz/ifuzzimpl/ifuzzimpl.go | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'pkg/ifuzz/ifuzzimpl/ifuzzimpl.go') diff --git a/pkg/ifuzz/ifuzzimpl/ifuzzimpl.go b/pkg/ifuzz/ifuzzimpl/ifuzzimpl.go index 71485172c..3de38ea59 100644 --- a/pkg/ifuzz/ifuzzimpl/ifuzzimpl.go +++ b/pkg/ifuzz/ifuzzimpl/ifuzzimpl.go @@ -64,20 +64,4 @@ const ( TypeLast ) -// ModeInsns returns list of all instructions for the given mode. -func ModeInsns(cfg *Config) []Insn { - insnset := Arches[cfg.Arch] - if cfg.Mode < 0 || cfg.Mode >= ModeLast { - panic("bad mode") - } - insns := insnset.GetInsns(cfg.Mode, TypeUser) - if cfg.Priv { - insns = append(insns, insnset.GetInsns(cfg.Mode, TypePriv)...) - if cfg.Exec { - insns = append(insns, insnset.GetInsns(cfg.Mode, TypeExec)...) - } - } - return insns -} - var SpecialNumbers = [...]uint64{0, 1 << 15, 1 << 16, 1 << 31, 1 << 32, 1 << 47, 1 << 47, 1 << 63} -- cgit mrf-deployment