5 Replies Latest reply on Mar 11, 2009 6:45 PM by ryta1203

    amuasm/amudisasm/R600Asm

    sgratton
      Hi there,

      Does anybody know how the amuasm/amudisasm tools in the in the \cal\tools folder work? (I don't think they're mentioned in the current documentation.) Are they related to the "R600Asm" program mentioned in the assembly language format document? (The latter tool at least sounds like it might be very helpful for developing/checking "tweaked" kernels if it could be made part of the sdk.)

      Thanks,
      Steven.
        • amuasm/amudisasm/R600Asm
          MicahVillmow
          sgratton,
          amudisasm takes a CAL imageand disassembles it to the R600 ISA. This is equivalent to calclDisassembleImage/calclDisassembleObject except it is offline. amuasm takes a assembly program and spits out a CALimage. This is equivalent to calclAssembleObject and then linking the object to a CALimage. The tools are available for assembly programming and can be very helpful in debugging compiler/performance issues that might occur, but I would strongly recommend against using them unless you are 100% sure this is the path you want to take. There is none/very little checking of the assembled object for correctness and a single error or missing instruction can crash your machine.
            • amuasm/amudisasm/R600Asm
              sgratton
              Hi Micah,

              Thanks for your reply. So should I be able to say compile a simple program with GSA, cut and paste the r600 assembly output into a text file, and then assemble this using amuasm? I tried this with the file:

              00 ALU: ADDR(32) CNT(4)
              0 x: MOV R0.x, 0.0f
              y: MOV R0.y, 0.0f
              z: MOV R0.z, 0.0f
              w: MOV R0.w, 0.0f
              01 EXP_DONE: PIX0, R0
              END_OF_PROGRAM

              saved as "test.txt" and the command "amuasm test.txt out" but got the error "failed to save binary ELF file out". Am I doing something wrong? If so, would you mind posting a simple working example?

              Thanks a lot,
              Steven.
            • amuasm/amudisasm/R600Asm
              MicahVillmow
              sgratton,
              Your ISA shader works fine with my version of the assembler. It seems that an older version got shipped with the beta that had a bug that didn't write the assembled elf object to the disk correctly, it does compile fine. I will see what I can do to get this corrected, but will probably require you to wait until the next release of CAL.