Deleted Added
sdiff udiff text old ( 6398:7a94cba72e02 ) new ( 6409:6eaa041d043e )
full compact
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;
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;
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;
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;
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 }
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};