Debian Codegraph @

rpython/jit/backend/x86/tool/instruction_encoding.sh

raw symbols SCIP
1 #!/bin/bash
2
3 # Tool to quickly see how the GNU assembler encodes an instruction
4 # (AT&T syntax only for now)
5
6 # Command line options are passed on to "as"
7
8 # Provide readline if available
9 if which rlwrap > /dev/null && [ "$INSIDE_RLWRAP" = "" ]; then
10 export INSIDE_RLWRAP=1
11 exec rlwrap "$0" "$@"
12 fi
13
14 while :; do
15 echo -n '? '
16 read instruction
17 echo "$instruction" | as "$@"
18 objdump --disassemble ./a.out | grep '^ *[0-9a-f]\+:'
19 rm -f ./a.out
20 done