Mill Computing, Inc. Forums The Mill Tools Compilers ensuring bounds of arrays Reply To: ensuring bounds of arrays

Will_Edwards
Moderator
Post count: 98

We plan to have hardware-checked “bounded” pointers, yes 🙂

Bounded pointers are pointers with special flags in them so the hardware knows to extract bounds as well as offset from the pointer and enforce them.

However, as these bound pointers are still 64-bit, and as the address space is 64-bit, its not possible to encode every combination of bounds and offset into so few bits. Bounded pointers compromise precision for truly humongous arrays.

(Here is a link to an old post on the Mill bounded pointers in comp.arch. The Mill mechanism has been refined somewhat since that post, but it gives the gist.)

On the Mill, which is wider-issue than other architectures, there are likely enough free slots so a compiler can also pipeline exact bounds checks that will likely have no performance penalty in the common case.