Mill Computing, Inc. Forums The Mill Tools Simulators I was at it again. Reply To: I was at it again.

Ivan Godard
Keymaster
Post count: 689

In case this is helpful to contrast your own work, here is the Mill tool chain assembler output for Hello World on the Copper configuration. It is two bundles here because Copper is slot-limited on the flow side; on Silver or Gold it is the same instructions but only one bundle.

Reminder: Mill conAsm is really C++; this file is compileable by Clang/LLVM given appropriate #include’s.

s8:~/mill/build/testsuite$ cat hello*asm
// THIS FILE IS GENERATED BY THE specialize PROGRAM
// DO *NOT* HAND EDIT OR PLACE IN REPOSITORY
#include    "absParse.hh"

int main(int argc, char* argv[]) {
        getOpt(argc, argv);
        targetMember("Copper");

Section( .data )  {
}

Section( .rodata )  {
    const char* __x_str =
        "Hello, World!\12\0";
    assembler::defData("__x_str", private$, 0, over(__x_str, 15));

}

Section( .bss )  {
}

Section( .text ) assembler::defFunc("memcpy", unknown);
Section( .text ) assembler::defFunc("memmove", unknown);
Section( .text ) assembler::defFunc("memset", unknown);
Section( .text ) assembler::defFunc("printf", external);
Section( .text ) assembler::defFunc("main", external);
F("main");
    lea(cpp, gl("__x_str")) %1 ^13;
                // V%1

    rd(w(0)) %0 ^12,
        // L6C2F0=/home/ivan/mill/testsuite/hello.c
    call0("printf", b1 %1) ^14,                                 // L5C2F0
    retn(b0 %0) ^15;                                            // L6C2F0
                // V%0 ^%1 ^%0

Section( .init_array )  {
}

Section( .fini_array )  {
}

        return 0;
        }