|
From: Cerion Armour-B. <ce...@op...> - 2006-01-12 09:30:48
|
On Wednesday 11 January 2006 23:29, Stephen McCamant wrote: > >>>>> "CA-B" == Cerion Armour-Brown <ce...@op...> writes: > > CA-B> On Wednesday 11 January 2006 19:24, Uttam Pawar wrote: > UP> This is little off-topic question but, how did you decode > UP> 0x7c0048ce into lvx v0,r0,r9? Is there any general receipe for > UP> doing this for ppc platform? > > CA-B> I don't know how others do it, but i did this: > CA-B> create xyz.s: > CA-B> gcc -c xyz.s > CA-B> hexedit xyz.o > CA-B> objdump -d zzz.o > > CA-B> Anyone else out there got an easier way? > > Along the same lines, but more automated: > > % ./dump-insn-ppc.zsh 7c0048ce > 0: 7c 00 48 ce lvx v0,r0,r9 > % cat dump-insn-ppc.zsh > #!/bin/zsh > objdump -b binary -m powerpc -EB -D \ > =(perl -e 'print pack "N", hex $ARGV[0]' $1) | tail +7 Nice, thanks Stephen! Cerion |