cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

sgratton
Adept I

amuasm/amudisasm/R600Asm

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.
0 Likes
5 Replies

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.
0 Likes

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.
0 Likes

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.
0 Likes

Dear Micah,

Thanks for checking this for me. No problem about any wait; I'm just trying things out at the moment! (Please do consider providing some info/examples about using ISA shaders, or inspecting/tweaking brook/il ones, in the next CAL; it's a big plus point that one is able to see just what is going on.)

Best,
Steven.
0 Likes

Is there a way to get the amudisasm to output to a text file?

0 Likes