Mill Computing, Inc. Forums The Mill Architecture switches Reply To: switches

Veedrac
Participant
Post count: 25

I had a play around with optimizing this with what I, probably incorrectly, think I understand about the hardware. Is the following a valid program for Silver?


F('bar') %0;
    con    (w(100ul))              %1,  //          F3 ↥
    rd     (w(1ul))                %2,  // R0          ↥
    rd     (w(3ul))                %3,  // R0          ↥
    rd     (w(4ul))                %4,  // R1          ↥
    eql    (b4 %0,  b3 %1)         %5,  //    E0       ▸
    gtrs   (b4 %0,      7)         %6,  //    E1       ▸
    gtrs   (b4 %0,      3)         %7,  //    E2       ▸
    eql    (b4 %0,      0)         %8,  //    E3       ▸
    pick   (b0 %8,  b6 %2, b6 %4)  %9,  //       P0    ?
    retntr (b4 %5,  b6 %3),             //          F0 ↦
    retntr (b3 %6,  b5 %4),             //          F1 ↦
    retntr (b2 %7,  b9 %0);             //          F2 ↦

    gtrs   (b9 %0,      1)         %10, //    E0       ▸
    calltr1(b0 %10, 'foo', b10 %0) %11, //          F0 ↱
    retnfl (b1 %10, b2 %9),             //          F1 ↦
    retn   (b1 %11);                    //          F2 ↦