arguments.cc revision 7693:f1db1000d957
12207SN/A/*
22207SN/A * Copyright (c) 2003-2005 The Regents of The University of Michigan
32207SN/A * All rights reserved.
42207SN/A *
52207SN/A * Redistribution and use in source and binary forms, with or without
62207SN/A * modification, are permitted provided that the following conditions are
72207SN/A * met: redistributions of source code must retain the above copyright
82207SN/A * notice, this list of conditions and the following disclaimer;
92207SN/A * redistributions in binary form must reproduce the above copyright
102207SN/A * notice, this list of conditions and the following disclaimer in the
112207SN/A * documentation and/or other materials provided with the distribution;
122207SN/A * neither the name of the copyright holders nor the names of its
132207SN/A * contributors may be used to endorse or promote products derived from
142207SN/A * this software without specific prior written permission.
152207SN/A *
162207SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
172207SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
182207SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
192207SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
202207SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
212207SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
222207SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
232207SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
242207SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
252207SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
262207SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
272665Ssaidi@eecs.umich.edu *
282665Ssaidi@eecs.umich.edu * Authors: Nathan Binkert
292665Ssaidi@eecs.umich.edu */
302207SN/A
312207SN/A#include "arch/utility.hh"
325569Snate@binkert.org#include "config/the_isa.hh"
335569Snate@binkert.org#include "cpu/thread_context.hh"
342207SN/A#include "sim/arguments.hh"
352474SN/A
362207SN/AArguments::Data::~Data()
372474SN/A{
382207SN/A    while (!data.empty()) {
397532Ssteve.reinhardt@amd.com        delete [] data.front();
407532Ssteve.reinhardt@amd.com        data.pop_front();
417532Ssteve.reinhardt@amd.com    }
422474SN/A}
435569Snate@binkert.org
442207SN/Achar *
457532Ssteve.reinhardt@amd.comArguments::Data::alloc(size_t size)
467532Ssteve.reinhardt@amd.com{
475759Shsul@eecs.umich.edu    char *buf = new char[size];
485759Shsul@eecs.umich.edu    data.push_back(buf);
495958Sgblack@eecs.umich.edu    return buf;
505958Sgblack@eecs.umich.edu}
516701Sgblack@eecs.umich.edu
529552Sandreas.hansson@arm.comuint64_t
539552Sandreas.hansson@arm.comArguments::getArg(uint8_t size, bool fp)
545958Sgblack@eecs.umich.edu{
555958Sgblack@eecs.umich.edu    return TheISA::getArgument(tc, number, size, fp);
562474SN/A}
572474SN/A
585569Snate@binkert.org