diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2020-11-20 18:24:56 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2020-11-21 08:46:20 +0100 |
| commit | 9071fc0e22cf194e6e048dff403155cbb0205a1f (patch) | |
| tree | ff0f3eda72167f09c89750417b761f24e53ed143 /pkg/ifuzz/ifuzzimpl | |
| parent | 5405d2e2ed019de7452677eacfc7de9562a8ea12 (diff) | |
pkg/ifuzz/ifuzzimpl: move ModeInsns into tests
ModeInsns is only used in tests. Move it there.
Diffstat (limited to 'pkg/ifuzz/ifuzzimpl')
| -rw-r--r-- | pkg/ifuzz/ifuzzimpl/ifuzzimpl.go | 16 |
1 files changed, 0 insertions, 16 deletions
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} |
