Deleted Added
sdiff udiff text old ( 3065:9bcb404a4a5b ) new ( 3380:382e21bc32f3 )
full compact
1/*
2 * Copyright (c) 2001-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 46 unchanged lines hidden (view full) ---

55
56
57void
58Trace::InstRecord::dump(ostream &outs)
59{
60 if (flags[PRINT_REG_DELTA])
61 {
62#if THE_ISA == SPARC_ISA
63 static uint64_t regs[32] = {
64 0, 0, 0, 0, 0, 0, 0, 0,
65 0, 0, 0, 0, 0, 0, 0, 0,
66 0, 0, 0, 0, 0, 0, 0, 0,
67 0, 0, 0, 0, 0, 0, 0, 0};
68 static uint64_t ccr = 0;
69 static uint64_t y = 0;
70 static uint64_t floats[32];
71 uint64_t newVal;
72 static const char * prefixes[4] = {"G", "O", "L", "I"};
73
74 char buf[256];
75 sprintf(buf, "PC = 0x%016llx", thread->readNextPC());
76 outs << buf;
77 sprintf(buf, " NPC = 0x%016llx", thread->readNextNPC());
78 outs << buf;
79 newVal = thread->readMiscReg(SparcISA::MISCREG_CCR);
80 if(newVal != ccr)
81 {
82 sprintf(buf, " CCR = 0x%016llx", newVal);
83 outs << buf;
84 ccr = newVal;
85 }
86 newVal = thread->readMiscReg(SparcISA::MISCREG_Y);
87 if(newVal != y)
88 {
89 sprintf(buf, " Y = 0x%016llx", newVal);
90 outs << buf;
91 y = newVal;
92 }
93 for(int y = 0; y < 4; y++)
94 {
95 for(int x = 0; x < 8; x++)
96 {
97 int index = x + 8 * y;
98 newVal = thread->readIntReg(index);
99 if(regs[index] != newVal)
100 {
101 sprintf(buf, " %s%d = 0x%016llx", prefixes[y], x, newVal);
102 outs << buf;
103 regs[index] = newVal;
104 }
105 }
106 }
107 for(int y = 0; y < 32; y++)
108 {
109 newVal = thread->readFloatRegBits(2 * y, 64);
110 if(floats[y] != newVal)
111 {
112 sprintf(buf, " F%d = 0x%016llx", y, newVal);
113 outs << buf;
114 floats[y] = newVal;
115 }
116 }
117 outs << endl;
118#endif
119 }
120 else if (flags[INTEL_FORMAT]) {
121#if FULL_SYSTEM
122 bool is_trace_system = (thread->getCpuPtr()->system->name() == trace_system);
123#else
124 bool is_trace_system = true;
125#endif

--- 177 unchanged lines hidden ---