17732SAli.Saidi@ARM.com/*
211411Sandreas.sandberg@arm.com * Copyright (c) 2010, 2016 ARM Limited
37732SAli.Saidi@ARM.com * All rights reserved
47732SAli.Saidi@ARM.com *
57732SAli.Saidi@ARM.com * The license below extends only to copyright in the software and shall
67732SAli.Saidi@ARM.com * not be construed as granting a license to any other intellectual
77732SAli.Saidi@ARM.com * property including but not limited to intellectual property relating
87732SAli.Saidi@ARM.com * to a hardware implementation of the functionality of the software
97732SAli.Saidi@ARM.com * licensed hereunder.  You may use the software subject to the license
107732SAli.Saidi@ARM.com * terms below provided that you ensure that this notice is replicated
117732SAli.Saidi@ARM.com * unmodified and in its entirety in all distributions of the software,
127732SAli.Saidi@ARM.com * modified or unmodified, in source code or in binary form.
137732SAli.Saidi@ARM.com *
147732SAli.Saidi@ARM.com * Copyright (c) 2003-2006 The Regents of The University of Michigan
157732SAli.Saidi@ARM.com * All rights reserved.
167732SAli.Saidi@ARM.com *
177732SAli.Saidi@ARM.com * Redistribution and use in source and binary forms, with or without
187732SAli.Saidi@ARM.com * modification, are permitted provided that the following conditions are
197732SAli.Saidi@ARM.com * met: redistributions of source code must retain the above copyright
207732SAli.Saidi@ARM.com * notice, this list of conditions and the following disclaimer;
217732SAli.Saidi@ARM.com * redistributions in binary form must reproduce the above copyright
227732SAli.Saidi@ARM.com * notice, this list of conditions and the following disclaimer in the
237732SAli.Saidi@ARM.com * documentation and/or other materials provided with the distribution;
247732SAli.Saidi@ARM.com * neither the name of the copyright holders nor the names of its
257732SAli.Saidi@ARM.com * contributors may be used to endorse or promote products derived from
267732SAli.Saidi@ARM.com * this software without specific prior written permission.
277732SAli.Saidi@ARM.com *
287732SAli.Saidi@ARM.com * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
297732SAli.Saidi@ARM.com * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
307732SAli.Saidi@ARM.com * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
317732SAli.Saidi@ARM.com * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
327732SAli.Saidi@ARM.com * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
337732SAli.Saidi@ARM.com * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
347732SAli.Saidi@ARM.com * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
357732SAli.Saidi@ARM.com * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
367732SAli.Saidi@ARM.com * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
377732SAli.Saidi@ARM.com * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
387732SAli.Saidi@ARM.com * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
397732SAli.Saidi@ARM.com *
407732SAli.Saidi@ARM.com * Authors: Nathan Binkert
417732SAli.Saidi@ARM.com *          Ali Saidi
427732SAli.Saidi@ARM.com *          Chander Sudanthi
439660SAndreas.Sandberg@ARM.com *          Andreas Sandberg
447732SAli.Saidi@ARM.com */
458987SAli.Saidi@ARM.com.syntax unified
468987SAli.Saidi@ARM.com#ifdef __thumb__
478987SAli.Saidi@ARM.com.thumb
488987SAli.Saidi@ARM.com#endif
497732SAli.Saidi@ARM.com
5012157Sandreas.sandberg@arm.com#include <gem5/asm/generic/m5ops.h>
517732SAli.Saidi@ARM.com
527732SAli.Saidi@ARM.com.text
537732SAli.Saidi@ARM.com
5411411Sandreas.sandberg@arm.com.macro m5op_func name, func, subfunc
559686Sandreas@sandberg.pp.se        .align 2
569660SAndreas.Sandberg@ARM.com        .globl \name
579660SAndreas.Sandberg@ARM.com\name:
589660SAndreas.Sandberg@ARM.com#ifdef __thumb__
599660SAndreas.Sandberg@ARM.com        .short 0xEE00 | \func
609660SAndreas.Sandberg@ARM.com        .short 0x0110 | (\subfunc << 12)
619660SAndreas.Sandberg@ARM.com#else
629949SAli.Saidi@ARM.com        .long 0xEE000110 | (\func << 16) | (\subfunc << 12)
639660SAndreas.Sandberg@ARM.com#endif
649949SAli.Saidi@ARM.com        mov pc,lr
659660SAndreas.Sandberg@ARM.com.endm
667732SAli.Saidi@ARM.com
6711411Sandreas.sandberg@arm.com.text
6811411Sandreas.sandberg@arm.com#define M5OP(name, func, subfunc) m5op_func name, func, subfunc
6912157Sandreas.sandberg@arm.com        M5OP_FOREACH
709660SAndreas.Sandberg@ARM.com
7112157Sandreas.sandberg@arm.com#define M5_ANNOTATION(name, ann) m5op_func name, M5OP_ANNOTATE, ann
7212157Sandreas.sandberg@arm.com        M5OP_FOREACH_ANNOTATION
73