65 determine_features(); |
65 determine_features(); |
66 |
66 |
67 // If PowerArchitecturePPC64 hasn't been specified explicitly determine from features. |
67 // If PowerArchitecturePPC64 hasn't been specified explicitly determine from features. |
68 if (FLAG_IS_DEFAULT(PowerArchitecturePPC64)) { |
68 if (FLAG_IS_DEFAULT(PowerArchitecturePPC64)) { |
69 if (VM_Version::has_darn()) { |
69 if (VM_Version::has_darn()) { |
70 FLAG_SET_ERGO(uintx, PowerArchitecturePPC64, 9); |
70 FLAG_SET_ERGO(PowerArchitecturePPC64, 9); |
71 } else if (VM_Version::has_lqarx()) { |
71 } else if (VM_Version::has_lqarx()) { |
72 FLAG_SET_ERGO(uintx, PowerArchitecturePPC64, 8); |
72 FLAG_SET_ERGO(PowerArchitecturePPC64, 8); |
73 } else if (VM_Version::has_popcntw()) { |
73 } else if (VM_Version::has_popcntw()) { |
74 FLAG_SET_ERGO(uintx, PowerArchitecturePPC64, 7); |
74 FLAG_SET_ERGO(PowerArchitecturePPC64, 7); |
75 } else if (VM_Version::has_cmpb()) { |
75 } else if (VM_Version::has_cmpb()) { |
76 FLAG_SET_ERGO(uintx, PowerArchitecturePPC64, 6); |
76 FLAG_SET_ERGO(PowerArchitecturePPC64, 6); |
77 } else if (VM_Version::has_popcntb()) { |
77 } else if (VM_Version::has_popcntb()) { |
78 FLAG_SET_ERGO(uintx, PowerArchitecturePPC64, 5); |
78 FLAG_SET_ERGO(PowerArchitecturePPC64, 5); |
79 } else { |
79 } else { |
80 FLAG_SET_ERGO(uintx, PowerArchitecturePPC64, 0); |
80 FLAG_SET_ERGO(PowerArchitecturePPC64, 0); |
81 } |
81 } |
82 } |
82 } |
83 |
83 |
84 bool PowerArchitecturePPC64_ok = false; |
84 bool PowerArchitecturePPC64_ok = false; |
85 switch (PowerArchitecturePPC64) { |
85 switch (PowerArchitecturePPC64) { |
101 |
101 |
102 if (!UseSIGTRAP) { |
102 if (!UseSIGTRAP) { |
103 MSG(TrapBasedICMissChecks); |
103 MSG(TrapBasedICMissChecks); |
104 MSG(TrapBasedNotEntrantChecks); |
104 MSG(TrapBasedNotEntrantChecks); |
105 MSG(TrapBasedNullChecks); |
105 MSG(TrapBasedNullChecks); |
106 FLAG_SET_ERGO(bool, TrapBasedNotEntrantChecks, false); |
106 FLAG_SET_ERGO(TrapBasedNotEntrantChecks, false); |
107 FLAG_SET_ERGO(bool, TrapBasedNullChecks, false); |
107 FLAG_SET_ERGO(TrapBasedNullChecks, false); |
108 FLAG_SET_ERGO(bool, TrapBasedICMissChecks, false); |
108 FLAG_SET_ERGO(TrapBasedICMissChecks, false); |
109 } |
109 } |
110 |
110 |
111 #ifdef COMPILER2 |
111 #ifdef COMPILER2 |
112 if (!UseSIGTRAP) { |
112 if (!UseSIGTRAP) { |
113 MSG(TrapBasedRangeChecks); |
113 MSG(TrapBasedRangeChecks); |
114 FLAG_SET_ERGO(bool, TrapBasedRangeChecks, false); |
114 FLAG_SET_ERGO(TrapBasedRangeChecks, false); |
115 } |
115 } |
116 |
116 |
117 // On Power6 test for section size. |
117 // On Power6 test for section size. |
118 if (PowerArchitecturePPC64 == 6) { |
118 if (PowerArchitecturePPC64 == 6) { |
119 determine_section_size(); |
119 determine_section_size(); |
121 // TODO: PPC port PdScheduling::power6SectorSize = 0x20; |
121 // TODO: PPC port PdScheduling::power6SectorSize = 0x20; |
122 } |
122 } |
123 |
123 |
124 if (PowerArchitecturePPC64 >= 8) { |
124 if (PowerArchitecturePPC64 >= 8) { |
125 if (FLAG_IS_DEFAULT(SuperwordUseVSX)) { |
125 if (FLAG_IS_DEFAULT(SuperwordUseVSX)) { |
126 FLAG_SET_ERGO(bool, SuperwordUseVSX, true); |
126 FLAG_SET_ERGO(SuperwordUseVSX, true); |
127 } |
127 } |
128 } else { |
128 } else { |
129 if (SuperwordUseVSX) { |
129 if (SuperwordUseVSX) { |
130 warning("SuperwordUseVSX specified, but needs at least Power8."); |
130 warning("SuperwordUseVSX specified, but needs at least Power8."); |
131 FLAG_SET_DEFAULT(SuperwordUseVSX, false); |
131 FLAG_SET_DEFAULT(SuperwordUseVSX, false); |
133 } |
133 } |
134 MaxVectorSize = SuperwordUseVSX ? 16 : 8; |
134 MaxVectorSize = SuperwordUseVSX ? 16 : 8; |
135 |
135 |
136 if (PowerArchitecturePPC64 >= 9) { |
136 if (PowerArchitecturePPC64 >= 9) { |
137 if (FLAG_IS_DEFAULT(UseCountTrailingZerosInstructionsPPC64)) { |
137 if (FLAG_IS_DEFAULT(UseCountTrailingZerosInstructionsPPC64)) { |
138 FLAG_SET_ERGO(bool, UseCountTrailingZerosInstructionsPPC64, true); |
138 FLAG_SET_ERGO(UseCountTrailingZerosInstructionsPPC64, true); |
139 } |
139 } |
140 if (FLAG_IS_DEFAULT(UseCharacterCompareIntrinsics)) { |
140 if (FLAG_IS_DEFAULT(UseCharacterCompareIntrinsics)) { |
141 FLAG_SET_ERGO(bool, UseCharacterCompareIntrinsics, true); |
141 FLAG_SET_ERGO(UseCharacterCompareIntrinsics, true); |
142 } |
142 } |
143 } else { |
143 } else { |
144 if (UseCountTrailingZerosInstructionsPPC64) { |
144 if (UseCountTrailingZerosInstructionsPPC64) { |
145 warning("UseCountTrailingZerosInstructionsPPC64 specified, but needs at least Power9."); |
145 warning("UseCountTrailingZerosInstructionsPPC64 specified, but needs at least Power9."); |
146 FLAG_SET_DEFAULT(UseCountTrailingZerosInstructionsPPC64, false); |
146 FLAG_SET_DEFAULT(UseCountTrailingZerosInstructionsPPC64, false); |