Unverified Commit d93f850c authored by Jason Eckhardt's avatar Jason Eckhardt Committed by GitHub
Browse files

[TableGen] Extend OPC_ExtractField/OPC_CheckField start value widths. (#79723)



Both OPC_ExtractField and OPC_CheckField are currently defined to take
an unsigned 8-bit start value. On some architectures with long
instruction words, this value can silently overflow, resulting in a bad
decoder table.

This patch changes each to take a ULE128B-encoded start value instead.
Additionally, a range assertion is added for the 8-bit length to
prominently notify a user in case that field ever overflows.

This problem isn't currently exposed upstream since all in-tree targets
use small instruction words (i.e., bitwidth <= 64 bits). It does show up
in at least one downstream target with instructions > 64 bits long.

Co-authored-by: default avatarJason Eckhardt <jeckhardt@nvidia.com>
parent a3724605
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment