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 //Don't print what happens for each micro-op, just print out
64 //once at the last op, and for regular instructions.
65 if(!staticInst->isMicroOp() || staticInst->isLastMicroOp())
66 {
67 static uint64_t regs[32] = {
68 0, 0, 0, 0, 0, 0, 0, 0,
69 0, 0, 0, 0, 0, 0, 0, 0,
70 0, 0, 0, 0, 0, 0, 0, 0,
71 0, 0, 0, 0, 0, 0, 0, 0};
72 static uint64_t ccr = 0;
73 static uint64_t y = 0;
74 static uint64_t floats[32];
75 uint64_t newVal;
76 static const char * prefixes[4] = {"G", "O", "L", "I"};
77
78 char buf[256];
79 sprintf(buf, "PC = 0x%016llx", thread->readNextPC());
80 outs << buf;
81 sprintf(buf, " NPC = 0x%016llx", thread->readNextNPC());
82 outs << buf;
83 newVal = thread->readMiscReg(SparcISA::MISCREG_CCR);
84 if(newVal != ccr)
85 {
86 sprintf(buf, " CCR = 0x%016llx", newVal);
87 outs << buf;
88 ccr = newVal;
89 }
90 newVal = thread->readMiscReg(SparcISA::MISCREG_Y);
91 if(newVal != y)
92 {
93 sprintf(buf, " Y = 0x%016llx", newVal);
94 outs << buf;
95 y = newVal;
96 }
97 for(int y = 0; y < 4; y++)
98 {
99 for(int x = 0; x < 8; x++)
100 {
101 int index = x + 8 * y;
102 newVal = thread->readIntReg(index);
103 if(regs[index] != newVal)
104 {
105 sprintf(buf, " %s%d = 0x%016llx", prefixes[y], x, newVal);
106 outs << buf;
107 regs[index] = newVal;
108 }
109 }
110 }
111 for(int y = 0; y < 32; y++)
112 {
113 newVal = thread->readFloatRegBits(2 * y, 64);
114 if(floats[y] != newVal)
115 {
116 sprintf(buf, " F%d = 0x%016llx", 2 * y, newVal);
117 outs << buf;
118 floats[y] = newVal;
119 }
120 }
121 outs << endl;
122 }
123#endif
124 }
125 else if (flags[INTEL_FORMAT]) {
126#if FULL_SYSTEM
127 bool is_trace_system = (thread->getCpuPtr()->system->name() == trace_system);
128#else
129 bool is_trace_system = true;
130#endif

--- 177 unchanged lines hidden ---