14776Sgblack@eecs.umich.edu/*
24776Sgblack@eecs.umich.edu * Copyright (c) 2001-2005 The Regents of The University of Michigan
34776Sgblack@eecs.umich.edu * All rights reserved.
44776Sgblack@eecs.umich.edu *
54776Sgblack@eecs.umich.edu * Redistribution and use in source and binary forms, with or without
64776Sgblack@eecs.umich.edu * modification, are permitted provided that the following conditions are
74776Sgblack@eecs.umich.edu * met: redistributions of source code must retain the above copyright
84776Sgblack@eecs.umich.edu * notice, this list of conditions and the following disclaimer;
94776Sgblack@eecs.umich.edu * redistributions in binary form must reproduce the above copyright
104776Sgblack@eecs.umich.edu * notice, this list of conditions and the following disclaimer in the
114776Sgblack@eecs.umich.edu * documentation and/or other materials provided with the distribution;
124776Sgblack@eecs.umich.edu * neither the name of the copyright holders nor the names of its
134776Sgblack@eecs.umich.edu * contributors may be used to endorse or promote products derived from
144776Sgblack@eecs.umich.edu * this software without specific prior written permission.
154776Sgblack@eecs.umich.edu *
164776Sgblack@eecs.umich.edu * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
174776Sgblack@eecs.umich.edu * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
184776Sgblack@eecs.umich.edu * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
194776Sgblack@eecs.umich.edu * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
204776Sgblack@eecs.umich.edu * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
214776Sgblack@eecs.umich.edu * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
224776Sgblack@eecs.umich.edu * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
234776Sgblack@eecs.umich.edu * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
244776Sgblack@eecs.umich.edu * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
254776Sgblack@eecs.umich.edu * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
264776Sgblack@eecs.umich.edu * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
274776Sgblack@eecs.umich.edu *
284776Sgblack@eecs.umich.edu * Authors: Steve Reinhardt
294776Sgblack@eecs.umich.edu *          Lisa Hsu
304776Sgblack@eecs.umich.edu *          Nathan Binkert
314776Sgblack@eecs.umich.edu *          Steve Raasch
324776Sgblack@eecs.umich.edu */
334776Sgblack@eecs.umich.edu
3411793Sbrandon.potter@amd.com#include "cpu/inteltrace.hh"
3511793Sbrandon.potter@amd.com
364776Sgblack@eecs.umich.edu#include <iomanip>
374776Sgblack@eecs.umich.edu
386658Snate@binkert.org#include "config/the_isa.hh"
394776Sgblack@eecs.umich.edu#include "cpu/exetrace.hh"
404776Sgblack@eecs.umich.edu#include "cpu/static_inst.hh"
414776Sgblack@eecs.umich.edu
424776Sgblack@eecs.umich.eduusing namespace std;
434776Sgblack@eecs.umich.eduusing namespace TheISA;
444776Sgblack@eecs.umich.edu
454776Sgblack@eecs.umich.edunamespace Trace {
464776Sgblack@eecs.umich.edu
474776Sgblack@eecs.umich.eduvoid
484776Sgblack@eecs.umich.eduTrace::IntelTraceRecord::dump()
494776Sgblack@eecs.umich.edu{
504776Sgblack@eecs.umich.edu    ostream &outs = Trace::output();
514776Sgblack@eecs.umich.edu    ccprintf(outs, "%7d ) ", when);
527720Sgblack@eecs.umich.edu    outs << "0x" << hex << pc.instAddr() << ":\t";
534776Sgblack@eecs.umich.edu    if (staticInst->isLoad()) {
544776Sgblack@eecs.umich.edu        ccprintf(outs, "<RD %#x>", addr);
554776Sgblack@eecs.umich.edu    } else if (staticInst->isStore()) {
564776Sgblack@eecs.umich.edu        ccprintf(outs, "<WR %#x>", addr);
574776Sgblack@eecs.umich.edu    }
584776Sgblack@eecs.umich.edu    outs << endl;
594776Sgblack@eecs.umich.edu}
604776Sgblack@eecs.umich.edu
617811Ssteve.reinhardt@amd.com} // namespace Trace
624776Sgblack@eecs.umich.edu
634776Sgblack@eecs.umich.edu////////////////////////////////////////////////////////////////////////
644776Sgblack@eecs.umich.edu//
654776Sgblack@eecs.umich.edu//  ExeTracer Simulation Object
664776Sgblack@eecs.umich.edu//
674776Sgblack@eecs.umich.eduTrace::IntelTrace *
684776Sgblack@eecs.umich.eduIntelTraceParams::create()
694776Sgblack@eecs.umich.edu{
705034Smilesck@eecs.umich.edu    return new Trace::IntelTrace(this);
718902Sandreas.hansson@arm.com}
72