1 /* 2 * Copyright(c) 2019-2023 Qualcomm Innovation Center, Inc. All Rights Reserved. 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; either version 2 of the License, or 7 * (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, see <http://www.gnu.org/licenses/>. 16 */ 17 18 #ifndef HEXAGON_TARGET_ELF_H 19 #define HEXAGON_TARGET_ELF_H 20 21 static inline const char *cpu_get_model(uint32_t eflags) 22 { 23 /* For now, treat anything newer than v5 as a v73 */ 24 /* FIXME - Disable instructions that are newer than the specified arch */ 25 if (eflags == 0x04 || /* v5 */ 26 eflags == 0x05 || /* v55 */ 27 eflags == 0x60 || /* v60 */ 28 eflags == 0x61 || /* v61 */ 29 eflags == 0x62 || /* v62 */ 30 eflags == 0x65 || /* v65 */ 31 eflags == 0x66 || /* v66 */ 32 eflags == 0x67 || /* v67 */ 33 eflags == 0x8067 || /* v67t */ 34 eflags == 0x68 || /* v68 */ 35 eflags == 0x69 || /* v69 */ 36 eflags == 0x71 || /* v71 */ 37 eflags == 0x8071 || /* v71t */ 38 eflags == 0x73 /* v73 */ 39 ) { 40 return "v73"; 41 } 42 return "unknown"; 43 } 44 45 #endif 46