On Wed, Jun 15, 2016 at 2:37 PM, Richard Henderson via iovisor-dev
<[email protected]> wrote:
> Avoid duplicating lots of field definitions.
>
> Signed-off-by: Richard Henderson <[email protected]>
> ---
> lib/Target/BPF/BPFInstrFormats.td | 45 +++-
> lib/Target/BPF/BPFInstrInfo.td | 536
> +++++++++++++++-----------------------
> 2 files changed, 247 insertions(+), 334 deletions(-)
>
> diff --git a/lib/Target/BPF/BPFInstrFormats.td
> b/lib/Target/BPF/BPFInstrFormats.td
> index 53f3ad6..79479e6 100644
> --- a/lib/Target/BPF/BPFInstrFormats.td
> +++ b/lib/Target/BPF/BPFInstrFormats.td
> @@ -8,7 +8,8 @@
>
> //===----------------------------------------------------------------------===//
>
> class InstBPF<dag outs, dag ins, string asmstr, list<dag> pattern>
> - : Instruction {
> + : Instruction
> +{
please keep original llvm coding style.
> // Pseudo instructions
> class Pseudo<dag outs, dag ins, string asmstr, list<dag> pattern>
> - : InstBPF<outs, ins, asmstr, pattern> {
> + : InstBPF<outs, ins, asmstr, pattern>
> +{
same here
> let Inst{63-0} = 0;
> let isPseudo = 1;
> }
> +
> +class F_CMS<bits<3> cls, bits<3> mode, bits<2> sz,
...
> +class F_COF<bits<3> cls, bits<4> op, bits<1> srcf,
what F_CMS and F_COF abbreviations mean?
overall removal of duplicated code is very nice.
_______________________________________________
iovisor-dev mailing list
[email protected]
https://lists.iovisor.org/mailman/listinfo/iovisor-dev