Skip to content

Commit 5fc53bd

Browse files
committed
Changed internal functions to return tags over pointers
One neat (if gimmicky) trick, is that each tag has a valid bit in the highest bit position of the 32-bit word. This is used to determine when to stop a fetch operation, but after fetch, the bit is free to use in the driver. This means we can create a typed-union of sorts with error codes and tags, returning both as the return value from a function. Say what you will about this trick, it does have a significant impact on code size. I suspect this is primarily due to the compiler having a hard time optimizing around pointer access.
1 parent 2b35c36 commit 5fc53bd

File tree

2 files changed

+154
-196
lines changed

2 files changed

+154
-196
lines changed

0 commit comments

Comments
 (0)