4 ms·
In one of their talks they show what strcpy would look like on the Mill: https://youtu.be/DZ8HN9Cnjhc?t=3416 https://youtu.be/DZ8HN9Cnjhc?t=3416
by nightcracker 10y ago
In one of their talks they show what strcpy would look like on the Mill: https://youtu.be/DZ8HN9Cnjhc?t=3416 https://youtu.be/DZ8HN9Cnjhc?t=3416
- unwind 10y agoAh, always with the lectures. :) So, the code for strcpy() on the Mill seems to be: load *src, bv eql <load>, 0 smearx <eql> pick <smearx0>,None,<load> store *dest, <pick> brfl smearx1, loop This "vectorizes" a plain while-loop by loading as "byte vector". The size of the vector depends on the exact Mill family member implementation's choices, but is at least 8 according to the lecture. The lack of actual register names is of course a loud signal that the Mill is different. Pretty cool, and I feel like I learned something. Thanks!
- nightcracker 10y agoI refrained from posting the direct assembly, as without the talk the smearx and pick would be meaningless. If you also look a bit further into the talk they show the 'remaining' instruction, which allows you to do this same thing with fixed-count loops.