diff --git a/generator/insn.go b/generator/insn.go index c2ef8c8..5daf2d7 100644 --- a/generator/insn.go +++ b/generator/insn.go @@ -18,6 +18,7 @@ type insnFormat string type Option struct { VLEN VLEN XLEN XLEN + Fp bool Repeat int Float16 bool } @@ -56,6 +57,7 @@ func (t *TestData) String() string { type Insn struct { Name string `toml:"name"` Format insnFormat `toml:"format"` + Fp bool `toml:"fp"` NoTestfloat3 bool `toml:"notestfloat3"` Vxrm bool `toml:"vxrm"` Vxsat bool `toml:"vxsat"` @@ -287,7 +289,18 @@ func (i *Insn) Generate(splitPerLines int) []string { } func (i *Insn) genHeader() string { - return fmt.Sprintf(`# + if i.Option.Fp { + return fmt.Sprintf(`# +# This file is automatically generated. Do not edit. +# Instruction: %s + +#include "riscv_test.h" +#include "test_macros.h" + +RVTEST_RV%dUFV +`, i.Name, i.Option.XLEN) + } else { + return fmt.Sprintf(`# # This file is automatically generated. Do not edit. # Instruction: %s @@ -296,6 +309,7 @@ func (i *Insn) genHeader() string { RVTEST_RV%dUV `, i.Name, i.Option.XLEN) + } } func (i *Insn) genMergedCodeCombinations(splitPerLines int) ([]string, []string) {