Mercurial > hg > graal-jvmci-8
comparison src/cpu/sparc/vm/vm_version_sparc.cpp @ 1914:ae065c367d93
6987135: Performance regression on Intel platform with 32-bits edition between 6u13 and 6u14.
Summary: Use hardware DIV instruction for long division by constant when it is faster than code with multiply.
Reviewed-by: never
author | kvn |
---|---|
date | Tue, 02 Nov 2010 09:00:37 -0700 |
parents | f55c4f82ab9d |
children | f95d63e2154a |
comparison
equal
deleted
inserted
replaced
1913:3b2dea75431e | 1914:ae065c367d93 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. 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. |
78 // aligned on a single instruction boundary | 78 // aligned on a single instruction boundary |
79 if (FLAG_IS_DEFAULT(InteriorEntryAlignment)) { | 79 if (FLAG_IS_DEFAULT(InteriorEntryAlignment)) { |
80 FLAG_SET_DEFAULT(InteriorEntryAlignment, 4); | 80 FLAG_SET_DEFAULT(InteriorEntryAlignment, 4); |
81 } | 81 } |
82 if (is_niagara1_plus()) { | 82 if (is_niagara1_plus()) { |
83 if (AllocatePrefetchStyle > 0 && FLAG_IS_DEFAULT(AllocatePrefetchStyle)) { | 83 if (has_blk_init() && AllocatePrefetchStyle > 0 && |
84 FLAG_IS_DEFAULT(AllocatePrefetchStyle)) { | |
84 // Use BIS instruction for allocation prefetch. | 85 // Use BIS instruction for allocation prefetch. |
85 FLAG_SET_DEFAULT(AllocatePrefetchStyle, 3); | 86 FLAG_SET_DEFAULT(AllocatePrefetchStyle, 3); |
86 if (FLAG_IS_DEFAULT(AllocatePrefetchDistance)) { | 87 if (FLAG_IS_DEFAULT(AllocatePrefetchDistance)) { |
87 // Use smaller prefetch distance on N2 with BIS | 88 // Use smaller prefetch distance on N2 with BIS |
88 FLAG_SET_DEFAULT(AllocatePrefetchDistance, 64); | 89 FLAG_SET_DEFAULT(AllocatePrefetchDistance, 64); |
116 // Currently not supported anywhere. | 117 // Currently not supported anywhere. |
117 FLAG_SET_DEFAULT(UseFPUForSpilling, false); | 118 FLAG_SET_DEFAULT(UseFPUForSpilling, false); |
118 #endif | 119 #endif |
119 | 120 |
120 char buf[512]; | 121 char buf[512]; |
121 jio_snprintf(buf, sizeof(buf), "%s%s%s%s%s%s%s%s%s%s%s%s", | 122 jio_snprintf(buf, sizeof(buf), "%s%s%s%s%s%s%s%s%s%s%s%s%s%s", |
122 (has_v8() ? ", has_v8" : ""), | 123 (has_v8() ? ", has_v8" : ""), |
123 (has_v9() ? ", has_v9" : ""), | 124 (has_v9() ? ", has_v9" : ""), |
124 (has_hardware_popc() ? ", popc" : ""), | 125 (has_hardware_popc() ? ", popc" : ""), |
125 (has_vis1() ? ", has_vis1" : ""), | 126 (has_vis1() ? ", has_vis1" : ""), |
126 (has_vis2() ? ", has_vis2" : ""), | 127 (has_vis2() ? ", has_vis2" : ""), |
128 (has_blk_init() ? ", has_blk_init" : ""), | |
127 (is_ultra3() ? ", is_ultra3" : ""), | 129 (is_ultra3() ? ", is_ultra3" : ""), |
128 (is_sun4v() ? ", is_sun4v" : ""), | 130 (is_sun4v() ? ", is_sun4v" : ""), |
129 (is_niagara1() ? ", is_niagara1" : ""), | 131 (is_niagara1() ? ", is_niagara1" : ""), |
130 (is_niagara1_plus() ? ", is_niagara1_plus" : ""), | 132 (is_niagara1_plus() ? ", is_niagara1_plus" : ""), |
133 (is_sparc64() ? ", is_sparc64" : ""), | |
131 (!has_hardware_mul32() ? ", no-mul32" : ""), | 134 (!has_hardware_mul32() ? ", no-mul32" : ""), |
132 (!has_hardware_div32() ? ", no-div32" : ""), | 135 (!has_hardware_div32() ? ", no-div32" : ""), |
133 (!has_hardware_fsmuld() ? ", no-fsmuld" : "")); | 136 (!has_hardware_fsmuld() ? ", no-fsmuld" : "")); |
134 | 137 |
135 // buf is started with ", " or is empty | 138 // buf is started with ", " or is empty |