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

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

revision 23 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_ppc_instr_loadstore.c,v 1.6 2005/11/23 06:59:52 debug Exp $   *  $Id: cpu_ppc_instr_loadstore.c,v 1.9 2006/04/02 10:21:08 debug Exp $
29   *   *
30   *  POWER/PowerPC load/store instructions.   *  POWER/PowerPC load/store instructions.
31   *   *
# Line 44  Line 44 
44  void LS_GENERIC_N(struct cpu *cpu, struct ppc_instr_call *ic)  void LS_GENERIC_N(struct cpu *cpu, struct ppc_instr_call *ic)
45  {  {
46  #ifdef MODE32  #ifdef MODE32
47          uint32_t addr = reg(ic->arg[1]) +          uint32_t addr =
48    #else
49            uint64_t addr =
50    #endif
51                reg(ic->arg[1]) +
52  #ifdef LS_INDEXED  #ifdef LS_INDEXED
53              reg(ic->arg[2]);              reg(ic->arg[2]);
54  #else  #else
# Line 161  void LS_GENERIC_N(struct cpu *cpu, struc Line 165  void LS_GENERIC_N(struct cpu *cpu, struc
165  #ifdef LS_UPDATE  #ifdef LS_UPDATE
166          reg(ic->arg[1]) = addr;          reg(ic->arg[1]) = addr;
167  #endif  #endif
 #else   /*  !MODE32  */  
         fatal("TODO: mode64\n");  
 #endif  /*  !MODE32  */  
168  }  }
169  #endif  #endif
170    
# Line 171  void LS_GENERIC_N(struct cpu *cpu, struc Line 172  void LS_GENERIC_N(struct cpu *cpu, struc
172  void LS_N(struct cpu *cpu, struct ppc_instr_call *ic)  void LS_N(struct cpu *cpu, struct ppc_instr_call *ic)
173  {  {
174  #ifdef MODE32  #ifdef MODE32
175          uint32_t addr = reg(ic->arg[1])          uint32_t addr =
176    #else
177            uint64_t addr =
178    #endif
179                reg(ic->arg[1])
180  #ifdef LS_INDEXED  #ifdef LS_INDEXED
181              + reg(ic->arg[2])              + reg(ic->arg[2])
182  #else  #else
# Line 199  void LS_N(struct cpu *cpu, struct ppc_in Line 204  void LS_N(struct cpu *cpu, struct ppc_in
204          }          }
205  #endif  #endif
206    
207    
208    #ifndef MODE32
209    /*******************************************/
210    if (!cpu->is_32bit) {
211    LS_GENERIC_N(cpu, ic);
212    return;
213    }
214    /*******************************************/
215    #endif
216    
217    
218          if (page == NULL) {          if (page == NULL) {
219                  LS_GENERIC_N(cpu, ic);                  LS_GENERIC_N(cpu, ic);
220                  return;                  return;
# Line 294  void LS_N(struct cpu *cpu, struct ppc_in Line 310  void LS_N(struct cpu *cpu, struct ppc_in
310  #ifdef LS_UPDATE  #ifdef LS_UPDATE
311          reg(ic->arg[1]) = new_addr;          reg(ic->arg[1]) = new_addr;
312  #endif  #endif
   
 #else   /*  !MODE32  */  
         fatal("ppc load/store mode64: TODO\n");  
         exit(1);  
 #endif  
313  }  }
314    

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

  ViewVC Help
Powered by ViewVC 1.1.26