faults.cc revision 1110
12497SN/A/*
210405Sandreas.hansson@arm.com * Copyright (c) 2003 The Regents of The University of Michigan
38711SN/A * All rights reserved.
48711SN/A *
58711SN/A * Redistribution and use in source and binary forms, with or without
68711SN/A * modification, are permitted provided that the following conditions are
78711SN/A * met: redistributions of source code must retain the above copyright
88711SN/A * notice, this list of conditions and the following disclaimer;
98711SN/A * redistributions in binary form must reproduce the above copyright
108711SN/A * notice, this list of conditions and the following disclaimer in the
118711SN/A * documentation and/or other materials provided with the distribution;
128711SN/A * neither the name of the copyright holders nor the names of its
138711SN/A * contributors may be used to endorse or promote products derived from
142497SN/A * this software without specific prior written permission.
152497SN/A *
162497SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
172497SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
182497SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
192497SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
202497SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
212497SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
222497SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
232497SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
242497SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
252497SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
262497SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
272497SN/A */
282497SN/A
292497SN/A#include "arch/alpha/faults.hh"
302497SN/A
312497SN/Anamespace {
322497SN/A    const char *
332497SN/A    fault_name[Num_Faults] = {
342497SN/A        "none",
352497SN/A        "reset",
362497SN/A        "mchk",
372497SN/A        "arith",
382497SN/A        "interrupt",
392665SN/A        "dtb_miss_single",
402665SN/A        "dtb_miss_double",
418715SN/A        "unalign",
428922SN/A        "dfault",
432497SN/A        "dfault",
442497SN/A        "itbmiss",
452497SN/A        "itbmiss",
462982SN/A        "iaccvio",
4710405Sandreas.hansson@arm.com        "opdec",
482497SN/A        "fen",
492497SN/A        "pal",
502846SN/A    };
512548SN/A}
5210405Sandreas.hansson@arm.com
5310405Sandreas.hansson@arm.comconst char *
5410405Sandreas.hansson@arm.comFaultName(int index)
552497SN/A{
5610405Sandreas.hansson@arm.com    if (index < 0 || index >= Num_Faults)
5710405Sandreas.hansson@arm.com        return 0;
587523SN/A
598851SN/A    return fault_name[index];
608948SN/A}
618948SN/A
628851SN/A