1/* 2 * Copyright (c) 2006 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; 9 * redistributions in binary form must reproduce the above copyright 10 * notice, this list of conditions and the following disclaimer in the 11 * documentation and/or other materials provided with the distribution; 12 * neither the name of the copyright holders nor the names of its 13 * contributors may be used to endorse or promote products derived from 14 * this software without specific prior written permission. 15 * 16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 17 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 18 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 19 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 20 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 21 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 22 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * 28 * Authors: Gabe Black 29 * Ali Saidi 30 */ 31 32#include "arch/sparc/asi.hh" 33 34namespace SparcISA 35{ 36 bool AsiIsBlock(ASI asi) 37 { 38 return 39 (asi == ASI_BLK_AIUP) || 40 (asi == ASI_BLK_AIUS) || 41 (asi == ASI_BLK_AIUP_L) || 42 (asi == ASI_BLK_AIUS_L) || 43 (asi == ASI_BLK_P) || 44 (asi == ASI_BLK_S) || 45 (asi == ASI_BLK_PL) || 46 (asi == ASI_BLK_SL); 47 } 48 49 bool AsiIsPrimary(ASI asi) 50 { 51 return 52 (asi == ASI_AIUP) || 53 (asi == ASI_BLK_AIUP) || 54 (asi == ASI_AIUP_L) || 55 (asi == ASI_BLK_AIUP_L) || 56 (asi == ASI_LDTX_AIUP) || 57 (asi == ASI_LDTX_AIUP_L) || 58 (asi == ASI_P) || 59 (asi == ASI_PNF) || 60 (asi == ASI_PL) || 61 (asi == ASI_PNFL) || 62 (asi == ASI_PST8_P) || 63 (asi == ASI_PST16_P) || 64 (asi == ASI_PST32_P) || 65 (asi == ASI_PST8_PL) || 66 (asi == ASI_PST16_PL) || 67 (asi == ASI_PST32_PL) || 68 (asi == ASI_FL8_P) || 69 (asi == ASI_FL16_P) || 70 (asi == ASI_FL8_PL) || 71 (asi == ASI_FL16_PL) || 72 (asi == ASI_LDTX_P) || 73 (asi == ASI_LDTX_PL) || 74 (asi == ASI_BLK_P) || 75 (asi == ASI_BLK_PL); 76 } 77 78 bool AsiIsSecondary(ASI asi) 79 { 80 return 81 (asi == ASI_AIUS) || 82 (asi == ASI_BLK_AIUS) || 83 (asi == ASI_AIUS_L) || 84 (asi == ASI_BLK_AIUS_L) || 85 (asi == ASI_LDTX_AIUS) || 86 (asi == ASI_LDTX_AIUS_L) || 87 (asi == ASI_S) || 88 (asi == ASI_SNF) || 89 (asi == ASI_SL) || 90 (asi == ASI_SNFL) || 91 (asi == ASI_PST8_S) || 92 (asi == ASI_PST16_S) || 93 (asi == ASI_PST32_S) || 94 (asi == ASI_PST8_SL) || 95 (asi == ASI_PST16_SL) || 96 (asi == ASI_PST32_SL) || 97 (asi == ASI_FL8_S) || 98 (asi == ASI_FL16_S) || 99 (asi == ASI_FL8_SL) || 100 (asi == ASI_FL16_SL) || 101 (asi == ASI_LDTX_S) || 102 (asi == ASI_LDTX_SL) || 103 (asi == ASI_BLK_S) || 104 (asi == ASI_BLK_SL); 105 } 106
|