comparison gcc/config/sparc/driver-sparc.c @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
comparison
equal deleted inserted replaced
131:84e7813d76e9 145:1830386684a0
1 /* Subroutines for the gcc driver. 1 /* Subroutines for the gcc driver.
2 Copyright (C) 2011-2018 Free Software Foundation, Inc. 2 Copyright (C) 2011-2020 Free Software Foundation, Inc.
3 3
4 This file is part of GCC. 4 This file is part of GCC.
5 5
6 GCC is free software; you can redistribute it and/or modify 6 GCC is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by 7 it under the terms of the GNU General Public License as published by
132 if (ksp != NULL 132 if (ksp != NULL
133 && kstat_read (kc, ksp, NULL) != -1 133 && kstat_read (kc, ksp, NULL) != -1
134 && ksp->ks_type == KSTAT_TYPE_NAMED) 134 && ksp->ks_type == KSTAT_TYPE_NAMED)
135 brand = (kstat_named_t *) 135 brand = (kstat_named_t *)
136 kstat_data_lookup (ksp, CONST_CAST2 (char *, const char *, "brand")); 136 kstat_data_lookup (ksp, CONST_CAST2 (char *, const char *, "brand"));
137 /* "brand" was only introduced in Solaris 10. */
138 if (brand == NULL)
139 brand = (kstat_named_t *)
140 kstat_data_lookup (ksp, CONST_CAST2 (char *, const char *,
141 "implementation"));
142 /* KSTAT_DATA_STRING was introduced in Solaris 9. */
143 #ifdef KSTAT_DATA_STRING
144 if (brand != NULL && brand->data_type == KSTAT_DATA_STRING) 137 if (brand != NULL && brand->data_type == KSTAT_DATA_STRING)
145 buf = KSTAT_NAMED_STR_PTR (brand); 138 buf = KSTAT_NAMED_STR_PTR (brand);
146 #else
147 if (brand != NULL && brand->data_type == KSTAT_DATA_CHAR)
148 buf = brand->value.c;
149 #endif
150 } 139 }
151 kstat_close (kc); 140 kstat_close (kc);
152 141
153 for (i = 0; cpu_names[i].name != NULL; i++) 142 for (i = 0; cpu_names[i].name != NULL; i++)
154 if (strcmp (buf, cpu_names[i].name) == 0) 143 if (strcmp (buf, cpu_names[i].name) == 0)