1 /*
2  *  Copyright(c) 2019-2021 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 v67 */
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        ) {
35         return "v67";
36     }
37     return "unknown";
38 }
39 
40 #endif
41