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

Subversion Repositories or1k

[/] [or1k/] [branches/] [stable_0_2_x/] [or1ksim/] [cpu/] [or32/] [dyn_rec.h] - Diff between revs 1452 and 1481

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 1452 Rev 1481
Line 19... Line 19...
 
 
 
 
#ifndef DYN_REC_H
#ifndef DYN_REC_H
#define DYN_REC_H
#define DYN_REC_H
 
 
struct x_ref {
 
  void *dyn_addr; /* Recompiled address */
 
  oraddr_t or_addr; /* The or address of the x-ref (physical) */
 
  unsigned int ref; /* How many times the x-ref is referenced */
 
  struct x_ref *next;
 
};
 
 
 
/* Each dynamically recompiled page has one of these */
/* Each dynamically recompiled page has one of these */
struct dyn_page {
struct dyn_page {
  oraddr_t or_page;
  oraddr_t or_page;
  void *host_page;
  void *host_page;
  unsigned int host_len;
  unsigned int host_len;
  int carrys_delay_slot; /* Is the delay-slot of the last insn on the next page?*/
 
  int dirty; /* Is recompiled page invalid? */
  int dirty; /* Is recompiled page invalid? */
  struct x_ref *xrefs; /* what's referenced in this page */
 
  struct x_ref **held_xrefs; /* The xrefs that this page holds */
 
  int delayr; /* delayr of memory backing this page */
  int delayr; /* delayr of memory backing this page */
  uint16_t ts[4096]; /* What registers the temporaries back */
  uint16_t ts_during[2048]; /* What registers the temporaries back (during the
 
                             * instruction) */
 
  uint16_t ts_bound[2049]; /* What registers the temporaries back (on the
 
                            * begining boundry of the instruction) */
 
  void **locs; /* Openrisc locations in the recompiled code */
  struct dyn_page *next;
  struct dyn_page *next;
};
};
 
 
struct dyn_page *find_dynd_page(oraddr_t addr);
struct dyn_page *find_dynd_page(oraddr_t addr);
struct x_ref *find_host_x_ref(struct x_ref *x_refs, oraddr_t addr);
 
struct x_ref *add_to_xrefs(struct dyn_page *dp, oraddr_t addr);
 
void recompile_page(struct dyn_page *dyn);
void recompile_page(struct dyn_page *dyn);
struct dyn_page *new_dp(oraddr_t page);
struct dyn_page *new_dp(oraddr_t page);
void add_to_held_xrefs(struct dyn_page *dp, struct x_ref *xref);
 
void add_to_opq(struct op_queue *opq, int end, int op);
void add_to_opq(struct op_queue *opq, int end, int op);
void add_to_op_params(struct op_queue *opq, int end, unsigned long param);
void add_to_op_params(struct op_queue *opq, int end, unsigned long param);
void *enough_host_page(struct dyn_page *dp, void *cur, unsigned int *len,
void *enough_host_page(struct dyn_page *dp, void *cur, unsigned int *len,
                       unsigned int amount);
                       unsigned int amount);
void dirtyfy_page(struct dyn_page *dp);
void dirtyfy_page(struct dyn_page *dp);
struct x_ref *find_held_x_ref(struct x_ref **held_xrefs, oraddr_t or_addr);
 
void init_dyn_recomp(void);
void init_dyn_recomp(void);
void jump_dyn_code(oraddr_t addr);
void jump_dyn_code(oraddr_t addr);
void dump_xrefs(struct dyn_page *dp, FILE *f);
 
void run_sched_out_of_line(int add_normal);
void run_sched_out_of_line(int add_normal);
void recheck_immu(int got_en_dis);
void recheck_immu(int got_en_dis);
 
void enter_dyn_code(oraddr_t addr, struct dyn_page *dp);
 
 
 
extern void *rec_stack_base;
 
 
#define IMMU_GOT_ENABLED 1
#define IMMU_GOT_ENABLED 1
#define IMMU_GOT_DISABLED 2
#define IMMU_GOT_DISABLED 2
 
 
#define NUM_RFE_HELD 100
 
 
 
#endif
#endif
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

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