aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/ifuzz/ifuzzimpl
Commit message (Collapse)AuthorAgeFilesLines
* pkg/ifuzz/iset: rename ifuzzimpl to isetDmitry Vyukov2020-11-211-101/+0
| | | | | | | | | ifuzzimpl is too lenghty and too clumsy on my taste (nm/vmimpl worked better b/c it's shorter and used less). I've tried to come up with something shorter and nicer. We could use "insn" as a common name for "instruction" in ifuzz, but it's a commonly used name already so would cause lots of conflicts. "iset" is somewhat descriptive, short and nice.
* pkg/ifuzz/ifuzzimpl: move IsCompatible from x86Dmitry Vyukov2020-11-211-0/+17
| | | | We now can implement IsCompatible portably.
* pkg/ifuzz/x86: deduplicate modeInsns population logicDmitry Vyukov2020-11-211-1/+22
| | | | | It's currently duplicated in x86 and powerpc. Move to ifuzzimpl.
* pkg/ifuzz/ifuzzimpl: simplify Insn interfaceDmitry Vyukov2020-11-211-5/+1
| | | | | We don't need GetMode, GetPriv, IsCompatible in Insn interface. Replace GetName and GetPseudo with single Info method.
* pkg/ifuzz/ifuzzimpl: move ModeInsns into testsDmitry Vyukov2020-11-211-16/+0
| | | | ModeInsns is only used in tests. Move it there.
* pkg/ifuzz: invert ifuzz and ifuzzimplDmitry Vyukov2020-11-211-121/+59
| | | | | | | | | ifuzzimpl imports the public interface package ifuzz and prog package needs to import ifuzzimpl (implementation guts that nobody outside of ifuzz should care about). This is not right. Invert everything so that prog package only needs to import ifuzz and ifuzz imports ifuzzimpl.
* pkg/ifuzz: reorganize files to allow other architecturesAlexey Kardashevskiy2020-11-201-0/+145
At the moment ifuzz only generates x86 instructions. In order to support instruction fuzzing for others (ARM, POWERPC), some separation of the common and arch layers is needed. This adds 2 packages: 1. "x86" where x86 instruction generator goes to 2. "ifuzzimpl which contains some common code. The goal was to keep changes to the rand.go to the minimum. The next patch will use this when adding PPC64. This should cause no behavioural change. Signed-off-by: Alexey Kardashevskiy <aik@linux.ibm.com>