URL
https://opencores.org/ocsvn/or2k/or2k/trunk
Subversion Repositories or2k
[/] [or2k/] [trunk/] [analysis-bin/] [opcodeanalysis/] [README] - Rev 9
Go to most recent revision | Compare with Previous | Blame | View Log
Opcode analysis programThis program is designed to help look at the frequency of opcodes, and theoccurance of groups of opcodes together.This can also be done on the command line, but it was felt, at the time a Cprogram might be a quicker way. 3 hours later, it's not the author's intentionto now try doing this with sed, awk and sort.The list of instructions/opcodes should be one per line, with a newline at theend. There is no capability to look at register numbers. An example ofgenerating suitable input to the program is given below.At the moment this program only analyses up to quadruples, and is not codededin such a way that makes an arbitrary number of instruction groups easilytestable. Fix this if you like.There are no options when running the program. It will simply spit out a listof individual opcodes, then list of pairs, triples and quadruples.Compile the program with$ make allGenerate a list of opcodes from a large set of code, with the following:Disassemble an application with:$ or32-elf-objdump -d app.elf > app.disThe generate a list of opcodes with$ grep "l\." app.dis | cut -d '.' -f 2 | cut -d ' ' -f 1 > opcodesCall the program and pass the file with the list of opcodes as the firstargument. It's best to pipe the output it generates to a file:$ opcodeanalysis opcodes > opcodes.analsysThings that might be good:* Actually verifying the pair/triple/quadruple results are correct/true* Limiting the output of set results to the first 5/10/20* Provide an option to perform register analysis, also.* Generate CSV formatted outputJulius Baxter14 July, 2010
Go to most recent revision | Compare with Previous | Blame | View Log
