Skip to content

Limit bitset payloads in quantifier instruction - #873

Open
natecook1000 wants to merge 2 commits into
mainfrom
fix/quantifier-payload-overflow
Open

Limit bitset payloads in quantifier instruction#873
natecook1000 wants to merge 2 commits into
mainfrom
fix/quantifier-payload-overflow

Conversation

@natecook1000

Copy link
Copy Markdown
Member

Quantifier instructions can directly include a bitset register address, but the register address space can overflow the allotted 16 bits for that payload in the quantifier instruction. This change caps the register address size when storing a bitset in a register, failing out of the optimized quantifier instruction when the value would overflow.

rdar://185730811

Instructions always store an 8-bit opcode in their high byte, with
the 56 low bits for their payload. The current method of storing two
values in the payload limits each value to 16 bits, which is less than
what is required for some (unreasonable but) allowed patterns. This
change increases the limit of each value to 24 bits.
Quantifier instructions can directly include a bitset register
address, but the register address space can overflow the allotted
16 bits for that payload in the quantifier instruction. This change
caps the register address size when storing a bitset in a register,
failing out of the optimized quantifier instruction when the value
would overflow.

rdar://185730811
@natecook1000

Copy link
Copy Markdown
Member Author

@swift-ci Please test Linux platform

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant