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

Subversion Repositories s1_core

[/] [s1_core/] [trunk/] [tools/] [bin/] [opcode2disass.sh] - Rev 113

Compare with Previous | Blame | View Log

#!/bin/bash -e
 
# Read input argument
opcode=$1
 
# File names
tmp_src="tmp$$.s"
tmp_out="tmp$$.o"
rm -f $tmp_src $tmp_out
 
# Create temporary source file
echo "
.text
.word $opcode
" > $tmp_src
 
# Compile and dump
sparc64-linux-gcc -c $tmp_src
sparc64-linux-objdump -d $tmp_out | tail -n 1 | cut -b 20-
 
# Final cleanup
rm -f $tmp_src $tmp_out
 
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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