arguments.cc revision 7693
15703SN/A/*
25703SN/A * Copyright (c) 2003-2005 The Regents of The University of Michigan
35703SN/A * All rights reserved.
49988Snilay@cs.wisc.edu *
58825Snilay@cs.wisc.edu * Redistribution and use in source and binary forms, with or without
69988Snilay@cs.wisc.edu * modification, are permitted provided that the following conditions are
77935SN/A * met: redistributions of source code must retain the above copyright
87935SN/A * notice, this list of conditions and the following disclaimer;
97935SN/A * redistributions in binary form must reproduce the above copyright
105703SN/A * notice, this list of conditions and the following disclaimer in the
115703SN/A * documentation and/or other materials provided with the distribution;
125703SN/A * neither the name of the copyright holders nor the names of its
139885Sstever@gmail.com * contributors may be used to endorse or promote products derived from
145703SN/A * this software without specific prior written permission.
155703SN/A *
169885Sstever@gmail.com * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
179885Sstever@gmail.com * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1810242Ssteve.reinhardt@amd.com * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
199988Snilay@cs.wisc.edu * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
205703SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2110242Ssteve.reinhardt@amd.com * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
227670SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2310242Ssteve.reinhardt@amd.com * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
245703SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
259449SAli.Saidi@ARM.com * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
268464SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
278721SN/A *
2810242Ssteve.reinhardt@amd.com * Authors: Nathan Binkert
2910242Ssteve.reinhardt@amd.com */
305703SN/A
315703SN/A#include "arch/utility.hh"
325703SN/A#include "config/the_isa.hh"
337935SN/A#include "cpu/thread_context.hh"
347935SN/A#include "sim/arguments.hh"
357935SN/A
367935SN/AArguments::Data::~Data()
377935SN/A{
387935SN/A    while (!data.empty()) {
397935SN/A        delete [] data.front();
408983Snate@binkert.org        data.pop_front();
415703SN/A    }
425703SN/A}
435703SN/A
449885Sstever@gmail.comchar *
455703SN/AArguments::Data::alloc(size_t size)
469988Snilay@cs.wisc.edu{
478721SN/A    char *buf = new char[size];
488721SN/A    data.push_back(buf);
498721SN/A    return buf;
508983Snate@binkert.org}
518983Snate@binkert.org
525703SN/Auint64_t
539885Sstever@gmail.comArguments::getArg(uint8_t size, bool fp)
549885Sstever@gmail.com{
559885Sstever@gmail.com    return TheISA::getArgument(tc, number, size, fp);
569988Snilay@cs.wisc.edu}
579885Sstever@gmail.com
589885Sstever@gmail.com