Mercurial > hg > graal-jvmci-8
comparison src/cpu/sparc/vm/vm_version_sparc.cpp @ 641:6af0a709d52b
6812587: Use auxv to determine SPARC hardware features on Solaris
Summary: A similar function to getisax(2) should be used to determine all possible instruction set extensions.
Reviewed-by: never, kvn
author | twisti |
---|---|
date | Wed, 11 Mar 2009 14:16:13 -0700 |
parents | d1605aabd0a1 |
children | 660978a2a31a |
comparison
equal
deleted
inserted
replaced
625:2f2f54ed12ce | 641:6af0a709d52b |
---|---|
1 /* | 1 /* |
2 * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. | 2 * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
88 } | 88 } |
89 #endif | 89 #endif |
90 } | 90 } |
91 | 91 |
92 char buf[512]; | 92 char buf[512]; |
93 jio_snprintf(buf, sizeof(buf), "%s%s%s%s%s%s%s%s%s", | 93 jio_snprintf(buf, sizeof(buf), "%s%s%s%s%s%s%s%s%s%s%s", |
94 (has_v8() ? ", has_v8" : ""), | 94 (has_v8() ? ", has_v8" : ""), |
95 (has_v9() ? ", has_v9" : ""), | 95 (has_v9() ? ", has_v9" : ""), |
96 (has_vis1() ? ", has_vis1" : ""), | 96 (has_vis1() ? ", has_vis1" : ""), |
97 (has_vis2() ? ", has_vis2" : ""), | 97 (has_vis2() ? ", has_vis2" : ""), |
98 (is_ultra3() ? ", is_ultra3" : ""), | 98 (is_ultra3() ? ", is_ultra3" : ""), |
99 (is_sun4v() ? ", is_sun4v" : ""), | 99 (is_sun4v() ? ", is_sun4v" : ""), |
100 (is_niagara1() ? ", is_niagara1" : ""), | 100 (is_niagara1() ? ", is_niagara1" : ""), |
101 (!has_hardware_int_muldiv() ? ", no-muldiv" : ""), | 101 (is_niagara1_plus() ? ", is_niagara1_plus" : ""), |
102 (!has_hardware_mul32() ? ", no-mul32" : ""), | |
103 (!has_hardware_div32() ? ", no-div32" : ""), | |
102 (!has_hardware_fsmuld() ? ", no-fsmuld" : "")); | 104 (!has_hardware_fsmuld() ? ", no-fsmuld" : "")); |
103 | 105 |
104 // buf is started with ", " or is empty | 106 // buf is started with ", " or is empty |
105 _features_str = strdup(strlen(buf) > 2 ? buf + 2 : buf); | 107 _features_str = strdup(strlen(buf) > 2 ? buf + 2 : buf); |
106 | 108 |