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

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

revision 22 by dpavlin, Mon Oct 8 16:19:37 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_sparc.c,v 1.11 2005/12/11 21:34:43 debug Exp $   *  $Id: cpu_sparc.c,v 1.30 2006/06/16 18:31:26 debug Exp $
29   *   *
30   *  SPARC CPU emulation.   *  SPARC CPU emulation.
31   */   */
# Line 43  Line 43 
43    
44    
45  #define DYNTRANS_DUALMODE_32  #define DYNTRANS_DUALMODE_32
46    #define DYNTRANS_DELAYSLOT
47  #include "tmp_sparc_head.c"  #include "tmp_sparc_head.c"
48    
49    
50  static char *sparc_regnames[N_SPARC_REG] = SPARC_REG_NAMES;  static char *sparc_regnames[N_SPARC_REG] = SPARC_REG_NAMES;
51    static char *sparc_pregnames[N_SPARC_PREG] = SPARC_PREG_NAMES;
52  static char *sparc_regbranch_names[N_SPARC_REGBRANCH_TYPES] =  static char *sparc_regbranch_names[N_SPARC_REGBRANCH_TYPES] =
53          SPARC_REGBRANCH_NAMES;          SPARC_REGBRANCH_NAMES;
54  static char *sparc_branch_names[N_SPARC_BRANCH_TYPES] = SPARC_BRANCH_NAMES;  static char *sparc_branch_names[N_SPARC_BRANCH_TYPES] = SPARC_BRANCH_NAMES;
# Line 86  int sparc_cpu_new(struct cpu *cpu, struc Line 88  int sparc_cpu_new(struct cpu *cpu, struc
88          cpu->byte_order        = EMUL_BIG_ENDIAN;          cpu->byte_order        = EMUL_BIG_ENDIAN;
89          cpu->is_32bit = (cpu->cd.sparc.cpu_type.bits == 32)? 1 : 0;          cpu->is_32bit = (cpu->cd.sparc.cpu_type.bits == 32)? 1 : 0;
90    
91            cpu->instruction_has_delayslot = sparc_cpu_instruction_has_delayslot;
92    
93          if (cpu->is_32bit) {          if (cpu->is_32bit) {
94                  cpu->update_translation_table =                  cpu->update_translation_table =
95                      sparc32_update_translation_table;                      sparc32_update_translation_table;
# Line 125  int sparc_cpu_new(struct cpu *cpu, struc Line 129  int sparc_cpu_new(struct cpu *cpu, struc
129                  }                  }
130          }          }
131    
132            /*  After a reset, the Tick register is not readable by user code:  */
133            cpu->cd.sparc.tick |= SPARC_TICK_NPT;
134    
135            /*  Insert number of Windows and Trap levels into the version reg.:  */
136            cpu->cd.sparc.ver |= MAXWIN | (MAXTL << SPARC_VER_MAXTL_SHIFT);
137    
138            sparc_init_64bit_dummy_tables(cpu);
139    
140          return 1;          return 1;
141  }  }
142    
# Line 142  void sparc_cpu_list_available_types(void Line 154  void sparc_cpu_list_available_types(void
154          i = 0;          i = 0;
155          while (tdefs[i].name != NULL) {          while (tdefs[i].name != NULL) {
156                  debug("%s", tdefs[i].name);                  debug("%s", tdefs[i].name);
157                  for (j=10 - strlen(tdefs[i].name); j>0; j--)                  for (j=16 - strlen(tdefs[i].name); j>0; j--)
158                          debug(" ");                          debug(" ");
159                  i++;                  i++;
160                  if ((i % 6) == 0 || tdefs[i].name == NULL)                  if ((i % 4) == 0 || tdefs[i].name == NULL)
161                          debug("\n");                          debug("\n");
162          }          }
163  }  }
# Line 182  void sparc_cpu_register_dump(struct cpu Line 194  void sparc_cpu_register_dump(struct cpu
194    
195                  debug("cpu%i: pc = 0x", x);                  debug("cpu%i: pc = 0x", x);
196                  if (bits32)                  if (bits32)
197                          debug("%08x", (int)cpu->pc);                          debug("%08"PRIx32, (uint32_t) cpu->pc);
198                  else                  else
199                          debug("%016llx", (long long)cpu->pc);                          debug("%016"PRIx64, (uint64_t) cpu->pc);
200                  debug("  <%s>\n", symbol != NULL? symbol : " no symbol ");                  debug("  <%s>\n", symbol != NULL? symbol : " no symbol ");
201    
202                    debug("cpu%i: y  = 0x%08"PRIx32"   ",
203                        x, (uint32_t)cpu->cd.sparc.y);
204                    debug("icc = ");
205                    debug(cpu->cd.sparc.ccr & SPARC_CCR_N? "N" : "n");
206                    debug(cpu->cd.sparc.ccr & SPARC_CCR_Z? "Z" : "z");
207                    debug(cpu->cd.sparc.ccr & SPARC_CCR_V? "V" : "v");
208                    debug(cpu->cd.sparc.ccr & SPARC_CCR_C? "C" : "c");
209                    if (!bits32) {
210                            debug("  xcc = ");
211                            debug((cpu->cd.sparc.ccr >> SPARC_CCR_XCC_SHIFT)
212                                & SPARC_CCR_N? "N" : "n");
213                            debug((cpu->cd.sparc.ccr >> SPARC_CCR_XCC_SHIFT)
214                                & SPARC_CCR_Z? "Z" : "z");
215                            debug((cpu->cd.sparc.ccr >> SPARC_CCR_XCC_SHIFT)
216                                & SPARC_CCR_V? "V" : "v");
217                            debug((cpu->cd.sparc.ccr >> SPARC_CCR_XCC_SHIFT)
218                                & SPARC_CCR_C? "C" : "c");
219                    }
220                    debug("\n");
221    
222                    if (bits32)
223                            debug("cpu%i: psr = 0x%08"PRIx32"\n",
224                                x, (uint32_t) cpu->cd.sparc.psr);
225                    else
226                            debug("cpu%i: pstate = 0x%016"PRIx64"\n",
227                                x, (uint64_t) cpu->cd.sparc.pstate);
228    
229                  if (bits32) {                  if (bits32) {
230                          for (i=0; i<N_SPARC_REG; i++) {                          for (i=0; i<N_SPARC_REG; i++) {
231                                  if ((i & 3) == 0)                                  if ((i & 3) == 0)
232                                          debug("cpu%i: ", x);                                          debug("cpu%i: ", x);
233                                  /*  Skip the zero register:  */                                  /*  Skip the zero register:  */
234                                  if (i==0) {                                  if (i == SPARC_ZEROREG) {
235                                          debug("               ");                                          debug("               ");
236                                          continue;                                          continue;
237                                  }                                  }
# Line 208  void sparc_cpu_register_dump(struct cpu Line 247  void sparc_cpu_register_dump(struct cpu
247                                  int r = ((i >> 1) & 15) | ((i&1) << 4);                                  int r = ((i >> 1) & 15) | ((i&1) << 4);
248                                  if ((i & 1) == 0)                                  if ((i & 1) == 0)
249                                          debug("cpu%i: ", x);                                          debug("cpu%i: ", x);
250    
251                                  /*  Skip the zero register:  */                                  /*  Skip the zero register:  */
252                                  if (r==0) {                                  if (i == SPARC_ZEROREG) {
253                                          debug("                         ");                                          debug("                         ");
254                                          continue;                                          continue;
255                                  }                                  }
256    
257                                  debug("%s = ", sparc_regnames[r]);                                  debug("%s = ", sparc_regnames[r]);
258                                  debug("0x%016llx", (long long)                                  debug("0x%016"PRIx64, (uint64_t)
259                                      cpu->cd.sparc.r[r]);                                      cpu->cd.sparc.r[r]);
260    
261                                  if ((i & 1) < 1)                                  if ((i & 1) < 1)
262                                          debug("  ");                                          debug("  ");
263                                  else                                  else
# Line 232  void sparc_cpu_register_dump(struct cpu Line 274  void sparc_cpu_register_dump(struct cpu
274  void sparc_cpu_register_match(struct machine *m, char *name,  void sparc_cpu_register_match(struct machine *m, char *name,
275          int writeflag, uint64_t *valuep, int *match_register)          int writeflag, uint64_t *valuep, int *match_register)
276  {  {
277          int cpunr = 0;          int i, cpunr = 0;
278    
279          /*  CPU number:  */          /*  CPU number:  */
   
280          /*  TODO  */          /*  TODO  */
281    
282          /*  Register name:  */          for (i=0; i<N_SPARC_REG; i++) {
283                    if (strcasecmp(name, sparc_regnames[i]) == 0) {
284                            if (writeflag && i != SPARC_ZEROREG)
285                                    m->cpus[cpunr]->cd.sparc.r[i] = *valuep;
286                            else
287                                    *valuep = m->cpus[cpunr]->cd.sparc.r[i];
288                            *match_register = 1;
289                    }
290            }
291    
292          if (strcasecmp(name, "pc") == 0) {          if (strcasecmp(name, "pc") == 0) {
293                  if (writeflag) {                  if (writeflag) {
294                          m->cpus[cpunr]->pc = *valuep;                          m->cpus[cpunr]->pc = *valuep;
295                  } else                  } else {
296                          *valuep = m->cpus[cpunr]->pc;                          *valuep = m->cpus[cpunr]->pc;
297                    }
298                  *match_register = 1;                  *match_register = 1;
299          }          }
300    
301            if (strcasecmp(name, "y") == 0) {
302                    if (writeflag) {
303                            m->cpus[cpunr]->cd.sparc.y = (uint32_t) *valuep;
304                    } else {
305                            *valuep = (uint32_t) m->cpus[cpunr]->cd.sparc.y;
306                    }
307                    *match_register = 1;
308            }
309    
310            if (*match_register && m->cpus[cpunr]->is_32bit)
311                    (*valuep) &= 0xffffffffULL;
312    }
313    
314    
315    /*
316     *  sparc_cpu_tlbdump():
317     *
318     *  Called from the debugger to dump the TLB in a readable format.
319     *  x is the cpu number to dump, or -1 to dump all CPUs.
320     *
321     *  If rawflag is nonzero, then the TLB contents isn't formated nicely,
322     *  just dumped.
323     */
324    void sparc_cpu_tlbdump(struct machine *m, int x, int rawflag)
325    {
326    }
327    
328    
329    static void add_response_word(struct cpu *cpu, char *r, uint64_t value,
330            size_t maxlen, int len)
331    {
332            char *format = (len == 4)? "%08"PRIx64 : "%016"PRIx64;
333            if (len == 4)
334                    value &= 0xffffffffULL;
335            if (cpu->byte_order == EMUL_LITTLE_ENDIAN) {
336                    if (len == 4) {
337                            value = ((value & 0xff) << 24) +
338                                    ((value & 0xff00) << 8) +
339                                    ((value & 0xff0000) >> 8) +
340                                    ((value & 0xff000000) >> 24);
341                    } else {
342                            value = ((value & 0xff) << 56) +
343                                    ((value & 0xff00) << 40) +
344                                    ((value & 0xff0000) << 24) +
345                                    ((value & 0xff000000ULL) << 8) +
346                                    ((value & 0xff00000000ULL) >> 8) +
347                                    ((value & 0xff0000000000ULL) >> 24) +
348                                    ((value & 0xff000000000000ULL) >> 40) +
349                                    ((value & 0xff00000000000000ULL) >> 56);
350                    }
351            }
352            snprintf(r + strlen(r), maxlen - strlen(r), format, (uint64_t)value);
353    }
354    
355    
356    /*
357     *  sparc_cpu_gdb_stub():
358     *
359     *  Execute a "remote GDB" command. Returns a newly allocated response string
360     *  on success, NULL on failure.
361     */
362    char *sparc_cpu_gdb_stub(struct cpu *cpu, char *cmd)
363    {
364            if (strcmp(cmd, "g") == 0) {
365                    int i;
366                    char *r;
367                    size_t wlen = cpu->is_32bit?
368                        sizeof(uint32_t) : sizeof(uint64_t);
369                    size_t len = 1 + 76 * wlen;
370                    r = malloc(len);
371                    if (r == NULL) {
372                            fprintf(stderr, "out of memory\n");
373                            exit(1);
374                    }
375                    r[0] = '\0';
376                    /*  TODO  */
377                    for (i=0; i<128; i++)
378                            add_response_word(cpu, r, i, len, wlen);
379                    return r;
380            }
381    
382            if (cmd[0] == 'p') {
383                    int regnr = strtol(cmd + 1, NULL, 16);
384                    size_t wlen = sizeof(uint32_t);
385                    /*  TODO: cpu->is_32bit? sizeof(uint32_t) : sizeof(uint64_t); */
386                    size_t len = 2 * wlen + 1;
387                    char *r = malloc(len);
388                    r[0] = '\0';
389                    if (regnr >= 0 && regnr < N_SPARC_REG) {
390                            add_response_word(cpu, r,
391                                cpu->cd.sparc.r[regnr], len, wlen);
392                    } else if (regnr == 0x44) {
393                            add_response_word(cpu, r, cpu->pc, len, wlen);
394    /* TODO:
395    20..3f = f0..f31
396    40 = y
397    41 = psr
398    42 = wim
399    43 = tbr
400    45 = npc
401    46 = fsr
402    47 = csr
403    */
404                    } else {
405                            /*  Unimplemented:  */
406                            add_response_word(cpu, r, 0xcc000 + regnr, len, wlen);
407                    }
408                    return r;
409            }
410    
411            fatal("sparc_cpu_gdb_stub(): TODO\n");
412            return NULL;
413  }  }
414    
415    
# Line 270  int sparc_cpu_interrupt_ack(struct cpu * Line 434  int sparc_cpu_interrupt_ack(struct cpu *
434    
435    
436  /*  /*
437     *  sparc_cpu_instruction_has_delayslot():
438     *
439     *  Return 1 if an opcode is a branch, 0 otherwise.
440     */
441    int sparc_cpu_instruction_has_delayslot(struct cpu *cpu, unsigned char *ib)
442    {
443            uint32_t iword = *((uint32_t *)&ib[0]);
444            int hi2, op2;
445    
446            iword = BE32_TO_HOST(iword);
447    
448            hi2 = iword >> 30;
449            op2 = (hi2 == 0)? ((iword >> 22) & 7) : ((iword >> 19) & 0x3f);
450    
451            switch (hi2) {
452            case 0: /*  conditional branch  */
453                    switch (op2) {
454                    case 1:
455                    case 2:
456                    case 3: return 1;
457                    }
458                    break;
459            case 1: /*  call  */
460                    return 1;
461            case 2: /*  misc alu instructions  */
462                    switch (op2) {
463                    case 56:/*  jump and link  */
464                            return 1;
465                    }
466                    break;
467            }
468    
469            return 0;
470    }
471    
472    
473    /*
474   *  sparc_cpu_disassemble_instr():   *  sparc_cpu_disassemble_instr():
475   *   *
476   *  Convert an instruction word into human readable format, for instruction   *  Convert an instruction word into human readable format, for instruction
# Line 282  int sparc_cpu_interrupt_ack(struct cpu * Line 483  int sparc_cpu_interrupt_ack(struct cpu *
483   *  cpu->pc for relative addresses.   *  cpu->pc for relative addresses.
484   */   */
485  int sparc_cpu_disassemble_instr(struct cpu *cpu, unsigned char *instr,  int sparc_cpu_disassemble_instr(struct cpu *cpu, unsigned char *instr,
486          int running, uint64_t dumpaddr, int bintrans)          int running, uint64_t dumpaddr)
487  {  {
488          uint64_t offset, tmp;          uint64_t offset, tmp;
489          uint32_t iword;          uint32_t iword;
490          int hi2, op2, rd, rs1, rs2, siconst, btype, tmps, no_rd = 0;          int hi2, op2, rd, rs1, rs2, siconst, btype, tmps, no_rd = 0;
491          int asi, no_rs1 = 0, no_rs2 = 0, jmpl = 0, shift_x = 0, cc, p;          int asi, no_rs1 = 0, no_rs2 = 0, jmpl = 0, shift_x = 0, cc, p;
492          char *symbol, *mnem;          char *symbol, *mnem, *rd_name, *rs_name;
493    
494          if (running)          if (running)
495                  dumpaddr = cpu->pc;                  dumpaddr = cpu->pc;
# Line 302  int sparc_cpu_disassemble_instr(struct c Line 503  int sparc_cpu_disassemble_instr(struct c
503                  debug("cpu%i: ", cpu->cpu_id);                  debug("cpu%i: ", cpu->cpu_id);
504    
505          if (cpu->is_32bit)          if (cpu->is_32bit)
506                  debug("%08x", (int)dumpaddr);                  debug("%08"PRIx32, (uint32_t) dumpaddr);
507          else          else
508                  debug("%016llx", (long long)dumpaddr);                  debug("%016"PRIx64, (uint64_t) dumpaddr);
509    
510          iword = *(uint32_t *)&instr[0];          iword = *(uint32_t *)&instr[0];
511          iword = BE32_TO_HOST(iword);          iword = BE32_TO_HOST(iword);
512    
513          debug(": %08x\t", iword);          debug(": %08x", iword);
514    
515            if (running && cpu->delay_slot)
516                    debug(" (d)");
517    
518            debug("\t");
519    
520    
521          /*          /*
522           *  Decode the instruction:           *  Decode the instruction:
# Line 370  int sparc_cpu_disassemble_instr(struct c Line 577  int sparc_cpu_disassemble_instr(struct c
577                          }                          }
578                          tmp = (int64_t)(int32_t)tmps;                          tmp = (int64_t)(int32_t)tmps;
579                          tmp += dumpaddr;                          tmp += dumpaddr;
580                          debug("0x%llx", (long long)tmp);                          debug("0x%"PRIx64, (uint64_t) tmp);
581                          symbol = get_symbol_name(&cpu->machine->                          symbol = get_symbol_name(&cpu->machine->
582                              symbol_context, tmp, &offset);                              symbol_context, tmp, &offset);
583                          if (symbol != NULL)                          if (symbol != NULL)
# Line 391  int sparc_cpu_disassemble_instr(struct c Line 598  int sparc_cpu_disassemble_instr(struct c
598    
599          case 1: tmp = (int32_t)iword << 2;          case 1: tmp = (int32_t)iword << 2;
600                  tmp += dumpaddr;                  tmp += dumpaddr;
601                  debug("call\t0x%llx", (long long)tmp);                  debug("call\t0x%"PRIx64, (uint64_t) tmp);
602                  symbol = get_symbol_name(&cpu->machine->symbol_context,                  symbol = get_symbol_name(&cpu->machine->symbol_context,
603                      tmp, &offset);                      tmp, &offset);
604                  if (symbol != NULL)                  if (symbol != NULL)
# Line 399  int sparc_cpu_disassemble_instr(struct c Line 606  int sparc_cpu_disassemble_instr(struct c
606                  break;                  break;
607    
608          case 2: mnem = sparc_alu_names[op2];          case 2: mnem = sparc_alu_names[op2];
609                    rs_name = sparc_regnames[rs1];
610                    rd_name = sparc_regnames[rd];
611                  switch (op2) {                  switch (op2) {
612                  case 0: /*  add  */                  case 0: /*  add  */
613                          if (rd == rs1 && (iword & 0x3fff) == 0x2001) {                          if (rd == rs1 && (iword & 0x3fff) == 0x2001) {
# Line 433  int sparc_cpu_disassemble_instr(struct c Line 642  int sparc_cpu_disassemble_instr(struct c
642                          } else                          } else
643                                  siconst &= 0x1f;                                  siconst &= 0x1f;
644                          break;                          break;
645                    case 40:/*  rd on pre-sparcv9, membar etc on sparcv9  */
646                            no_rs2 = 1;
647                            rs_name = "UNIMPLEMENTED";
648                            switch (rs1) {
649                            case 0: rs_name = "y"; break;
650                            case 2: rs_name = "ccr"; break;
651                            case 3: rs_name = "asi"; break;
652                            case 4: rs_name = "tick"; break;
653                            case 5: rs_name = "pc"; break;
654                            case 6: rs_name = "fprs"; break;
655                            case 15:/*  membar etc.  */
656                                    if ((iword >> 13) & 1) {
657                                            no_rd = 1;
658                                            mnem = "membar";
659                                            rs_name = "#TODO";
660                                    }
661                                    break;
662                            case 23:rs_name = "tick_cmpr"; break;   /*  v9 ?  */
663                            }
664                            break;
665                    case 41:rs_name = "psr";
666                            no_rs2 = 1;
667                            break;
668                    case 42:rs_name = "wim";
669                            no_rs2 = 1;
670                            break;
671                  case 43:/*  ?  */                  case 43:/*  ?  */
672                            /*  TODO: pre-sparcv9: rd, rs_name = "tbr";  */
673                          if (iword == 0x81580000) {                          if (iword == 0x81580000) {
674                                  mnem = "flushw";                                  mnem = "flushw";
675                                  no_rs1 = no_rs2 = no_rd = 1;                                  no_rs1 = no_rs2 = no_rd = 1;
676                          }                          }
677                          break;                          break;
678                    case 48:/*  wr* (SPARCv8)  */
679                            mnem = "wr";
680                            if (rs1 == SPARC_ZEROREG)
681                                    no_rs1 = 1;
682                            switch (rd) {
683                            case 0: rd_name = "y"; break;
684                            case 2: rd_name = "ccr"; break;
685                            case 3: rd_name = "asi"; break;
686                            case 6: rd_name = "fprs"; break;
687                            case 23:rd_name = "tick_cmpr"; break;   /*  v9 ?  */
688                            default:rd_name = "UNIMPLEMENTED";
689                            }
690                            break;
691                  case 49:/*  ?  */                  case 49:/*  ?  */
692                          if (iword == 0x83880000) {                          if (iword == 0x83880000) {
693                                  mnem = "restored";                                  mnem = "restored";
694                                  no_rs1 = no_rs2 = no_rd = 1;                                  no_rs1 = no_rs2 = no_rd = 1;
695                          }                          }
696                          break;                          break;
697                    case 50:/*  wrpr  */
698                            rd_name = sparc_pregnames[rd];
699                            if (rs1 == SPARC_ZEROREG)
700                                    no_rs1 = 1;
701                            break;
702                  case 56:/*  jmpl  */                  case 56:/*  jmpl  */
703                          jmpl = 1;                          jmpl = 1;
704                          if (iword == 0x81c7e008) {                          if (iword == 0x81c7e008) {
# Line 471  int sparc_cpu_disassemble_instr(struct c Line 725  int sparc_cpu_disassemble_instr(struct c
725                          debug("x");                          debug("x");
726                  debug("\t");                  debug("\t");
727                  if (!no_rs1)                  if (!no_rs1)
728                          debug("%%%s", sparc_regnames[rs1]);                          debug("%%%s", rs_name);
729                  if (!no_rs1 && !no_rs2) {                  if (!no_rs1 && !no_rs2) {
730                          if (jmpl)                          if (jmpl)
731                                  debug("+");                                  debug("+");
# Line 491  int sparc_cpu_disassemble_instr(struct c Line 745  int sparc_cpu_disassemble_instr(struct c
745                  if ((!no_rs1 || !no_rs2) && !no_rd)                  if ((!no_rs1 || !no_rs2) && !no_rd)
746                          debug(",");                          debug(",");
747                  if (!no_rd)                  if (!no_rd)
748                          debug("%%%s", sparc_regnames[rd]);                          debug("%%%s", rd_name);
749                  break;                  break;
750    
751          case 3: debug("%s\t", sparc_loadstore_names[op2]);          case 3: debug("%s\t", sparc_loadstore_names[op2]);
# Line 520  int sparc_cpu_disassemble_instr(struct c Line 774  int sparc_cpu_disassemble_instr(struct c
774  }  }
775    
776    
777    /*
778     *  sparc_update_pstate():
779     *
780     *  Update the pstate register (64-bit sparcs).
781     */
782    static void sparc_update_pstate(struct cpu *cpu, uint64_t new_pstate)
783    {
784            /*  uint64_t old_pstate = cpu->cd.sparc.pstate;  */
785    
786            /*  TODO: Check individual bits.  */
787    
788            cpu->cd.sparc.pstate = new_pstate;
789    }
790    
791    
792  #include "tmp_sparc_tail.c"  #include "tmp_sparc_tail.c"
793    

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

  ViewVC Help
Powered by ViewVC 1.1.26