For sramecc and xnack
| 188 | |
| 189 | // For sramecc and xnack |
| 190 | static std::string TargetFeatureCheck(const std::string& input, std::string feature) { |
| 191 | if (input.find(feature) != std::string::npos) { |
| 192 | auto feature_p = feature + "+"; // feature present eg: xnack+ |
| 193 | auto feature_m = feature + "-"; // feature absent eg: xnack- |
| 194 | if (input.find(feature_p) != std::string::npos) { |
| 195 | return feature_p; |
| 196 | } else if (input.find(feature_m) != std::string::npos) { |
| 197 | return feature_m; |
| 198 | } |
| 199 | } |
| 200 | return ""; |
| 201 | } |
| 202 | |
| 203 | static std::string TargetToGeneric(std::string input) { |
| 204 | auto sramecc = TargetFeatureCheck(input, "sramecc"); |