OpenCores
URL https://opencores.org/ocsvn/s1_core/s1_core/trunk

Subversion Repositories s1_core

[/] [s1_core/] [trunk/] [tools/] [bin/] [opcode2disass.sh] - Blame information for rev 113

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 113 albert.wat
#!/bin/bash -e
2
 
3
# Read input argument
4
opcode=$1
5
 
6
# File names
7
tmp_src="tmp$$.s"
8
tmp_out="tmp$$.o"
9
rm -f $tmp_src $tmp_out
10
 
11
# Create temporary source file
12
echo "
13
.text
14
.word $opcode
15
" > $tmp_src
16
 
17
# Compile and dump
18
sparc64-linux-gcc -c $tmp_src
19
sparc64-linux-objdump -d $tmp_out | tail -n 1 | cut -b 20-
20
 
21
# Final cleanup
22
rm -f $tmp_src $tmp_out
23
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.