first encoding pass should estimate/determine instruction size #14

Closed
opened 2025-04-15 13:52:28 +00:00 by omicron · 0 comments
Owner

The size of label references is impossible to determine right now. The first pass of the encoder should collect data to estimate or determine the minimum size of a label reference.

I suspect most instructions can be sized exactly, except for the ones that use labels. For instructions that use labels we can still determine a maximum size. This gives us the ability to determine distance between instructions and allows us to pick a pretty accurate size for labels.

Alternatively, we could decide on some conservative average instruction size and just use the number of instructions as an estimation for label distance.

The size of label references is impossible to determine right now. The first pass of the encoder should collect data to estimate or determine the minimum size of a label reference. I suspect most instructions can be sized exactly, except for the ones that use labels. For instructions that use labels we can still determine a maximum size. This gives us the ability to determine distance between instructions and allows us to pick a pretty accurate size for labels. Alternatively, we could decide on some conservative average instruction size and just use the number of instructions as an estimation for label distance.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: omicron/oas#14
No description provided.