summaryrefslogtreecommitdiffstats
path: root/src/broadcom/cle/v3d_decoder.h
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2018-06-26 15:53:26 -0700
committerEric Anholt <[email protected]>2018-06-27 09:13:48 -0700
commit18b1bb0b63f3e5b726458523bc3eecb688f9d3cb (patch)
tree39f1660e4cc62bd53b08d9516b9815b57a6dc5c2 /src/broadcom/cle/v3d_decoder.h
parente9a77c3e96dab313f3bb85fe271d41f3bade01fa (diff)
v3d: Add pack/unpack/decode support for fields with a "- 1" modifier.
Right now, we name these fields as "field name minus one" so that your C code obviously states what the value should be. However, it's easy enough to handle at the codegen level with another little XML attribute, meaning less C code and easier-to-read values in CLIF dumping and gdb as well. (The actual CLIF format for simulator and FPGA replay takes in pre-minus-one values, so we need it there too).
Diffstat (limited to 'src/broadcom/cle/v3d_decoder.h')
-rw-r--r--src/broadcom/cle/v3d_decoder.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/broadcom/cle/v3d_decoder.h b/src/broadcom/cle/v3d_decoder.h
index 541d877a9a7..cca1d6fa64c 100644
--- a/src/broadcom/cle/v3d_decoder.h
+++ b/src/broadcom/cle/v3d_decoder.h
@@ -125,6 +125,7 @@ struct v3d_field {
char *name;
int start, end;
struct v3d_type type;
+ bool minus_one;
bool has_default;
uint32_t default_value;