ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/mon/src/mon_ppc.cpp
(Generate patch)

Comparing mon/src/mon_ppc.cpp (file contents):
Revision 1.10 by gbeauche, 2006-03-13T12:15:23Z vs.
Revision 1.11 by cebix, 2010-02-21T11:58:33Z

# Line 1 | Line 1
1   /*
2   *  mon_ppc.cpp - PowerPC disassembler
3   *
4 < *  cxmon (C) 1997-2004 Christian Bauer, Marc Hellwig
4 > *  cxmon (C) Christian Bauer, Marc Hellwig
5   *
6   *  This program is free software; you can redistribute it and/or modify
7   *  it under the terms of the GNU General Public License as published by
# Line 30 | Line 30 | static unsigned short imm;
30  
31  
32   // Codes for trap instructions
33 < static char *to_code[32] = {
33 > static const char *to_code[32] = {
34          NULL, "lgt", "llt", NULL, "eq", "lge", "lle", NULL,
35          "gt", NULL, NULL, NULL, "ge", NULL, NULL, NULL,
36          "lt", NULL, NULL, NULL, "le", NULL, NULL, NULL,
# Line 187 | Line 187 | static void disass31(FILE *f, unsigned i
187   static void disass59(FILE *f, unsigned int adr, unsigned int w);
188   static void disass63(FILE *f, unsigned int adr, unsigned int w);
189   static unsigned int mbme2mask(int mb, int me);
190 < static char *get_spr(int reg);
190 > static const char *get_spr(int reg);
191  
192  
193   /*
# Line 279 | Line 279 | void disass_ppc(FILE *f, unsigned int ad
279  
280                  case 16: {
281                          int target = short(imm & 0xfffc);
282 <                        char *form;
282 >                        const char *form;
283                          if (w & 1)
284                                  if (w & 2)
285                                          form = "la";
# Line 817 | Line 817 | static void disass31(FILE *f, unsigned i
817                          else if ((ra | (rb << 5)) == 256)
818                                  fprintf(f, "mfvrsave\tr%d\n", rd);
819                          else {
820 <                                char *spr = get_spr(ra | (rb << 5));
820 >                                const char *spr = get_spr(ra | (rb << 5));
821                                  if (spr)
822                                          fprintf(f, "mfspr\tr%d,%s\n", rd, spr);
823                                  else
# Line 894 | Line 894 | static void disass31(FILE *f, unsigned i
894                          else if ((ra | (rb << 5)) == 256)
895                                  fprintf(f, "mtvrsave\tr%d\n", rd);
896                          else {
897 <                                char *spr = get_spr(ra | (rb << 5));
897 >                                const char *spr = get_spr(ra | (rb << 5));
898                                  if (spr)
899                                          fprintf(f, "mtspr\t%s,r%d\n", spr, rd);
900                                  else
# Line 1058 | Line 1058 | static unsigned int mbme2mask(int mb, in
1058   *  Convert SPR number to register name
1059   */
1060  
1061 < char *get_spr(int reg)
1061 > const char *get_spr(int reg)
1062   {
1063          switch (reg) {
1064                  case 1: return "xer";

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines