nativetrace.cc (6398:7a94cba72e02) | nativetrace.cc (6409:6eaa041d043e) |
---|---|
1/* 2 * Copyright (c) 2006 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; --- 72 unchanged lines hidden (view full) --- 81} 82 83void 84Trace::ArmNativeTrace::check(NativeTraceRecord *record) 85{ 86 nState.update(this); 87 mState.update(record->getThread()); 88 | 1/* 2 * Copyright (c) 2006 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; --- 72 unchanged lines hidden (view full) --- 81} 82 83void 84Trace::ArmNativeTrace::check(NativeTraceRecord *record) 85{ 86 nState.update(this); 87 mState.update(record->getThread()); 88 |
89 bool errorFound = false; |
|
89 // Regular int regs 90 for (int i = 0; i < STATE_NUMVALS; i++) { 91 if (nState.changed[i] || mState.changed[i]) { 92 const char *vergence = " "; 93 if (mState.oldState[i] == nState.oldState[i] && 94 mState.newState[i] != nState.newState[i]) { 95 vergence = "<>"; 96 } else if (mState.oldState[i] != nState.oldState[i] && 97 mState.newState[i] == nState.newState[i]) { 98 vergence = "><"; 99 } 100 if (!nState.changed[i]) { 101 DPRINTF(ExecRegDelta, "%s [%5s] "\ 102 "Native: %#010x "\ 103 "M5: %#010x => %#010x\n", 104 vergence, regNames[i], 105 nState.newState[i], 106 mState.oldState[i], mState.newState[i]); | 90 // Regular int regs 91 for (int i = 0; i < STATE_NUMVALS; i++) { 92 if (nState.changed[i] || mState.changed[i]) { 93 const char *vergence = " "; 94 if (mState.oldState[i] == nState.oldState[i] && 95 mState.newState[i] != nState.newState[i]) { 96 vergence = "<>"; 97 } else if (mState.oldState[i] != nState.oldState[i] && 98 mState.newState[i] == nState.newState[i]) { 99 vergence = "><"; 100 } 101 if (!nState.changed[i]) { 102 DPRINTF(ExecRegDelta, "%s [%5s] "\ 103 "Native: %#010x "\ 104 "M5: %#010x => %#010x\n", 105 vergence, regNames[i], 106 nState.newState[i], 107 mState.oldState[i], mState.newState[i]); |
108 errorFound = true; |
|
107 } else if (!mState.changed[i]) { 108 DPRINTF(ExecRegDelta, "%s [%5s] "\ 109 "Native: %#010x => %#010x "\ 110 "M5: %#010x \n", 111 vergence, regNames[i], 112 nState.oldState[i], nState.newState[i], 113 mState.newState[i]); | 109 } else if (!mState.changed[i]) { 110 DPRINTF(ExecRegDelta, "%s [%5s] "\ 111 "Native: %#010x => %#010x "\ 112 "M5: %#010x \n", 113 vergence, regNames[i], 114 nState.oldState[i], nState.newState[i], 115 mState.newState[i]); |
116 errorFound = true; |
|
114 } else if (mState.oldState[i] != nState.oldState[i] || 115 mState.newState[i] != nState.newState[i]) { 116 DPRINTF(ExecRegDelta, "%s [%5s] "\ 117 "Native: %#010x => %#010x "\ 118 "M5: %#010x => %#010x\n", 119 vergence, regNames[i], 120 nState.oldState[i], nState.newState[i], 121 mState.oldState[i], mState.newState[i]); | 117 } else if (mState.oldState[i] != nState.oldState[i] || 118 mState.newState[i] != nState.newState[i]) { 119 DPRINTF(ExecRegDelta, "%s [%5s] "\ 120 "Native: %#010x => %#010x "\ 121 "M5: %#010x => %#010x\n", 122 vergence, regNames[i], 123 nState.oldState[i], nState.newState[i], 124 mState.oldState[i], mState.newState[i]); |
125 errorFound = true; |
|
122 } 123 } 124 } | 126 } 127 } 128 } |
129 if (errorFound) { 130 StaticInstPtr inst = record->getStaticInst(); 131 assert(inst); 132 bool ran = true; 133 if (inst->isMicroop()) { 134 ran = false; 135 inst = record->getMacroStaticInst(); 136 } 137 assert(inst); 138 record->traceInst(inst, ran); 139 } |
|
125} 126 127} /* namespace Trace */ 128 129//////////////////////////////////////////////////////////////////////// 130// 131// ExeTracer Simulation Object 132// 133Trace::ArmNativeTrace * 134ArmNativeTraceParams::create() 135{ 136 return new Trace::ArmNativeTrace(this); 137}; | 140} 141 142} /* namespace Trace */ 143 144//////////////////////////////////////////////////////////////////////// 145// 146// ExeTracer Simulation Object 147// 148Trace::ArmNativeTrace * 149ArmNativeTraceParams::create() 150{ 151 return new Trace::ArmNativeTrace(this); 152}; |