Diff for /gforth/arch/mips/disasm.fs between versions 1.14 and 1.15

version 1.14, 2007/12/31 19:02:24 version 1.15, 2010/08/07 17:35:02
Line 1 Line 1
 \ disasm.fs     disassembler file (for MIPS R3000)  \ disasm.fs     disassembler file (for MIPS32)
 \  \
 \ Copyright (C) 2000,2007 Free Software Foundation, Inc.  \ Copyright (C) 2000,2007 Free Software Foundation, Inc.
   
Line 79  does> ( u -- addr ) Line 79  does> ( u -- addr )
   
 $40 disasm-table opc-tab-entry     \ top-level decode table  $40 disasm-table opc-tab-entry     \ top-level decode table
 $40 disasm-table funct-tab-entry   \ special function table  $40 disasm-table funct-tab-entry   \ special function table
   $40 disasm-table funct-tab2-entry  \ special2 function table
 $20 disasm-table regimm-tab-entry  \ regim instructions rt table  $20 disasm-table regimm-tab-entry  \ regim instructions rt table
 $20 disasm-table copz-rs-tab-entry \ COPz instructions rs table  $20 disasm-table copz-rs-tab-entry \ COPz instructions rs table
 $20 disasm-table copz-rt-tab-entry \ COPz BC instructions rt table  $20 disasm-table copz-rt-tab-entry \ COPz BC instructions rt table
Line 96  dup set-current Line 97  dup set-current
 : disasm ( addr u -- ) \ gforth  : disasm ( addr u -- ) \ gforth
     \G disassemble u aus starting at addr      \G disassemble u aus starting at addr
     bounds u+do      bounds u+do
         cr ." ( " i hex. ." ) " i i @ disasm-inst          cr ." ( " i hex. ." ) " i i ul@ disasm-inst
         1 cells +loop          4 +loop
     cr ;      cr ;
   
 ' disasm IS discode  ' disasm IS discode
Line 109  definitions Line 110  definitions
     dup disasm-funct funct-tab-entry @ execute ;      dup disasm-funct funct-tab-entry @ execute ;
 ' disasm-special 0 opc-tab-entry ! \ enter it for opcode special  ' disasm-special 0 opc-tab-entry ! \ enter it for opcode special
   
   : disasm-special2 ( addr w -- ) \ todo factor out!
       \ disassemble inst with opcode special2
       dup disasm-funct funct-tab2-entry @ execute ;
   ' disasm-special2 $1C opc-tab-entry ! \ enter it for opcode special
   
 : disasm-regimm ( addr w -- )  : disasm-regimm ( addr w -- )
     \ disassemble regimm inst      \ disassemble regimm inst
     dup disasm-rt regimm-tab-entry @ execute ;      dup disasm-rt regimm-tab-entry @ execute ;
Line 260  does> ( addr w -- ) Line 266  does> ( addr w -- )
 ' disasm-rd.         ' funct-tab-entry   define-format asm-special-rd  ' disasm-rd.         ' funct-tab-entry   define-format asm-special-rd
 ' disasm-rs,rt       ' funct-tab-entry   define-format asm-special-rs,rt  ' disasm-rs,rt       ' funct-tab-entry   define-format asm-special-rs,rt
 ' disasm-rd,rs,rt    ' funct-tab-entry   define-format asm-special-rd,rs,rt  ' disasm-rd,rs,rt    ' funct-tab-entry   define-format asm-special-rd,rs,rt
   ' disasm-rd,rs       ' funct-tab2-entry  define-format asm-special2-rd,rs
   ' disasm-rs,rt       ' funct-tab2-entry  define-format asm-special2-rs,rt
   ' disasm-rd,rs,rt    ' funct-tab2-entry  define-format asm-special2-rd,rs,rt
 ' disasm-I-rs,imm    ' regimm-tab-entry  define-format asm-regimm-rs,imm  ' disasm-I-rs,imm    ' regimm-tab-entry  define-format asm-regimm-rs,imm
 ' 2drop              ' cp0-tab-entry     define-format asm-copz0  ' 2drop              ' cp0-tab-entry     define-format asm-copz0
 ' disasm-rt,rd,z     ' copz-rs-tab-entry define-format asm-copz-rt,rd1  ' disasm-rt,rd,z     ' copz-rs-tab-entry define-format asm-copz-rt,rd1

Removed from v.1.14  
changed lines
  Added in v.1.15


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>