Index: trunk/sim/hello.dump
===================================================================
--- trunk/sim/hello.dump	(revision 18)
+++ trunk/sim/hello.dump	(revision 18)
@@ -0,0 +1,48 @@
+
+hello.bin:     file format elf32-tradlittlemips
+
+Disassembly of section .text:
+
+00000000 <main-0x10>:
+   0:   201d1000        addi    $29,$0,4096
+   4:   3c1fdead        lui     $31,0xdead
+   8:   37ffbeef        ori     $31,$31,0xbeef
+   c:   00000000        sll     $0,$0,0x0
+
+00000010 <main>:
+  10:   27bdffe8        addiu   $29,$29,-24
+  14:   afbe0010        sw      $30,16($29)
+  18:   03a0f021        addu    $30,$29,$0
+  1c:   3c02faba        lui     $2,0xfaba
+  20:   34421210        ori     $2,$2,0x1210
+  24:   afc20008        sw      $2,8($30)
+  28:   8fc30008        lw      $3,8($30)
+  2c:   24020048        addiu   $2,$0,72
+  30:   ac620000        sw      $2,0($3)
+  34:   8fc30008        lw      $3,8($30)
+  38:   24020065        addiu   $2,$0,101
+  3c:   ac620000        sw      $2,0($3)
+  40:   8fc30008        lw      $3,8($30)
+  44:   2402006c        addiu   $2,$0,108
+  48:   ac620000        sw      $2,0($3)
+  4c:   8fc30008        lw      $3,8($30)
+  50:   2402006c        addiu   $2,$0,108
+  54:   ac620000        sw      $2,0($3)
+  58:   8fc30008        lw      $3,8($30)
+  5c:   2402006f        addiu   $2,$0,111
+  60:   ac620000        sw      $2,0($3)
+  64:   8fc30008        lw      $3,8($30)
+  68:   24020021        addiu   $2,$0,33
+  6c:   ac620000        sw      $2,0($3)
+  70:   8fc30008        lw      $3,8($30)
+  74:   2402000a        addiu   $2,$0,10
+  78:   ac620000        sw      $2,0($3)
+  7c:   00001021        addu    $2,$0,$0
+  80:   03c0e821        addu    $29,$30,$0
+  84:   8fbe0010        lw      $30,16($29)
+  88:   27bd0018        addiu   $29,$29,24
+  8c:   03e00008        jr      $31
+  90:   00000000        sll     $0,$0,0x0
+  94:   00000000        sll     $0,$0,0x0
+  98:   00000000        sll     $0,$0,0x0
+  9c:   00000000        sll     $0,$0,0x0
Index: trunk/sim/memory.hex
===================================================================
--- trunk/sim/memory.hex	(revision 18)
+++ trunk/sim/memory.hex	(revision 18)
@@ -0,0 +1,81 @@
+201d
+1000
+3c1f
+dead
+37ff
+beef
+0000
+0000
+27bd
+ffe8
+afbe
+0010
+03a0
+f021
+3c02
+faba
+3442
+1210
+afc2
+0008
+8fc3
+0008
+2402
+0048
+ac62
+0000
+8fc3
+0008
+2402
+0065
+ac62
+0000
+8fc3
+0008
+2402
+006c
+ac62
+0000
+8fc3
+0008
+2402
+006c
+ac62
+0000
+8fc3
+0008
+2402
+006f
+ac62
+0000
+8fc3
+0008
+2402
+0021
+ac62
+0000
+8fc3
+0008
+2402
+000a
+ac62
+0000
+0000
+1021
+03c0
+e821
+8fbe
+0010
+27bd
+0018
+03e0
+0008
+0000
+0000
+0000
+0000
+0000
+0000
+0000
+0000
+     
Index: trunk/sw/test.c
===================================================================
--- trunk/sw/test.c	(revision 18)
+++ trunk/sw/test.c	(revision 18)
@@ -0,0 +1,229 @@
+int main() {
+ 
+  // Fetch from ROM
+  asm("nop \n nop \n nop \n nop \n");
+ 
+  // PA fff0000020
+  asm(".long 0x03000000");  // offset 0
+  asm(".long 0x05000100");  // offset 4
+  asm(".long 0x82106000");  // offset 8
+  asm(".long 0x8410a0c0");  // offset c
+ 
+  // PA fff0000030
+  asm(".long 0x83287020");
+  asm(".long 0x84108001");
+  asm(".long 0x81c08000");
+  asm(".long 0x01000000");
+ 
+  // Fetch from RAM
+  asm("nop \n nop \n nop \n nop \n");
+ 
+  // PA 00000400c0
+  asm(".long 0xb5802005");
+  asm(".long 0xa2102000");
+  asm(".long 0x821020a9");
+  asm(".long 0x83287020");
+ 
+  // PA 00000400d0
+  asm(".long 0xe2706000");
+  asm(".long 0xe2706040");
+  asm(".long 0xe2706080");
+  asm(".long 0xe27060c0");
+ 
+  // PA 00000400e0
+  asm(".long 0xa2102000");
+  asm(".long 0x82102010");
+  asm(".long 0xe2f04840");
+  asm(".long 0xa2102003");
+ 
+  // PA 00000400f0
+  asm(".long 0xe2f008a0");
+  asm(".long 0xa3480000");
+  asm(".long 0x819c6820");
+  asm(".long 0x87802025");
+ 
+  // PA 0000040100
+  asm(".long 0xc0f023c0");
+  asm(".long 0xc0f023c8");
+  asm(".long 0xc0f023d0");
+  asm(".long 0xc0f023d8");
+ 
+  // PA 0000040110
+  asm(".long 0xc0f023e0");
+  asm(".long 0xc0f023e8");
+  asm(".long 0xc0f023f0");
+  asm(".long 0xc0f023f8");
+ 
+  // PA 0000040120
+  asm(".long 0x8f902000");
+  asm(".long 0xa1902000");
+  asm(".long 0x8d802000");
+  asm(".long 0x85802000");
+ 
+  // PA 0000040130
+  asm(".long 0x87802000");
+  asm(".long 0x84102000");
+  asm(".long 0x89908000");
+  asm(".long 0x84102000");
+ 
+  // PA 0000040140
+  asm(".long 0xb1808000");
+  asm(".long 0x84102001");
+  asm(".long 0x8528b03f");
+  asm(".long 0xaf808000");
+ 
+  // PA 0000040150
+  asm(".long 0xb3808000");
+  asm(".long 0xbf988000");
+  asm(".long 0x81800000");
+  asm(".long 0x9190200f");
+ 
+  // PA 0000040160
+  asm(".long 0x93902000");
+  asm(".long 0x95902006");
+  asm(".long 0x97902000");
+  asm(".long 0x9b902000");
+ 
+  // PA 0000040170
+  asm(".long 0x99902007");
+  asm(".long 0x9d902007");
+  asm(".long 0x82102018");
+  asm(".long 0xc0f00a01");
+ 
+  // PA 0000040180
+  asm(".long 0xc0f00b01");
+  asm(".long 0xa2102003");
+  asm(".long 0xe2f00960");
+  asm(".long 0xa2102003");
+ 
+  // PA 0000040190
+  asm(".long 0x821020aa");
+  asm(".long 0x83287020");
+  asm(".long 0xe2706000");
+  asm(".long 0xe2706040");
+ 
+  // PA 00000401a0
+  asm(".long 0xe2706080");
+  asm(".long 0xe27060c0");
+  asm(".long 0xa3468000");
+  asm(".long 0x03000007");
+ 
+  // PA 00000401b0
+  asm(".long 0x82106300");
+  asm(".long 0xa20c4001");
+  asm(".long 0xa3347008");
+  asm(".long 0x03000000");
+ 
+  // PA 00000401c0
+  asm(".long 0x05000130");
+  asm(".long 0x82106000");
+  asm(".long 0x8410a000");
+  asm(".long 0x83287020");
+ 
+  // PA 00000401d0
+  asm(".long 0x84108001");
+  asm(".long 0xa32c7003");
+  asm(".long 0xc4588011");
+  asm(".long 0x82102080");
+ 
+  // PA 00000401e0
+  asm(".long 0xc4f04b00");
+  asm(".long 0x2f000200");
+  asm(".long 0x8b9dc000");
+  asm(".long 0x21000000");
+ 
+  // PA 00000401f0
+  asm(".long 0x03000130");
+  asm(".long 0xa0142000");
+  asm(".long 0x82106140");
+  asm(".long 0xa12c3020");
+ 
+  // PA 0000040200
+  asm(".long 0x82104010");
+  asm(".long 0x8528b007");
+  asm(".long 0x82004002");
+  asm(".long 0xe2584000");
+ 
+  // PA 0000040210
+  asm(".long 0xe2f006e0");
+  asm(".long 0xe2586008");
+  asm(".long 0xe2f007e0");
+  asm(".long 0xe2586010");
+ 
+  // PA 0000040220
+  asm(".long 0xe2f006a0");
+  asm(".long 0xe2586020");
+  asm(".long 0xe2f006c0");
+  asm(".long 0xe2586018");
+ 
+  // PA 0000040230
+  asm(".long 0xe2f007a0");
+  asm(".long 0xe2586028");
+  asm(".long 0xe2f007c0");
+  asm(".long 0xe2586040");
+ 
+  // PA 0000040240
+  asm(".long 0xe2f00660");
+  asm(".long 0xe2586048");
+  asm(".long 0xe2f00760");
+  asm(".long 0xe2586050");
+ 
+  // PA 0000040250
+  asm(".long 0xe2f00620");
+  asm(".long 0xe2586060");
+  asm(".long 0xe2f00640");
+  asm(".long 0xe2586058");
+ 
+  // PA 0000040260
+  asm(".long 0xe2f00720");
+  asm(".long 0xe2586068");
+  asm(".long 0xe2f00740");
+  asm(".long 0x94102080");
+ 
+  // PA 0000040270
+  asm(".long 0xc0f28ae0");
+  asm(".long 0xc0f28be0");
+  asm(".long 0xa2102008");
+  asm(".long 0xc0f44420");
+ 
+  // PA 0000040280
+  asm(".long 0xa2102010");
+  asm(".long 0xc0f44420");
+  asm(".long 0xa210200f");
+  asm(".long 0xe2f008a0");
+ 
+  // PA 0000040290
+  asm(".long 0x03000000");
+  asm(".long 0x05000510");
+  asm(".long 0x82106000");
+  asm(".long 0x8410a000");
+ 
+  // PA 00000402a0
+  asm(".long 0x83287020");
+  asm(".long 0x84108001");
+  asm(".long 0x87480000");
+  asm(".long 0x8f902001");
+ 
+  // PA 00000402b0
+  asm(".long 0x88102000");
+  asm(".long 0x83990000");
+  asm(".long 0x8f902000");
+  asm(".long 0x90102000");
+ 
+  // PA 00000402c0
+  asm(".long 0x81c08000");
+  asm(".long 0x81982800");
+  asm(".long 0x01000000");
+  asm(".long 0x01000000");
+ 
+  // PA 00000402d0
+  asm(".long 0x8210200f");
+  asm(".long 0xc2f008a0");
+  asm(".long 0xc0f00860");
+  asm(".long 0x83480000");
+ 
+  // End
+  asm("nop \n nop \n nop \n nop \n");
+  return 0;
+ 
+}
Index: trunk/sw/compila
===================================================================
--- trunk/sw/compila	(revision 18)
+++ trunk/sw/compila	(revision 18)
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+##bisognerebbe fare un makefile ma per ora:
+
+## compila con ISA SPARC-V9
+/opt/sparc64-sun-solaris2.8-toolchain/bin/sparc64-sun-solaris2.8-gcc -ffreestanding -nostdinc -c test.c
+
+## fa il dump del file
+/opt/sparc64-sun-solaris2.8-toolchain/sparc64-sun-solaris2.8/bin/objdump -d test.o
Index: trunk/sw/README
===================================================================
--- trunk/sw/README	(revision 18)
+++ trunk/sw/README	(revision 18)
@@ -0,0 +1,37 @@
+compilare sparc-gcc e sparc-binutils su CENTOS:
+
+sudo yum install gmp-devel
+sudo yum install mpfr-devel 
+(scaricarle da internet e usare rpm --force --nodep se non le trova)
+
+//
+export TARGET = sparc-sun-solaris2.8
+export PREFIX = /opt/$TARGET-toolchain
+export SYSROOT= $PREFIX/sysroot
+
+sudo mkdir $PREFIX
+sudo mkdir $SYSROOT
+
+
+cd ~
+mkdir temp
+cd temp
+wget http://ftp.gnu.org/gnu/binutils/binutils-2.20.tar.gz
+wget http://ftp.gnu.org/gnu/gcc/gcc-4.4.2/gcc-4.4.2.tar.gz
+tar -xzf binutils-2.20.tar.gz
+tar -xzf gcc-4.4.2.tar.gz
+mkdir build-binutils
+mkdir build-gcc
+
+cd build-binutils
+../binutils-2.20/configure -target=$TARGET --prefix=$PREFIX -with-sysroot=$SYSROOT -v
+sudo make all
+sudo make install
+
+
+cd ../build-gcc
+../gcc-4.4.2/configure --target=$TARGET --wth-gnu-as --with-gnu-ld --prefix=$PREFIX -wth-sysroot=$SYSROOT --dsiable-libgc \
+       --without-headers
+sudo make -k
+sudo make install
+	
