/[gxemul]/trunk/src/cpus/cpu_ia64_instr.c
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/src/cpus/cpu_ia64_instr.c

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

revision 20 by dpavlin, Mon Oct 8 16:19:23 2007 UTC revision 24 by dpavlin, Mon Oct 8 16:19:56 2007 UTC
# Line 1  Line 1 
1  /*  /*
2   *  Copyright (C) 2005  Anders Gavare.  All rights reserved.   *  Copyright (C) 2005-2006  Anders Gavare.  All rights reserved.
3   *   *
4   *  Redistribution and use in source and binary forms, with or without   *  Redistribution and use in source and binary forms, with or without
5   *  modification, are permitted provided that the following conditions are met:   *  modification, are permitted provided that the following conditions are met:
# Line 25  Line 25 
25   *  SUCH DAMAGE.   *  SUCH DAMAGE.
26   *   *
27   *   *
28   *  $Id: cpu_ia64_instr.c,v 1.2 2005/11/06 22:41:12 debug Exp $   *  $Id: cpu_ia64_instr.c,v 1.6 2006/02/24 01:20:35 debug Exp $
29   *   *
30   *  IA64 instructions.   *  IA64 instructions.
31   *   *
# Line 75  X(end_of_page) Line 75  X(end_of_page)
75  X(to_be_translated)  X(to_be_translated)
76  {  {
77          uint64_t addr, low_pc;          uint64_t addr, low_pc;
         struct ia64_vph_page *vph_p;  
         unsigned char *page;  
78          unsigned char ib[16];          unsigned char ib[16];
79    
80          /*  Figure out the (virtual) address of the instruction:  */          /*  Figure out the (virtual) address of the instruction:  */
# Line 90  X(to_be_translated) Line 88  X(to_be_translated)
88    
89          /*  Read the instruction word from memory:  */          /*  Read the instruction word from memory:  */
90  #if 0  #if 0
         if ((addr >> _TOPSHIFT) == 0) {  
                 vph_p = cpu->cd.alpha.vph_table0[(addr >>  
                     ALPHA_LEVEL0_SHIFT) & 8191];  
                 page = vph_p->host_load[(addr >> ALPHA_LEVEL1_SHIFT) & 8191];  
         } else if ((addr >> ALPHA_TOPSHIFT) == ALPHA_TOP_KERNEL) {  
                 vph_p = cpu->cd.alpha.vph_table0_kernel[(addr >>  
                     ALPHA_LEVEL0_SHIFT) & 8191];  
                 page = vph_p->host_load[(addr >> ALPHA_LEVEL1_SHIFT) & 8191];  
         } else  
                 page = NULL;  
   
91          if (page != NULL) {          if (page != NULL) {
92                  /*  fatal("TRANSLATION HIT!\n");  */                  /*  fatal("TRANSLATION HIT!\n");  */
93                  memcpy(ib, page + (addr & 8191), sizeof(ib));                  memcpy(ib, page + (addr & 8191), sizeof(ib));
# Line 121  X(to_be_translated) Line 108  X(to_be_translated)
108  #undef  DYNTRANS_TO_BE_TRANSLATED_HEAD  #undef  DYNTRANS_TO_BE_TRANSLATED_HEAD
109    
110    
111  fatal("[ UNIMPLEMENTED IA64 instruction ]\n");  /*  TODO  */
 goto bad;  
112    
113    
114  #define DYNTRANS_TO_BE_TRANSLATED_TAIL  #define DYNTRANS_TO_BE_TRANSLATED_TAIL

Legend:
Removed from v.20  
changed lines
  Added in v.24

  ViewVC Help
Powered by ViewVC 1.1.26