Re:Mill Computing in 2017
by nightcracker on Thursday January 12, 2017 @11:03AM
(#13383277)
In one of their talks they show what strcpy would look like on the Mill: https://youtu.be/DZ8HN9Cnjhc?t=3416
[ Parent
| on HN ]
Ah, 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!
Re:Mill Computing in 2017
by nightcracker on Thursday January 12, 2017 @11:29AM
(#13383547)
I 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.