Skip to content

Commit

Permalink
add fp field for filter out FP tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sequencer committed Oct 18, 2024
1 parent 09e8eab commit 1e56a8e
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions generator/insn.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ import (
type insnFormat string

type Option struct {
VLEN VLEN
XLEN XLEN
Repeat int
VLEN VLEN
XLEN XLEN
Fp bool
Repeat int
}

const minStride = -1 // Must be negative
Expand Down Expand Up @@ -55,6 +56,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"`
Expand Down Expand Up @@ -280,7 +282,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
Expand All @@ -289,6 +302,7 @@ func (i *Insn) genHeader() string {
RVTEST_RV%dUV
`, i.Name, i.Option.XLEN)
}
}

func (i *Insn) genMergedCodeCombinations(splitPerLines int) ([]string, []string) {
Expand Down

0 comments on commit 1e56a8e

Please sign in to comment.