GNU Binutils with patches for OS216
Revisión | 1e9d41d49f7f0b9e7381e8bf8ce848f8a33b8fde (tree) |
---|---|
Tiempo | 2017-02-24 00:53:16 |
Autor | Sheldon Lobo <sheldon.lobo@orac...> |
Commiter | Jose E. Marchesi |
opcodes,gas: associate SPARC ASIs with an architecture level.
With this change an architecture level bump due to assembly ASIs will show
up as a warning/error depending on options passed to gas.
Tested with sparc64-linux-gnu, and it does not introduce any regressions.
gas/ChangeLog:
Add support for associating SPARC ASIs with an architecture level.
* config/tc-sparc.c (parse_sparc_asi): New encode SPARC ASIs.
opcodes/ChangeLog:
Add support for associating SPARC ASIs with an architecture level.
* include/opcode/sparc.h (sparc_asi): New sparc_asi struct.
* opcodes/sparc-opc.c (asi_table): Updated asi_table and encoding/
decoding of SPARC ASIs.
@@ -1,3 +1,8 @@ | ||
1 | +2017-02-23 Sheldon Lobo <sheldon.lobo@oracle.com> | |
2 | + | |
3 | + Add support for associating SPARC ASIs with an architecture level. | |
4 | + * config/tc-sparc.c (parse_sparc_asi): New encode SPARC ASIs. | |
5 | + | |
1 | 6 | 2017-02-23 Jan Beulich <jbeulich@suse.com> |
2 | 7 | |
3 | 8 | * testsuite/gas/all/err-sizeof.s: Don't use sums or differences |
@@ -36,6 +36,7 @@ | ||
36 | 36 | #define U0x80000000 ((((unsigned long) 1 << 16) << 15)) |
37 | 37 | |
38 | 38 | static int sparc_ip (char *, const struct sparc_opcode **); |
39 | +static int parse_sparc_asi (char **, const sparc_asi **); | |
39 | 40 | static int parse_keyword_arg (int (*) (const char *), char **, int *); |
40 | 41 | static int parse_const_expr_arg (char **, int *); |
41 | 42 | static int get_expression (char *); |
@@ -1764,6 +1765,7 @@ sparc_ip (char *str, const struct sparc_opcode **pinsn) | ||
1764 | 1765 | int comma = 0; |
1765 | 1766 | int v9_arg_p; |
1766 | 1767 | int special_case = SPECIAL_CASE_NONE; |
1768 | + const sparc_asi *sasi = NULL; | |
1767 | 1769 | |
1768 | 1770 | s = str; |
1769 | 1771 | if (ISLOWER (*s)) |
@@ -2969,11 +2971,12 @@ sparc_ip (char *str, const struct sparc_opcode **pinsn) | ||
2969 | 2971 | /* Parse an asi. */ |
2970 | 2972 | if (*s == '#') |
2971 | 2973 | { |
2972 | - if (! parse_keyword_arg (sparc_encode_asi, &s, &asi)) | |
2974 | + if (! parse_sparc_asi (&s, &sasi)) | |
2973 | 2975 | { |
2974 | 2976 | error_message = _(": invalid ASI name"); |
2975 | 2977 | goto error; |
2976 | 2978 | } |
2979 | + asi = sasi->value; | |
2977 | 2980 | } |
2978 | 2981 | else |
2979 | 2982 | { |
@@ -3147,8 +3150,18 @@ sparc_ip (char *str, const struct sparc_opcode **pinsn) | ||
3147 | 3150 | else |
3148 | 3151 | { |
3149 | 3152 | /* We have a match. Now see if the architecture is OK. */ |
3153 | + /* String to use in case of architecture warning. */ | |
3154 | + const char *msg_str = str; | |
3150 | 3155 | int needed_arch_mask = insn->architecture; |
3151 | - bfd_uint64_t hwcaps | |
3156 | + | |
3157 | + /* Include the ASI architecture needed as well */ | |
3158 | + if (sasi && needed_arch_mask > sasi->architecture) | |
3159 | + { | |
3160 | + needed_arch_mask = sasi->architecture; | |
3161 | + msg_str = sasi->name; | |
3162 | + } | |
3163 | + | |
3164 | + bfd_uint64_t hwcaps | |
3152 | 3165 | = (((bfd_uint64_t) insn->hwcaps2) << 32) | insn->hwcaps; |
3153 | 3166 | |
3154 | 3167 | #if defined(OBJ_ELF) && !defined(TE_SOLARIS) |
@@ -3183,7 +3196,7 @@ sparc_ip (char *str, const struct sparc_opcode **pinsn) | ||
3183 | 3196 | as_warn (_("architecture bumped from \"%s\" to \"%s\" on \"%s\""), |
3184 | 3197 | sparc_opcode_archs[current_architecture].name, |
3185 | 3198 | sparc_opcode_archs[needed_architecture].name, |
3186 | - str); | |
3199 | + msg_str); | |
3187 | 3200 | warn_after_architecture = needed_architecture; |
3188 | 3201 | } |
3189 | 3202 | current_architecture = needed_architecture; |
@@ -3247,6 +3260,35 @@ sparc_ip (char *str, const struct sparc_opcode **pinsn) | ||
3247 | 3260 | return special_case; |
3248 | 3261 | } |
3249 | 3262 | |
3263 | +static char * | |
3264 | +skip_over_keyword (char *q) | |
3265 | +{ | |
3266 | + for (q = q + (*q == '#' || *q == '%'); | |
3267 | + ISALNUM (*q) || *q == '_'; | |
3268 | + ++q) | |
3269 | + continue; | |
3270 | + return q; | |
3271 | +} | |
3272 | + | |
3273 | +static int | |
3274 | +parse_sparc_asi (char **input_pointer_p, const sparc_asi **value_p) | |
3275 | +{ | |
3276 | + const sparc_asi *value; | |
3277 | + char c, *p, *q; | |
3278 | + | |
3279 | + p = *input_pointer_p; | |
3280 | + q = skip_over_keyword(p); | |
3281 | + c = *q; | |
3282 | + *q = 0; | |
3283 | + value = sparc_encode_asi (p); | |
3284 | + *q = c; | |
3285 | + if (value == NULL) | |
3286 | + return 0; | |
3287 | + *value_p = value; | |
3288 | + *input_pointer_p = q; | |
3289 | + return 1; | |
3290 | +} | |
3291 | + | |
3250 | 3292 | /* Parse an argument that can be expressed as a keyword. |
3251 | 3293 | (eg: #StoreStore or %ccfr). |
3252 | 3294 | The result is a boolean indicating success. |
@@ -3261,10 +3303,7 @@ parse_keyword_arg (int (*lookup_fn) (const char *), | ||
3261 | 3303 | char c, *p, *q; |
3262 | 3304 | |
3263 | 3305 | p = *input_pointerP; |
3264 | - for (q = p + (*p == '#' || *p == '%'); | |
3265 | - ISALNUM (*q) || *q == '_'; | |
3266 | - ++q) | |
3267 | - continue; | |
3306 | + q = skip_over_keyword(p); | |
3268 | 3307 | c = *q; |
3269 | 3308 | *q = 0; |
3270 | 3309 | value = (*lookup_fn) (p); |
@@ -117,6 +117,14 @@ typedef struct sparc_opcode | ||
117 | 117 | short architecture; /* Bitmask of sparc_opcode_arch_val's. */ |
118 | 118 | } sparc_opcode; |
119 | 119 | |
120 | +/* Struct for ASIs - to handle ASIs introduced in a specific architecture */ | |
121 | +typedef struct | |
122 | +{ | |
123 | + int value; | |
124 | + const char *name; | |
125 | + short architecture; | |
126 | +} sparc_asi; | |
127 | + | |
120 | 128 | /* FIXME: Add F_ANACHRONISTIC flag for v9. */ |
121 | 129 | #define F_DELAYED 0x00000001 /* Delayed branch. */ |
122 | 130 | #define F_ALIAS 0x00000002 /* Alias for a "real" instruction. */ |
@@ -296,7 +304,7 @@ typedef struct sparc_opcode | ||
296 | 304 | extern const struct sparc_opcode sparc_opcodes[]; |
297 | 305 | extern const int sparc_num_opcodes; |
298 | 306 | |
299 | -extern int sparc_encode_asi (const char *); | |
307 | +extern const sparc_asi *sparc_encode_asi (const char *); | |
300 | 308 | extern const char *sparc_decode_asi (int); |
301 | 309 | extern int sparc_encode_membar (const char *); |
302 | 310 | extern const char *sparc_decode_membar (int); |
@@ -1,3 +1,10 @@ | ||
1 | +2017-02-23 Sheldon Lobo <sheldon.lobo@oracle.com> | |
2 | + | |
3 | + Add support for associating SPARC ASIs with an architecture level. | |
4 | + * include/opcode/sparc.h (sparc_asi): New sparc_asi struct. | |
5 | + * opcodes/sparc-opc.c (asi_table): Updated asi_table and encoding/ | |
6 | + decoding of SPARC ASIs. | |
7 | + | |
1 | 8 | 2017-02-23 Jan Beulich <jbeulich@suse.com> |
2 | 9 | |
3 | 10 | * i386-dis.c (get_valid_dis386): Don't special case VEX opcode |
@@ -2262,6 +2262,195 @@ IMPDEP ("impdep2", 0x37), | ||
2262 | 2262 | |
2263 | 2263 | const int sparc_num_opcodes = ((sizeof sparc_opcodes)/(sizeof sparc_opcodes[0])); |
2264 | 2264 | |
2265 | +/* Handle ASI's. */ | |
2266 | + | |
2267 | +static sparc_asi asi_table[] = | |
2268 | +{ | |
2269 | + /* These are in the v9 architecture manual. */ | |
2270 | + /* The shorter versions appear first, they're here because Sun's as has them. | |
2271 | + Sun's as uses #ASI_P_L instead of #ASI_PL (which appears in the | |
2272 | + UltraSPARC architecture manual). */ | |
2273 | + { 0x04, "#ASI_N", v9 }, | |
2274 | + { 0x0c, "#ASI_N_L", v9 }, | |
2275 | + { 0x10, "#ASI_AIUP", v9 }, | |
2276 | + { 0x11, "#ASI_AIUS", v9 }, | |
2277 | + { 0x18, "#ASI_AIUP_L", v9 }, | |
2278 | + { 0x19, "#ASI_AIUS_L", v9 }, | |
2279 | + { 0x80, "#ASI_P", v9 }, | |
2280 | + { 0x81, "#ASI_S", v9 }, | |
2281 | + { 0x82, "#ASI_PNF", v9 }, | |
2282 | + { 0x83, "#ASI_SNF", v9 }, | |
2283 | + { 0x88, "#ASI_P_L", v9 }, | |
2284 | + { 0x89, "#ASI_S_L", v9 }, | |
2285 | + { 0x8a, "#ASI_PNF_L", v9 }, | |
2286 | + { 0x8b, "#ASI_SNF_L", v9 }, | |
2287 | + { 0x04, "#ASI_NUCLEUS", v9 }, | |
2288 | + { 0x0c, "#ASI_NUCLEUS_LITTLE", v9 }, | |
2289 | + { 0x10, "#ASI_AS_IF_USER_PRIMARY", v9 }, | |
2290 | + { 0x11, "#ASI_AS_IF_USER_SECONDARY", v9 }, | |
2291 | + { 0x18, "#ASI_AS_IF_USER_PRIMARY_LITTLE", v9 }, | |
2292 | + { 0x19, "#ASI_AS_IF_USER_SECONDARY_LITTLE", v9 }, | |
2293 | + { 0x80, "#ASI_PRIMARY", v9 }, | |
2294 | + { 0x81, "#ASI_SECONDARY", v9 }, | |
2295 | + { 0x82, "#ASI_PRIMARY_NOFAULT", v9 }, | |
2296 | + { 0x83, "#ASI_SECONDARY_NOFAULT", v9 }, | |
2297 | + { 0x88, "#ASI_PRIMARY_LITTLE", v9 }, | |
2298 | + { 0x89, "#ASI_SECONDARY_LITTLE", v9 }, | |
2299 | + { 0x8a, "#ASI_PRIMARY_NOFAULT_LITTLE", v9 }, | |
2300 | + { 0x8b, "#ASI_SECONDARY_NOFAULT_LITTLE", v9 }, | |
2301 | + /* These are UltraSPARC and Niagara extensions. */ | |
2302 | + { 0x14, "#ASI_PHYS_USE_EC", v9b }, | |
2303 | + { 0x15, "#ASI_PHYS_BYPASS_EC_E", v9b }, | |
2304 | + { 0x16, "#ASI_BLK_AIUP_4V", v9c }, | |
2305 | + { 0x17, "#ASI_BLK_AIUS_4V", v9c }, | |
2306 | + { 0x1c, "#ASI_PHYS_USE_EC_L", v9b }, | |
2307 | + { 0x1d, "#ASI_PHYS_BYPASS_EC_E_L", v9b }, | |
2308 | + { 0x1e, "#ASI_BLK_AIUP_L_4V", v9c }, | |
2309 | + { 0x1f, "#ASI_BLK_AIUS_L_4V", v9c }, | |
2310 | + { 0x20, "#ASI_SCRATCHPAD", v9c }, | |
2311 | + { 0x21, "#ASI_MMU", v9c }, | |
2312 | + { 0x23, "#ASI_BLK_INIT_QUAD_LDD_AIUS", v9c }, | |
2313 | + { 0x24, "#ASI_NUCLEUS_QUAD_LDD", v9b }, | |
2314 | + { 0x25, "#ASI_QUEUE", v9c }, | |
2315 | + { 0x26, "#ASI_QUAD_LDD_PHYS_4V", v9c }, | |
2316 | + { 0x2c, "#ASI_NUCLEUS_QUAD_LDD_L", v9b }, | |
2317 | + { 0x30, "#ASI_PCACHE_DATA_STATUS", v9b }, | |
2318 | + { 0x31, "#ASI_PCACHE_DATA", v9b }, | |
2319 | + { 0x32, "#ASI_PCACHE_TAG", v9b }, | |
2320 | + { 0x33, "#ASI_PCACHE_SNOOP_TAG", v9b }, | |
2321 | + { 0x34, "#ASI_QUAD_LDD_PHYS", v9b }, | |
2322 | + { 0x38, "#ASI_WCACHE_VALID_BITS", v9b }, | |
2323 | + { 0x39, "#ASI_WCACHE_DATA", v9b }, | |
2324 | + { 0x3a, "#ASI_WCACHE_TAG", v9b }, | |
2325 | + { 0x3b, "#ASI_WCACHE_SNOOP_TAG", v9b }, | |
2326 | + { 0x3c, "#ASI_QUAD_LDD_PHYS_L", v9b }, | |
2327 | + { 0x40, "#ASI_SRAM_FAST_INIT", v9b }, | |
2328 | + { 0x41, "#ASI_CORE_AVAILABLE", v9b }, | |
2329 | + { 0x41, "#ASI_CORE_ENABLE_STAT", v9b }, | |
2330 | + { 0x41, "#ASI_CORE_ENABLE", v9b }, | |
2331 | + { 0x41, "#ASI_XIR_STEERING", v9b }, | |
2332 | + { 0x41, "#ASI_CORE_RUNNING_RW", v9b }, | |
2333 | + { 0x41, "#ASI_CORE_RUNNING_W1S", v9b }, | |
2334 | + { 0x41, "#ASI_CORE_RUNNING_W1C", v9b }, | |
2335 | + { 0x41, "#ASI_CORE_RUNNING_STAT", v9b }, | |
2336 | + { 0x41, "#ASI_CMT_ERROR_STEERING", v9b }, | |
2337 | + { 0x45, "#ASI_LSU_CONTROL_REG", v9b }, | |
2338 | + { 0x45, "#ASI_DCU_CONTROL_REG", v9b }, | |
2339 | + { 0x46, "#ASI_DCACHE_DATA", v9b }, | |
2340 | + { 0x47, "#ASI_DCACHE_TAG", v9b }, | |
2341 | + { 0x48, "#ASI_INTR_DISPATCH_STAT", v9b }, | |
2342 | + { 0x49, "#ASI_INTR_RECEIVE", v9b }, | |
2343 | + { 0x4b, "#ASI_ESTATE_ERROR_EN", v9b }, | |
2344 | + { 0x4c, "#ASI_AFSR", v9b }, | |
2345 | + { 0x4d, "#ASI_AFAR", v9b }, | |
2346 | + { 0x4e, "#ASI_EC_TAG_DATA", v9b }, | |
2347 | + { 0x50, "#ASI_IMMU", v9b }, | |
2348 | + { 0x51, "#ASI_IMMU_TSB_8KB_PTR", v9b }, | |
2349 | + { 0x52, "#ASI_IMMU_TSB_64KB_PTR", v9b }, | |
2350 | + { 0x54, "#ASI_ITLB_DATA_IN", v9b }, | |
2351 | + { 0x55, "#ASI_ITLB_DATA_ACCESS", v9b }, | |
2352 | + { 0x56, "#ASI_ITLB_TAG_READ", v9b }, | |
2353 | + { 0x57, "#ASI_IMMU_DEMAP", v9b }, | |
2354 | + { 0x58, "#ASI_DMMU", v9b }, | |
2355 | + { 0x59, "#ASI_DMMU_TSB_8KB_PTR", v9b }, | |
2356 | + { 0x5a, "#ASI_DMMU_TSB_64KB_PTR", v9b }, | |
2357 | + { 0x5b, "#ASI_DMMU_TSB_DIRECT_PTR", v9b }, | |
2358 | + { 0x5c, "#ASI_DTLB_DATA_IN", v9b }, | |
2359 | + { 0x5d, "#ASI_DTLB_DATA_ACCESS", v9b }, | |
2360 | + { 0x5e, "#ASI_DTLB_TAG_READ", v9b }, | |
2361 | + { 0x5f, "#ASI_DMMU_DEMAP", v9b }, | |
2362 | + { 0x60, "#ASI_IIU_INST_TRAP", v9b }, | |
2363 | + { 0x63, "#ASI_INTR_ID", v9b }, | |
2364 | + { 0x63, "#ASI_CORE_ID", v9b }, | |
2365 | + { 0x63, "#ASI_CESR_ID", v9b }, | |
2366 | + { 0x66, "#ASI_IC_INSTR", v9b }, | |
2367 | + { 0x67, "#ASI_IC_TAG", v9b }, | |
2368 | + { 0x68, "#ASI_IC_STAG", v9b }, | |
2369 | + { 0x6f, "#ASI_BRPRED_ARRAY", v9b }, | |
2370 | + { 0x70, "#ASI_BLK_AIUP", v9b }, | |
2371 | + { 0x71, "#ASI_BLK_AIUS", v9b }, | |
2372 | + { 0x72, "#ASI_MCU_CTRL_REG", v9b }, | |
2373 | + { 0x74, "#ASI_EC_DATA", v9b }, | |
2374 | + { 0x75, "#ASI_EC_CTRL", v9b }, | |
2375 | + { 0x76, "#ASI_EC_W", v9b }, | |
2376 | + { 0x77, "#ASI_INTR_W", v9b }, | |
2377 | + { 0x77, "#ASI_INTR_DATAN_W", v9b }, | |
2378 | + { 0x77, "#ASI_INTR_DISPATCH_W", v9b }, | |
2379 | + { 0x78, "#ASI_BLK_AIUPL", v9b }, | |
2380 | + { 0x79, "#ASI_BLK_AIUSL", v9b }, | |
2381 | + { 0x7e, "#ASI_EC_R", v9b }, | |
2382 | + { 0x7f, "#ASI_INTR_R", v9b }, | |
2383 | + { 0x7f, "#ASI_INTR_DATAN_R", v9b }, | |
2384 | + { 0xc0, "#ASI_PST8_P", v9b }, | |
2385 | + { 0xc1, "#ASI_PST8_S", v9b }, | |
2386 | + { 0xc2, "#ASI_PST16_P", v9b }, | |
2387 | + { 0xc3, "#ASI_PST16_S", v9b }, | |
2388 | + { 0xc4, "#ASI_PST32_P", v9b }, | |
2389 | + { 0xc5, "#ASI_PST32_S", v9b }, | |
2390 | + { 0xc8, "#ASI_PST8_PL", v9b }, | |
2391 | + { 0xc9, "#ASI_PST8_SL", v9b }, | |
2392 | + { 0xca, "#ASI_PST16_PL", v9b }, | |
2393 | + { 0xcb, "#ASI_PST16_SL", v9b }, | |
2394 | + { 0xcc, "#ASI_PST32_PL", v9b }, | |
2395 | + { 0xcd, "#ASI_PST32_SL", v9b }, | |
2396 | + { 0xd0, "#ASI_FL8_P", v9b }, | |
2397 | + { 0xd1, "#ASI_FL8_S", v9b }, | |
2398 | + { 0xd2, "#ASI_FL16_P", v9b }, | |
2399 | + { 0xd3, "#ASI_FL16_S", v9b }, | |
2400 | + { 0xd8, "#ASI_FL8_PL", v9b }, | |
2401 | + { 0xd9, "#ASI_FL8_SL", v9b }, | |
2402 | + { 0xda, "#ASI_FL16_PL", v9b }, | |
2403 | + { 0xdb, "#ASI_FL16_SL", v9b }, | |
2404 | + { 0xe0, "#ASI_BLK_COMMIT_P", v9b }, | |
2405 | + { 0xe1, "#ASI_BLK_COMMIT_S", v9b }, | |
2406 | + { 0xe2, "#ASI_BLK_INIT_QUAD_LDD_P", v9b }, | |
2407 | + { 0xf0, "#ASI_BLK_P", v9b }, | |
2408 | + { 0xf1, "#ASI_BLK_S", v9b }, | |
2409 | + { 0xf8, "#ASI_BLK_PL", v9b }, | |
2410 | + { 0xf9, "#ASI_BLK_SL", v9b }, | |
2411 | + { 0x22, "#ASI_TWINX_AIUP", v9c }, | |
2412 | + { 0x23, "#ASI_TWINX_AIUS", v9c }, | |
2413 | + { 0x26, "#ASI_TWINX_REAL", v9c }, | |
2414 | + { 0x27, "#ASI_TWINX_N", v9c }, | |
2415 | + { 0x2A, "#ASI_TWINX_AIUP_L", v9c }, | |
2416 | + { 0x2B, "#ASI_TWINX_AIUS_L", v9c }, | |
2417 | + { 0x2E, "#ASI_TWINX_REAL_L", v9c }, | |
2418 | + { 0x2F, "#ASI_TWINX_NL", v9c }, | |
2419 | + { 0xE2, "#ASI_TWINX_P", v9c }, | |
2420 | + { 0xE3, "#ASI_TWINX_S", v9c }, | |
2421 | + { 0xEA, "#ASI_TWINX_PL", v9c }, | |
2422 | + { 0xEB, "#ASI_TWINX_SL", v9c }, | |
2423 | + { 0, 0, 0 } | |
2424 | +}; | |
2425 | + | |
2426 | +/* Return the a pointer to the matching sparc_asi struct, NULL if not found. */ | |
2427 | + | |
2428 | +const sparc_asi * | |
2429 | +sparc_encode_asi (const char *name) | |
2430 | +{ | |
2431 | + const sparc_asi *p; | |
2432 | + | |
2433 | + for (p = asi_table; p->name; ++p) | |
2434 | + if (strcmp (name, p->name) == 0) | |
2435 | + return p; | |
2436 | + | |
2437 | + return NULL; | |
2438 | +} | |
2439 | + | |
2440 | +/* Return the name for ASI value VALUE or NULL if not found. */ | |
2441 | + | |
2442 | +const char * | |
2443 | +sparc_decode_asi (int value) | |
2444 | +{ | |
2445 | + const sparc_asi *p; | |
2446 | + | |
2447 | + for (p = asi_table; p->name; ++p) | |
2448 | + if (value == p->value) | |
2449 | + return p->name; | |
2450 | + | |
2451 | + return NULL; | |
2452 | +} | |
2453 | + | |
2265 | 2454 | /* Utilities for argument parsing. */ |
2266 | 2455 | |
2267 | 2456 | typedef struct |
@@ -2297,202 +2486,7 @@ lookup_value (const arg *table, int value) | ||
2297 | 2486 | |
2298 | 2487 | return NULL; |
2299 | 2488 | } |
2300 | - | |
2301 | -/* Handle ASI's. */ | |
2302 | - | |
2303 | -static arg asi_table[] = | |
2304 | -{ | |
2305 | - /* These are in the v9 architecture manual. */ | |
2306 | - /* The shorter versions appear first, they're here because Sun's as has them. | |
2307 | - Sun's as uses #ASI_P_L instead of #ASI_PL (which appears in the | |
2308 | - UltraSPARC architecture manual). */ | |
2309 | - { 0x04, "#ASI_N" }, | |
2310 | - { 0x0c, "#ASI_N_L" }, | |
2311 | - { 0x10, "#ASI_AIUP" }, | |
2312 | - { 0x11, "#ASI_AIUS" }, | |
2313 | - { 0x18, "#ASI_AIUP_L" }, | |
2314 | - { 0x19, "#ASI_AIUS_L" }, | |
2315 | - { 0x80, "#ASI_P" }, | |
2316 | - { 0x81, "#ASI_S" }, | |
2317 | - { 0x82, "#ASI_PNF" }, | |
2318 | - { 0x83, "#ASI_SNF" }, | |
2319 | - { 0x88, "#ASI_P_L" }, | |
2320 | - { 0x89, "#ASI_S_L" }, | |
2321 | - { 0x8a, "#ASI_PNF_L" }, | |
2322 | - { 0x8b, "#ASI_SNF_L" }, | |
2323 | - { 0x04, "#ASI_NUCLEUS" }, | |
2324 | - { 0x0c, "#ASI_NUCLEUS_LITTLE" }, | |
2325 | - { 0x10, "#ASI_AS_IF_USER_PRIMARY" }, | |
2326 | - { 0x11, "#ASI_AS_IF_USER_SECONDARY" }, | |
2327 | - { 0x18, "#ASI_AS_IF_USER_PRIMARY_LITTLE" }, | |
2328 | - { 0x19, "#ASI_AS_IF_USER_SECONDARY_LITTLE" }, | |
2329 | - { 0x80, "#ASI_PRIMARY" }, | |
2330 | - { 0x81, "#ASI_SECONDARY" }, | |
2331 | - { 0x82, "#ASI_PRIMARY_NOFAULT" }, | |
2332 | - { 0x83, "#ASI_SECONDARY_NOFAULT" }, | |
2333 | - { 0x88, "#ASI_PRIMARY_LITTLE" }, | |
2334 | - { 0x89, "#ASI_SECONDARY_LITTLE" }, | |
2335 | - { 0x8a, "#ASI_PRIMARY_NOFAULT_LITTLE" }, | |
2336 | - { 0x8b, "#ASI_SECONDARY_NOFAULT_LITTLE" }, | |
2337 | - /* These are UltraSPARC and Niagara extensions. */ | |
2338 | - { 0x14, "#ASI_PHYS_USE_EC" }, | |
2339 | - { 0x15, "#ASI_PHYS_BYPASS_EC_E" }, | |
2340 | - { 0x16, "#ASI_BLK_AIUP_4V" }, | |
2341 | - { 0x17, "#ASI_BLK_AIUS_4V" }, | |
2342 | - { 0x1c, "#ASI_PHYS_USE_EC_L" }, | |
2343 | - { 0x1d, "#ASI_PHYS_BYPASS_EC_E_L" }, | |
2344 | - { 0x1e, "#ASI_BLK_AIUP_L_4V" }, | |
2345 | - { 0x1f, "#ASI_BLK_AIUS_L_4V" }, | |
2346 | - { 0x20, "#ASI_SCRATCHPAD" }, | |
2347 | - { 0x21, "#ASI_MMU" }, | |
2348 | - { 0x23, "#ASI_BLK_INIT_QUAD_LDD_AIUS" }, | |
2349 | - { 0x24, "#ASI_NUCLEUS_QUAD_LDD" }, | |
2350 | - { 0x25, "#ASI_QUEUE" }, | |
2351 | - { 0x26, "#ASI_QUAD_LDD_PHYS_4V" }, | |
2352 | - { 0x2c, "#ASI_NUCLEUS_QUAD_LDD_L" }, | |
2353 | - { 0x30, "#ASI_PCACHE_DATA_STATUS" }, | |
2354 | - { 0x31, "#ASI_PCACHE_DATA" }, | |
2355 | - { 0x32, "#ASI_PCACHE_TAG" }, | |
2356 | - { 0x33, "#ASI_PCACHE_SNOOP_TAG" }, | |
2357 | - { 0x34, "#ASI_QUAD_LDD_PHYS" }, | |
2358 | - { 0x38, "#ASI_WCACHE_VALID_BITS" }, | |
2359 | - { 0x39, "#ASI_WCACHE_DATA" }, | |
2360 | - { 0x3a, "#ASI_WCACHE_TAG" }, | |
2361 | - { 0x3b, "#ASI_WCACHE_SNOOP_TAG" }, | |
2362 | - { 0x3c, "#ASI_QUAD_LDD_PHYS_L" }, | |
2363 | - { 0x40, "#ASI_SRAM_FAST_INIT" }, | |
2364 | - { 0x41, "#ASI_CORE_AVAILABLE" }, | |
2365 | - { 0x41, "#ASI_CORE_ENABLE_STAT" }, | |
2366 | - { 0x41, "#ASI_CORE_ENABLE" }, | |
2367 | - { 0x41, "#ASI_XIR_STEERING" }, | |
2368 | - { 0x41, "#ASI_CORE_RUNNING_RW" }, | |
2369 | - { 0x41, "#ASI_CORE_RUNNING_W1S" }, | |
2370 | - { 0x41, "#ASI_CORE_RUNNING_W1C" }, | |
2371 | - { 0x41, "#ASI_CORE_RUNNING_STAT" }, | |
2372 | - { 0x41, "#ASI_CMT_ERROR_STEERING" }, | |
2373 | - { 0x41, "#ASI_DCACHE_INVALIDATE" }, | |
2374 | - { 0x41, "#ASI_DCACHE_UTAG" }, | |
2375 | - { 0x41, "#ASI_DCACHE_SNOOP_TAG" }, | |
2376 | - { 0x42, "#ASI_DCACHE_INVALIDATE" }, | |
2377 | - { 0x43, "#ASI_DCACHE_UTAG" }, | |
2378 | - { 0x44, "#ASI_DCACHE_SNOOP_TAG" }, | |
2379 | - { 0x45, "#ASI_LSU_CONTROL_REG" }, | |
2380 | - { 0x45, "#ASI_DCU_CONTROL_REG" }, | |
2381 | - { 0x46, "#ASI_DCACHE_DATA" }, | |
2382 | - { 0x47, "#ASI_DCACHE_TAG" }, | |
2383 | - { 0x48, "#ASI_INTR_DISPATCH_STAT" }, | |
2384 | - { 0x49, "#ASI_INTR_RECEIVE" }, | |
2385 | - { 0x4a, "#ASI_UPA_CONFIG" }, | |
2386 | - { 0x4a, "#ASI_JBUS_CONFIG" }, | |
2387 | - { 0x4a, "#ASI_SAFARI_CONFIG" }, | |
2388 | - { 0x4a, "#ASI_SAFARI_ADDRESS" }, | |
2389 | - { 0x4b, "#ASI_ESTATE_ERROR_EN" }, | |
2390 | - { 0x4c, "#ASI_AFSR" }, | |
2391 | - { 0x4d, "#ASI_AFAR" }, | |
2392 | - { 0x4e, "#ASI_EC_TAG_DATA" }, | |
2393 | - { 0x50, "#ASI_IMMU" }, | |
2394 | - { 0x51, "#ASI_IMMU_TSB_8KB_PTR" }, | |
2395 | - { 0x52, "#ASI_IMMU_TSB_16KB_PTR" }, | |
2396 | - { 0x54, "#ASI_ITLB_DATA_IN" }, | |
2397 | - { 0x55, "#ASI_ITLB_DATA_ACCESS" }, | |
2398 | - { 0x56, "#ASI_ITLB_TAG_READ" }, | |
2399 | - { 0x57, "#ASI_IMMU_DEMAP" }, | |
2400 | - { 0x58, "#ASI_DMMU" }, | |
2401 | - { 0x59, "#ASI_DMMU_TSB_8KB_PTR" }, | |
2402 | - { 0x5a, "#ASI_DMMU_TSB_64KB_PTR" }, | |
2403 | - { 0x5b, "#ASI_DMMU_TSB_DIRECT_PTR" }, | |
2404 | - { 0x5c, "#ASI_DTLB_DATA_IN" }, | |
2405 | - { 0x5d, "#ASI_DTLB_DATA_ACCESS" }, | |
2406 | - { 0x5e, "#ASI_DTLB_TAG_READ" }, | |
2407 | - { 0x5f, "#ASI_DMMU_DEMAP" }, | |
2408 | - { 0x60, "#ASI_IIU_INST_TRAP" }, | |
2409 | - { 0x63, "#ASI_INTR_ID" }, | |
2410 | - { 0x63, "#ASI_CORE_ID" }, | |
2411 | - { 0x63, "#ASI_CESR_ID" }, | |
2412 | - { 0x66, "#ASI_IC_INSTR" }, | |
2413 | - { 0x67, "#ASI_IC_TAG" }, | |
2414 | - { 0x68, "#ASI_IC_STAG" }, | |
2415 | - { 0x6e, "#ASI_IC_PRE_DECODE" }, | |
2416 | - { 0x6f, "#ASI_IC_NEXT_FIELD" }, | |
2417 | - { 0x6f, "#ASI_BRPRED_ARRAY" }, | |
2418 | - { 0x70, "#ASI_BLK_AIUP" }, | |
2419 | - { 0x71, "#ASI_BLK_AIUS" }, | |
2420 | - { 0x72, "#ASI_MCU_CTRL_REG" }, | |
2421 | - { 0x74, "#ASI_EC_DATA" }, | |
2422 | - { 0x75, "#ASI_EC_CTRL" }, | |
2423 | - { 0x76, "#ASI_EC_W" }, | |
2424 | - { 0x77, "#ASI_UDB_ERROR_W" }, | |
2425 | - { 0x77, "#ASI_UDB_CONTROL_W" }, | |
2426 | - { 0x77, "#ASI_INTR_W" }, | |
2427 | - { 0x77, "#ASI_INTR_DATAN_W" }, | |
2428 | - { 0x77, "#ASI_INTR_DISPATCH_W" }, | |
2429 | - { 0x78, "#ASI_BLK_AIUPL" }, | |
2430 | - { 0x79, "#ASI_BLK_AIUSL" }, | |
2431 | - { 0x7e, "#ASI_EC_R" }, | |
2432 | - { 0x7f, "#ASI_UDBH_ERROR_R" }, | |
2433 | - { 0x7f, "#ASI_UDBL_ERROR_R" }, | |
2434 | - { 0x7f, "#ASI_UDBH_CONTROL_R" }, | |
2435 | - { 0x7f, "#ASI_UDBL_CONTROL_R" }, | |
2436 | - { 0x7f, "#ASI_INTR_R" }, | |
2437 | - { 0x7f, "#ASI_INTR_DATAN_R" }, | |
2438 | - { 0xc0, "#ASI_PST8_P" }, | |
2439 | - { 0xc1, "#ASI_PST8_S" }, | |
2440 | - { 0xc2, "#ASI_PST16_P" }, | |
2441 | - { 0xc3, "#ASI_PST16_S" }, | |
2442 | - { 0xc4, "#ASI_PST32_P" }, | |
2443 | - { 0xc5, "#ASI_PST32_S" }, | |
2444 | - { 0xc8, "#ASI_PST8_PL" }, | |
2445 | - { 0xc9, "#ASI_PST8_SL" }, | |
2446 | - { 0xca, "#ASI_PST16_PL" }, | |
2447 | - { 0xcb, "#ASI_PST16_SL" }, | |
2448 | - { 0xcc, "#ASI_PST32_PL" }, | |
2449 | - { 0xcd, "#ASI_PST32_SL" }, | |
2450 | - { 0xd0, "#ASI_FL8_P" }, | |
2451 | - { 0xd1, "#ASI_FL8_S" }, | |
2452 | - { 0xd2, "#ASI_FL16_P" }, | |
2453 | - { 0xd3, "#ASI_FL16_S" }, | |
2454 | - { 0xd8, "#ASI_FL8_PL" }, | |
2455 | - { 0xd9, "#ASI_FL8_SL" }, | |
2456 | - { 0xda, "#ASI_FL16_PL" }, | |
2457 | - { 0xdb, "#ASI_FL16_SL" }, | |
2458 | - { 0xe0, "#ASI_BLK_COMMIT_P", }, | |
2459 | - { 0xe1, "#ASI_BLK_COMMIT_S", }, | |
2460 | - { 0xe2, "#ASI_BLK_INIT_QUAD_LDD_P" }, | |
2461 | - { 0xf0, "#ASI_BLK_P", }, | |
2462 | - { 0xf1, "#ASI_BLK_S", }, | |
2463 | - { 0xf8, "#ASI_BLK_PL", }, | |
2464 | - { 0xf9, "#ASI_BLK_SL", }, | |
2465 | - { 0x22, "#ASI_TWINX_AIUP", }, | |
2466 | - { 0x23, "#ASI_TWINX_AIUS", }, | |
2467 | - { 0x26, "#ASI_TWINX_REAL", }, | |
2468 | - { 0x27, "#ASI_TWINX_N", }, | |
2469 | - { 0x2A, "#ASI_TWINX_AIUP_L", }, | |
2470 | - { 0x2B, "#ASI_TWINX_AIUS_L", }, | |
2471 | - { 0x2E, "#ASI_TWINX_REAL_L", }, | |
2472 | - { 0x2F, "#ASI_TWINX_NL", }, | |
2473 | - { 0xE2, "#ASI_TWINX_P", }, | |
2474 | - { 0xE3, "#ASI_TWINX_S", }, | |
2475 | - { 0xEA, "#ASI_TWINX_PL", }, | |
2476 | - { 0xEB, "#ASI_TWINX_SL", }, | |
2477 | - { 0, 0 } | |
2478 | -}; | |
2479 | 2489 | |
2480 | -/* Return the value for ASI NAME, or -1 if not found. */ | |
2481 | - | |
2482 | -int | |
2483 | -sparc_encode_asi (const char *name) | |
2484 | -{ | |
2485 | - return lookup_name (asi_table, name); | |
2486 | -} | |
2487 | - | |
2488 | -/* Return the name for ASI value VALUE or NULL if not found. */ | |
2489 | - | |
2490 | -const char * | |
2491 | -sparc_decode_asi (int value) | |
2492 | -{ | |
2493 | - return lookup_value (asi_table, value); | |
2494 | -} | |
2495 | - | |
2496 | 2490 | /* Handle membar masks. */ |
2497 | 2491 | |
2498 | 2492 | static arg membar_table[] = |