/[dynamips]/trunk/utils.h
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/utils.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

upstream/dynamips-0.2.7-RC1/utils.h revision 7 by dpavlin, Sat Oct 6 16:23:47 2007 UTC upstream/dynamips-0.2.7-RC3/utils.h revision 9 by dpavlin, Sat Oct 6 16:26:06 2007 UTC
# Line 22  Line 22 
22  #define TRUE  1  #define TRUE  1
23  #endif  #endif
24    
25    /* Host CPU Types */
26    #define CPU_x86    0
27    #define CPU_amd64  1
28    #define CPU_nojit  2
29    
30    /* Number of host registers available for JIT */
31    #if JIT_CPU == CPU_x86
32    #define JIT_HOST_NREG  8
33    #elif JIT_CPU == CPU_amd64
34    #define JIT_HOST_NREG  16
35    #else
36    #define JIT_HOST_NREG  0
37    #endif
38    
39  /* Endianness */  /* Endianness */
40  #define ARCH_BIG_ENDIAN     0x4321  #define ARCH_BIG_ENDIAN     0x4321
41  #define ARCH_LITTLE_ENDIAN  0x1234  #define ARCH_LITTLE_ENDIAN  0x1234
# Line 99  typedef unsigned long m_iptr_t; Line 113  typedef unsigned long m_iptr_t;
113  typedef m_uint64_t m_tmcnt_t;  typedef m_uint64_t m_tmcnt_t;
114    
115  /* Forward declarations */  /* Forward declarations */
116    typedef struct cpu_gen cpu_gen_t;
117  typedef struct vm_instance vm_instance_t;  typedef struct vm_instance vm_instance_t;
118  typedef struct mips64_jit_tcb mips64_jit_tcb_t;  typedef struct mips64_jit_tcb mips64_jit_tcb_t;
119  typedef struct ppc32_jit_tcb ppc32_jit_tcb_t;  typedef struct ppc32_jit_tcb ppc32_jit_tcb_t;
120    typedef struct jit_op jit_op_t;
121    
122  /* Translated block function pointer */  /* Translated block function pointer */
123  typedef void (*insn_tblock_fptr)(void);  typedef void (*insn_tblock_fptr)(void);
# Line 157  typedef struct { Line 173  typedef struct {
173  #define MTS_INV_ENTRY_MASK  0x00000001  #define MTS_INV_ENTRY_MASK  0x00000001
174    
175  /* MTS entry flags */  /* MTS entry flags */
176  #define MTS_FLAG_DEV  0x000000001   /* Virtual device used */  #define MTS_FLAG_DEV   0x000000001   /* Virtual device used */
177  #define MTS_FLAG_COW  0x000000002   /* Copy-On-Write */  #define MTS_FLAG_COW   0x000000002   /* Copy-On-Write */
178    #define MTS_FLAG_EXEC  0x000000004   /* Exec page */
179    
180  /* Virtual TLB entry (32-bit MMU) */  /* Virtual TLB entry (32-bit MMU) */
181  typedef struct mts32_entry mts32_entry_t;  typedef struct mts32_entry mts32_entry_t;
# Line 178  struct mts64_entry { Line 195  struct mts64_entry {
195     m_uint32_t flags;  /* Flags */     m_uint32_t flags;  /* Flags */
196  }__attribute__ ((aligned(16)));  }__attribute__ ((aligned(16)));
197    
198    /* Host register allocation */
199    #define HREG_FLAG_ALLOC_LOCKED  1
200    #define HREG_FLAG_ALLOC_FORCED  2
201    
202    struct hreg_map {
203       int hreg,vreg;
204       int flags;
205       struct hreg_map *prev,*next;
206    };
207    
208  /* Global logfile */  /* Global logfile */
209  extern FILE *log_file;  extern FILE *log_file;
210    
# Line 359  m_uint16_t nvram_cksum(m_uint16_t *ptr,s Line 386  m_uint16_t nvram_cksum(m_uint16_t *ptr,s
386  /* Byte-swap a memory block */  /* Byte-swap a memory block */
387  void mem_bswap32(void *ptr,size_t len);  void mem_bswap32(void *ptr,size_t len);
388    
389    /* Reverse a byte */
390    m_uint8_t m_reverse_u8(m_uint8_t val);
391    
392  #endif  #endif

Legend:
Removed from v.7  
changed lines
  Added in v.9

  ViewVC Help
Powered by ViewVC 1.1.26