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; --- 52 unchanged lines hidden (view full) --- 61 0, 0, 0, 0, 0, 0, 0, 0}; 62 static uint64_t ccr = 0; 63 static uint64_t y = 0; 64 static uint64_t floats[32]; 65 uint64_t newVal; 66 static const char * prefixes[4] = {"G", "O", "L", "I"}; 67 if (flags[PRINT_REG_DELTA]) 68 { |
69 char buf[256]; |
70 sprintf(buf, "PC = 0x%016llx", thread->readNextPC()); |
71 outs << buf; |
72 sprintf(buf, " NPC = 0x%016llx", thread->readNextNPC()); |
73 outs << buf; |
74 newVal = thread->readMiscReg(SparcISA::MISCREG_CCR); |
75 if(newVal != ccr) 76 { 77 sprintf(buf, " CCR = 0x%016llx", newVal); 78 outs << buf; 79 ccr = newVal; 80 } |
81 newVal = thread->readMiscReg(SparcISA::MISCREG_Y); |
82 if(newVal != y) 83 { 84 sprintf(buf, " Y = 0x%016llx", newVal); 85 outs << buf; 86 y = newVal; 87 } 88 for(int y = 0; y < 4; y++) 89 { 90 for(int x = 0; x < 8; x++) 91 { 92 int index = x + 8 * y; |
93 newVal = thread->readIntReg(index); |
94 if(regs[index] != newVal) 95 { 96 sprintf(buf, " %s%d = 0x%016llx", prefixes[y], x, newVal); 97 outs << buf; 98 regs[index] = newVal; 99 } 100 } 101 } 102 for(int y = 0; y < 32; y++) 103 { |
104 newVal = thread->readFloatRegBits(2 * y, 64); |
105 if(floats[y] != newVal) 106 { 107 sprintf(buf, " F%d = 0x%016llx", y, newVal); 108 outs << buf; 109 floats[y] = newVal; 110 } 111 } 112 outs << endl; |
113 } 114 else if (flags[INTEL_FORMAT]) { 115#if FULL_SYSTEM |
116 bool is_trace_system = (thread->getCpuPtr()->system->name() == trace_system); |
117#else 118 bool is_trace_system = true; 119#endif 120 if (is_trace_system) { 121 ccprintf(outs, "%7d ) ", cycle); 122 outs << "0x" << hex << PC << ":\t"; 123 if (staticInst->isLoad()) { 124 outs << "<RD 0x" << hex << addr; 125 outs << ">"; 126 } else if (staticInst->isStore()) { 127 outs << "<WR 0x" << hex << addr; 128 outs << ">"; 129 } 130 outs << endl; 131 } 132 } else { 133 if (flags[PRINT_CYCLE]) 134 ccprintf(outs, "%7d: ", cycle); 135 |
136 outs << thread->getCpuPtr()->name() << " "; |
137 138 if (flags[TRACE_MISSPEC]) 139 outs << (misspeculating ? "-" : "+") << " "; 140 141 if (flags[PRINT_THREAD_NUM]) |
142 outs << "T" << thread->getThreadNum() << " : "; |
143 144 145 std::string sym_str; 146 Addr sym_addr; 147 if (debugSymbolTable 148 && debugSymbolTable->findNearestSymbol(PC, sym_str, sym_addr) 149 && flags[PC_SYMBOL]) { 150 if (PC != sym_addr) --- 146 unchanged lines hidden --- |