m5op_arm.S revision 9949
12292SN/A/*
22329SN/A * Copyright (c) 2010 ARM Limited
32292SN/A * All rights reserved
42292SN/A *
52292SN/A * The license below extends only to copyright in the software and shall
62292SN/A * not be construed as granting a license to any other intellectual
72292SN/A * property including but not limited to intellectual property relating
82292SN/A * to a hardware implementation of the functionality of the software
92292SN/A * licensed hereunder.  You may use the software subject to the license
102292SN/A * terms below provided that you ensure that this notice is replicated
112292SN/A * unmodified and in its entirety in all distributions of the software,
122292SN/A * modified or unmodified, in source code or in binary form.
132292SN/A *
142292SN/A * Copyright (c) 2003-2006 The Regents of The University of Michigan
152292SN/A * All rights reserved.
162292SN/A *
172292SN/A * Redistribution and use in source and binary forms, with or without
182292SN/A * modification, are permitted provided that the following conditions are
192292SN/A * met: redistributions of source code must retain the above copyright
202292SN/A * notice, this list of conditions and the following disclaimer;
212292SN/A * redistributions in binary form must reproduce the above copyright
222292SN/A * notice, this list of conditions and the following disclaimer in the
232292SN/A * documentation and/or other materials provided with the distribution;
242292SN/A * neither the name of the copyright holders nor the names of its
252292SN/A * contributors may be used to endorse or promote products derived from
262292SN/A * this software without specific prior written permission.
272689Sktlim@umich.edu *
282689Sktlim@umich.edu * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
292689Sktlim@umich.edu * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
302292SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
312292SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
322292SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
332292SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
342292SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
352329SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
364395Ssaidi@eecs.umich.edu * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
372292SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
382292SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
392292SN/A *
402329SN/A * Authors: Nathan Binkert
413326Sktlim@umich.edu *          Ali Saidi
428229Snate@binkert.org *          Chander Sudanthi
438229Snate@binkert.org *          Andreas Sandberg
442292SN/A */
456658Snate@binkert.org.syntax unified
462292SN/A#ifdef __thumb__
478230Snate@binkert.org.thumb
488232Snate@binkert.org#endif
493348Sbinkertn@umich.edu
502669Sktlim@umich.edu#include "m5ops.h"
512292SN/A
525529Snate@binkert.org.text
535529Snate@binkert.org
542292SN/A.macro simple_op name, func, subfunc
552329SN/A        .align 2
562329SN/A        .globl \name
572329SN/A\name:
582329SN/A#ifdef __thumb__
592329SN/A        .short 0xEE00 | \func
602329SN/A        .short 0x0110 | (\subfunc << 12)
612329SN/A#else
622329SN/A        .long 0xEE000110 | (\func << 16) | (\subfunc << 12)
632329SN/A#endif
642329SN/A        mov pc,lr
652292SN/A.endm
662292SN/A
672292SN/A#define SIMPLE_OP(name, func, subfunc) simple_op name, func, subfunc
682292SN/A
692733Sktlim@umich.eduSIMPLE_OP(arm, arm_func, 0)
702292SN/ASIMPLE_OP(quiesce, quiesce_func, 0)
712292SN/ASIMPLE_OP(quiesceNs, quiescens_func, 0)
722907Sktlim@umich.eduSIMPLE_OP(quiesceCycle, quiescecycle_func, 0)
732292SN/ASIMPLE_OP(quiesceTime, quiescetime_func, 0)
742292SN/ASIMPLE_OP(rpns, rpns_func, 0)
752292SN/ASIMPLE_OP(wakeCPU, wakecpu_func, 0)
762292SN/ASIMPLE_OP(m5_exit, exit_func, 0)
772292SN/ASIMPLE_OP(m5_fail, fail_func, 0)
782292SN/ASIMPLE_OP(m5_initparam, initparam_func, 0)
792292SN/ASIMPLE_OP(m5_loadsymbol, loadsymbol_func, 0)
805529Snate@binkert.orgSIMPLE_OP(m5_reset_stats, resetstats_func, 0)
815529Snate@binkert.orgSIMPLE_OP(m5_dump_stats, dumpstats_func, 0)
825529Snate@binkert.orgSIMPLE_OP(m5_dumpreset_stats, dumprststats_func, 0)
832292SN/ASIMPLE_OP(m5_checkpoint, ckpt_func, 0)
842292SN/ASIMPLE_OP(m5_readfile, readfile_func, 0)
852292SN/ASIMPLE_OP(m5_writefile, writefile_func, 0)
862292SN/ASIMPLE_OP(m5_debugbreak, debugbreak_func, 0)
872727Sktlim@umich.eduSIMPLE_OP(m5_switchcpu, switchcpu_func, 0)
882727Sktlim@umich.eduSIMPLE_OP(m5_addsymbol, addsymbol_func, 0)
892727Sktlim@umich.eduSIMPLE_OP(m5_panic, panic_func, 0)
902907Sktlim@umich.eduSIMPLE_OP(m5_work_begin, work_begin_func, 0)
914329Sktlim@umich.eduSIMPLE_OP(m5_work_end, work_end_func, 0)
922907Sktlim@umich.edu
932348SN/ASIMPLE_OP(m5a_bsm, annotate_func, an_bsm)
942307SN/ASIMPLE_OP(m5a_esm, annotate_func, an_esm)
952307SN/ASIMPLE_OP(m5a_begin, annotate_func, an_begin)
962348SN/ASIMPLE_OP(m5a_end, annotate_func, an_end)
972307SN/ASIMPLE_OP(m5a_q, annotate_func, an_q)
982307SN/ASIMPLE_OP(m5a_rq, annotate_func, an_rq)
992348SN/ASIMPLE_OP(m5a_dq, annotate_func, an_dq)
1002307SN/ASIMPLE_OP(m5a_wf, annotate_func, an_wf)
1012307SN/ASIMPLE_OP(m5a_we, annotate_func, an_we)
1022292SN/ASIMPLE_OP(m5a_ws, annotate_func, an_ws)
1032292SN/ASIMPLE_OP(m5a_sq, annotate_func, an_sq)
1042292SN/ASIMPLE_OP(m5a_aq, annotate_func, an_aq)
1052292SN/ASIMPLE_OP(m5a_pq, annotate_func, an_pq)
1062292SN/ASIMPLE_OP(m5a_l, annotate_func, an_l)
1072292SN/ASIMPLE_OP(m5a_identify, annotate_func, an_identify)
1082292SN/ASIMPLE_OP(m5a_getid, annotate_func, an_getid)
1092292SN/A