Coverage Report

Created: 2020-09-22 08:39

/Users/buildslave/jenkins/workspace/coverage/llvm-project/clang/lib/Driver/ToolChains/Arch/AArch64.cpp
Line
Count
Source (jump to first uncovered line)
1
//===--- AArch64.cpp - AArch64 (not ARM) Helpers for Tools ------*- C++ -*-===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
9
#include "AArch64.h"
10
#include "clang/Driver/Driver.h"
11
#include "clang/Driver/DriverDiagnostic.h"
12
#include "clang/Driver/Options.h"
13
#include "llvm/Option/ArgList.h"
14
#include "llvm/Support/TargetParser.h"
15
#include "llvm/Support/Host.h"
16
17
using namespace clang::driver;
18
using namespace clang::driver::tools;
19
using namespace clang;
20
using namespace llvm::opt;
21
22
/// \returns true if the given triple can determine the default CPU type even
23
/// if -arch is not specified.
24
1.30k
static bool isCPUDeterminedByTriple(const llvm::Triple &Triple) {
25
1.30k
  return Triple.isOSDarwin();
26
1.30k
}
27
28
/// getAArch64TargetCPU - Get the (LLVM) name of the AArch64 cpu we are
29
/// targeting. Set \p A to the Arg corresponding to the -mcpu argument if it is
30
/// provided, or to nullptr otherwise.
31
std::string aarch64::getAArch64TargetCPU(const ArgList &Args,
32
1.35k
                                         const llvm::Triple &Triple, Arg *&A) {
33
1.35k
  std::string CPU;
34
  // If we have -mcpu, use that.
35
1.35k
  if ((A = Args.getLastArg(options::OPT_mcpu_EQ))) {
36
214
    StringRef Mcpu = A->getValue();
37
214
    CPU = Mcpu.split("+").first.lower();
38
214
  }
39
40
  // Handle CPU name is 'native'.
41
1.35k
  if (CPU == "native")
42
1
    return std::string(llvm::sys::getHostCPUName());
43
1.35k
  else if (CPU.size())
44
213
    return CPU;
45
46
  // Make sure we pick the appropriate Apple CPU if -arch is used or when
47
  // targetting a Darwin OS.
48
1.13k
  if (Args.getLastArg(options::OPT_arch) || 
Triple.isOSDarwin()1.05k
)
49
245
    return Triple.getArch() == llvm::Triple::aarch64_32 ? 
"apple-s4"9
50
236
                                                        : "apple-a7";
51
52
894
  return "generic";
53
894
}
54
55
// Decode AArch64 features from string like +[no]featureA+[no]featureB+...
56
static bool DecodeAArch64Features(const Driver &D, StringRef text,
57
                                  std::vector<StringRef> &Features,
58
269
                                  llvm::AArch64::ArchKind ArchKind) {
59
269
  SmallVector<StringRef, 8> Split;
60
269
  text.split(Split, StringRef("+"), -1, false);
61
62
362
  for (StringRef Feature : Split) {
63
362
    StringRef FeatureName = llvm::AArch64::getArchExtFeature(Feature);
64
362
    if (!FeatureName.empty())
65
356
      Features.push_back(FeatureName);
66
6
    else if (Feature == "neon" || 
Feature == "noneon"3
)
67
6
      D.Diag(clang::diag::err_drv_no_neon_modifier);
68
0
    else
69
0
      return false;
70
71
    // +sve implies +f32mm if the base architecture is v8.6A
72
    // it isn't the case in general that sve implies both f64mm and f32mm
73
362
    if ((ArchKind == llvm::AArch64::ArchKind::ARMV8_6A) && 
Feature == "sve"11
)
74
5
      Features.push_back("+f32mm");
75
362
  }
76
269
  return true;
77
269
}
78
79
// Check if the CPU name and feature modifiers in -mcpu are legal. If yes,
80
// decode CPU and feature.
81
static bool DecodeAArch64Mcpu(const Driver &D, StringRef Mcpu, StringRef &CPU,
82
981
                              std::vector<StringRef> &Features) {
83
981
  std::pair<StringRef, StringRef> Split = Mcpu.split("+");
84
981
  CPU = Split.first;
85
981
  llvm::AArch64::ArchKind ArchKind = llvm::AArch64::ArchKind::ARMV8A;
86
87
981
  if (CPU == "native")
88
1
    CPU = llvm::sys::getHostCPUName();
89
90
981
  if (CPU == "generic") {
91
45
    Features.push_back("+neon");
92
936
  } else {
93
936
    ArchKind = llvm::AArch64::parseCPUArch(CPU);
94
936
    if (!llvm::AArch64::getArchFeatures(ArchKind, Features))
95
3
      return false;
96
97
933
    uint64_t Extension = llvm::AArch64::getDefaultExtensions(CPU, ArchKind);
98
933
    if (!llvm::AArch64::getExtensionFeatures(Extension, Features))
99
0
      return false;
100
978
   }
101
102
978
   if (Split.second.size() &&
103
38
       !DecodeAArch64Features(D, Split.second, Features, ArchKind))
104
0
     return false;
105
106
978
   return true;
107
978
}
108
109
static bool
110
getAArch64ArchFeaturesFromMarch(const Driver &D, StringRef March,
111
                                const ArgList &Args,
112
384
                                std::vector<StringRef> &Features) {
113
384
  std::string MarchLowerCase = March.lower();
114
384
  std::pair<StringRef, StringRef> Split = StringRef(MarchLowerCase).split("+");
115
116
384
  llvm::AArch64::ArchKind ArchKind = llvm::AArch64::parseArch(Split.first);
117
384
  if (ArchKind == llvm::AArch64::ArchKind::INVALID ||
118
382
      !llvm::AArch64::getArchFeatures(ArchKind, Features) ||
119
382
      (Split.second.size() &&
120
231
       !DecodeAArch64Features(D, Split.second, Features, ArchKind)))
121
2
    return false;
122
123
382
  return true;
124
382
}
125
126
static bool
127
getAArch64ArchFeaturesFromMcpu(const Driver &D, StringRef Mcpu,
128
                               const ArgList &Args,
129
287
                               std::vector<StringRef> &Features) {
130
287
  StringRef CPU;
131
287
  std::string McpuLowerCase = Mcpu.lower();
132
287
  if (!DecodeAArch64Mcpu(D, McpuLowerCase, CPU, Features))
133
2
    return false;
134
135
285
  return true;
136
285
}
137
138
static bool
139
getAArch64MicroArchFeaturesFromMtune(const Driver &D, StringRef Mtune,
140
                                     const ArgList &Args,
141
417
                                     std::vector<StringRef> &Features) {
142
417
  std::string MtuneLowerCase = Mtune.lower();
143
  // Check CPU name is valid
144
417
  std::vector<StringRef> MtuneFeatures;
145
417
  StringRef Tune;
146
417
  if (!DecodeAArch64Mcpu(D, MtuneLowerCase, Tune, MtuneFeatures))
147
1
    return false;
148
149
  // Handle CPU name is 'native'.
150
416
  if (MtuneLowerCase == "native")
151
0
    MtuneLowerCase = std::string(llvm::sys::getHostCPUName());
152
416
  if (MtuneLowerCase == "cyclone" ||
153
403
      StringRef(MtuneLowerCase).startswith("apple")) {
154
103
    Features.push_back("+zcm");
155
103
    Features.push_back("+zcz");
156
103
  }
157
416
  return true;
158
416
}
159
160
static bool
161
getAArch64MicroArchFeaturesFromMcpu(const Driver &D, StringRef Mcpu,
162
                                    const ArgList &Args,
163
277
                                    std::vector<StringRef> &Features) {
164
277
  StringRef CPU;
165
277
  std::vector<StringRef> DecodedFeature;
166
277
  std::string McpuLowerCase = Mcpu.lower();
167
277
  if (!DecodeAArch64Mcpu(D, McpuLowerCase, CPU, DecodedFeature))
168
0
    return false;
169
170
277
  return getAArch64MicroArchFeaturesFromMtune(D, CPU, Args, Features);
171
277
}
172
173
void aarch64::getAArch64TargetFeatures(const Driver &D,
174
                                       const llvm::Triple &Triple,
175
                                       const ArgList &Args,
176
1.14k
                                       std::vector<StringRef> &Features) {
177
1.14k
  Arg *A;
178
1.14k
  bool success = true;
179
  // Enable NEON by default.
180
1.14k
  Features.push_back("+neon");
181
1.14k
  if ((A = Args.getLastArg(options::OPT_march_EQ)))
182
384
    success = getAArch64ArchFeaturesFromMarch(D, A->getValue(), Args, Features);
183
763
  else if ((A = Args.getLastArg(options::OPT_mcpu_EQ)))
184
205
    success = getAArch64ArchFeaturesFromMcpu(D, A->getValue(), Args, Features);
185
558
  else if (Args.hasArg(options::OPT_arch) || 
isCPUDeterminedByTriple(Triple)529
)
186
82
    success = getAArch64ArchFeaturesFromMcpu(
187
82
        D, getAArch64TargetCPU(Args, Triple, A), Args, Features);
188
189
1.14k
  if (success && 
(A = Args.getLastArg(clang::driver::options::OPT_mtune_EQ))1.14k
)
190
140
    success =
191
140
        getAArch64MicroArchFeaturesFromMtune(D, A->getValue(), Args, Features);
192
1.00k
  else if (success && 
(A = Args.getLastArg(options::OPT_mcpu_EQ))1.00k
)
193
196
    success =
194
196
        getAArch64MicroArchFeaturesFromMcpu(D, A->getValue(), Args, Features);
195
811
  else if (success &&
196
807
           (Args.hasArg(options::OPT_arch) || 
isCPUDeterminedByTriple(Triple)779
))
197
81
    success = getAArch64MicroArchFeaturesFromMcpu(
198
81
        D, getAArch64TargetCPU(Args, Triple, A), Args, Features);
199
200
1.14k
  if (!success)
201
5
    D.Diag(diag::err_drv_clang_unsupported) << A->getAsString(Args);
202
203
1.14k
  if (Args.getLastArg(options::OPT_mgeneral_regs_only)) {
204
2
    Features.push_back("-fp-armv8");
205
2
    Features.push_back("-crypto");
206
2
    Features.push_back("-neon");
207
2
  }
208
209
1.14k
  if (Arg *A = Args.getLastArg(options::OPT_mtp_mode_EQ)) {
210
4
    StringRef Mtp = A->getValue();
211
4
    if (Mtp == "el3")
212
1
      Features.push_back("+tpidr-el3");
213
3
    else if (Mtp == "el2")
214
1
      Features.push_back("+tpidr-el2");
215
2
    else if (Mtp == "el1")
216
1
      Features.push_back("+tpidr-el1");
217
1
    else if (Mtp != "el0")
218
0
      D.Diag(diag::err_drv_invalid_mtp) << A->getAsString(Args);
219
4
  }
220
221
  // Enable/disable straight line speculation hardening.
222
1.14k
  if (Arg *A = Args.getLastArg(options::OPT_mharden_sls_EQ)) {
223
11
    StringRef Scope = A->getValue();
224
11
    bool EnableRetBr = false;
225
11
    bool EnableBlr = false;
226
11
    if (Scope != "none" && 
Scope != "all"9
) {
227
8
      SmallVector<StringRef, 4> Opts;
228
8
      Scope.split(Opts, ",");
229
13
      for (auto Opt : Opts) {
230
13
        Opt = Opt.trim();
231
13
        if (Opt == "retbr") {
232
6
          EnableRetBr = true;
233
6
          continue;
234
6
        }
235
7
        if (Opt == "blr") {
236
4
          EnableBlr = true;
237
4
          continue;
238
4
        }
239
3
        D.Diag(diag::err_invalid_sls_hardening)
240
3
            << Scope << A->getAsString(Args);
241
3
        break;
242
3
      }
243
3
    } else if (Scope == "all") {
244
1
      EnableRetBr = true;
245
1
      EnableBlr = true;
246
1
    }
247
248
11
    if (EnableRetBr)
249
6
      Features.push_back("+harden-sls-retbr");
250
11
    if (EnableBlr)
251
5
      Features.push_back("+harden-sls-blr");
252
11
  }
253
254
  // En/disable crc
255
1.14k
  if (Arg *A = Args.getLastArg(options::OPT_mcrc, options::OPT_mnocrc)) {
256
2
    if (A->getOption().matches(options::OPT_mcrc))
257
2
      Features.push_back("+crc");
258
0
    else
259
0
      Features.push_back("-crc");
260
2
  }
261
262
  // Handle (arch-dependent) fp16fml/fullfp16 relationship.
263
  // FIXME: this fp16fml option handling will be reimplemented after the
264
  // TargetParser rewrite.
265
1.14k
  const auto ItRNoFullFP16 = std::find(Features.rbegin(), Features.rend(), "-fullfp16");
266
1.14k
  const auto ItRFP16FML = std::find(Features.rbegin(), Features.rend(), "+fp16fml");
267
1.14k
  if (llvm::is_contained(Features, "+v8.4a")) {
268
48
    const auto ItRFullFP16  = std::find(Features.rbegin(), Features.rend(), "+fullfp16");
269
48
    if (ItRFullFP16 < ItRNoFullFP16 && 
ItRFullFP16 < ItRFP16FML11
) {
270
      // Only entangled feature that can be to the right of this +fullfp16 is -fp16fml.
271
      // Only append the +fp16fml if there is no -fp16fml after the +fullfp16.
272
11
      if (std::find(Features.rbegin(), ItRFullFP16, "-fp16fml") == ItRFullFP16)
273
8
        Features.push_back("+fp16fml");
274
11
    }
275
37
    else
276
37
      goto fp16_fml_fallthrough;
277
1.09k
  } else {
278
1.13k
fp16_fml_fallthrough:
279
    // In both of these cases, putting the 'other' feature on the end of the vector will
280
    // result in the same effect as placing it immediately after the current feature.
281
1.13k
    if (ItRNoFullFP16 < ItRFP16FML)
282
10
      Features.push_back("-fp16fml");
283
1.12k
    else if (ItRNoFullFP16 > ItRFP16FML)
284
22
      Features.push_back("+fullfp16");
285
1.13k
  }
286
287
  // FIXME: this needs reimplementation too after the TargetParser rewrite
288
  //
289
  // Context sensitive meaning of Crypto:
290
  // 1) For Arch >= ARMv8.4a:  crypto = sm4 + sha3 + sha2 + aes
291
  // 2) For Arch <= ARMv8.3a:  crypto = sha2 + aes
292
1.14k
  const auto ItBegin = Features.begin();
293
1.14k
  const auto ItEnd = Features.end();
294
1.14k
  const auto ItRBegin = Features.rbegin();
295
1.14k
  const auto ItREnd = Features.rend();
296
1.14k
  const auto ItRCrypto = std::find(ItRBegin, ItREnd, "+crypto");
297
1.14k
  const auto ItRNoCrypto = std::find(ItRBegin, ItREnd, "-crypto");
298
1.14k
  const auto HasCrypto  = ItRCrypto != ItREnd;
299
1.14k
  const auto HasNoCrypto = ItRNoCrypto != ItREnd;
300
1.14k
  const ptrdiff_t PosCrypto = ItRCrypto - ItRBegin;
301
1.14k
  const ptrdiff_t PosNoCrypto = ItRNoCrypto - ItRBegin;
302
303
1.14k
  bool NoCrypto = false;
304
1.14k
  if (HasCrypto && 
HasNoCrypto288
) {
305
8
    if (PosNoCrypto < PosCrypto)
306
6
      NoCrypto = true;
307
8
  }
308
309
1.14k
  if (std::find(ItBegin, ItEnd, "+v8.4a") != ItEnd) {
310
48
    if (HasCrypto && 
!NoCrypto3
) {
311
      // Check if we have NOT disabled an algorithm with something like:
312
      //   +crypto, -algorithm
313
      // And if "-algorithm" does not occur, we enable that crypto algorithm.
314
3
      const bool HasSM4  = (std::find(ItBegin, ItEnd, "-sm4") == ItEnd);
315
3
      const bool HasSHA3 = (std::find(ItBegin, ItEnd, "-sha3") == ItEnd);
316
3
      const bool HasSHA2 = (std::find(ItBegin, ItEnd, "-sha2") == ItEnd);
317
3
      const bool HasAES  = (std::find(ItBegin, ItEnd, "-aes") == ItEnd);
318
3
      if (HasSM4)
319
2
        Features.push_back("+sm4");
320
3
      if (HasSHA3)
321
2
        Features.push_back("+sha3");
322
3
      if (HasSHA2)
323
3
        Features.push_back("+sha2");
324
3
      if (HasAES)
325
3
        Features.push_back("+aes");
326
45
    } else if (HasNoCrypto) {
327
      // Check if we have NOT enabled a crypto algorithm with something like:
328
      //   -crypto, +algorithm
329
      // And if "+algorithm" does not occur, we disable that crypto algorithm.
330
1
      const bool HasSM4  = (std::find(ItBegin, ItEnd, "+sm4") != ItEnd);
331
1
      const bool HasSHA3 = (std::find(ItBegin, ItEnd, "+sha3") != ItEnd);
332
1
      const bool HasSHA2 = (std::find(ItBegin, ItEnd, "+sha2") != ItEnd);
333
1
      const bool HasAES  = (std::find(ItBegin, ItEnd, "+aes") != ItEnd);
334
1
      if (!HasSM4)
335
1
        Features.push_back("-sm4");
336
1
      if (!HasSHA3)
337
1
        Features.push_back("-sha3");
338
1
      if (!HasSHA2)
339
1
        Features.push_back("-sha2");
340
1
      if (!HasAES)
341
1
        Features.push_back("-aes");
342
1
    }
343
1.09k
  } else {
344
1.09k
    if (HasCrypto && 
!NoCrypto285
) {
345
279
      const bool HasSHA2 = (std::find(ItBegin, ItEnd, "-sha2") == ItEnd);
346
279
      const bool HasAES = (std::find(ItBegin, ItEnd, "-aes") == ItEnd);
347
279
      if (HasSHA2)
348
278
        Features.push_back("+sha2");
349
279
      if (HasAES)
350
278
        Features.push_back("+aes");
351
820
    } else if (HasNoCrypto) {
352
16
      const bool HasSHA2 = (std::find(ItBegin, ItEnd, "+sha2") != ItEnd);
353
16
      const bool HasAES  = (std::find(ItBegin, ItEnd, "+aes") != ItEnd);
354
16
      const bool HasV82a = (std::find(ItBegin, ItEnd, "+v8.2a") != ItEnd);
355
16
      const bool HasV83a = (std::find(ItBegin, ItEnd, "+v8.3a") != ItEnd);
356
16
      const bool HasV84a = (std::find(ItBegin, ItEnd, "+v8.4a") != ItEnd);
357
16
      if (!HasSHA2)
358
15
        Features.push_back("-sha2");
359
16
      if (!HasAES)
360
15
        Features.push_back("-aes");
361
16
      if (HasV82a || 
HasV83a15
||
HasV84a13
) {
362
3
        Features.push_back("-sm4");
363
3
        Features.push_back("-sha3");
364
3
      }
365
16
    }
366
1.09k
  }
367
368
1.14k
  auto V8_6Pos = llvm::find(Features, "+v8.6a");
369
1.14k
  if (V8_6Pos != std::end(Features))
370
23
    V8_6Pos = Features.insert(std::next(V8_6Pos), {"+i8mm", "+bf16"});
371
372
1.14k
  bool HasSve = llvm::is_contained(Features, "+sve");
373
  // -msve-vector-bits=<bits> flag is valid only if SVE is enabled.
374
1.14k
  if (Args.hasArg(options::OPT_msve_vector_bits_EQ))
375
21
    if (!HasSve)
376
5
      D.Diag(diag::err_drv_invalid_sve_vector_bits);
377
378
1.14k
  if (Arg *A = Args.getLastArg(options::OPT_mno_unaligned_access,
379
8
                               options::OPT_munaligned_access)) {
380
8
    if (A->getOption().matches(options::OPT_mno_unaligned_access))
381
5
      Features.push_back("+strict-align");
382
1.13k
  } else if (Triple.isOSOpenBSD())
383
10
    Features.push_back("+strict-align");
384
385
1.14k
  if (Args.hasArg(options::OPT_ffixed_x1))
386
3
    Features.push_back("+reserve-x1");
387
388
1.14k
  if (Args.hasArg(options::OPT_ffixed_x2))
389
3
    Features.push_back("+reserve-x2");
390
391
1.14k
  if (Args.hasArg(options::OPT_ffixed_x3))
392
2
    Features.push_back("+reserve-x3");
393
394
1.14k
  if (Args.hasArg(options::OPT_ffixed_x4))
395
2
    Features.push_back("+reserve-x4");
396
397
1.14k
  if (Args.hasArg(options::OPT_ffixed_x5))
398
2
    Features.push_back("+reserve-x5");
399
400
1.14k
  if (Args.hasArg(options::OPT_ffixed_x6))
401
2
    Features.push_back("+reserve-x6");
402
403
1.14k
  if (Args.hasArg(options::OPT_ffixed_x7))
404
2
    Features.push_back("+reserve-x7");
405
406
1.14k
  if (Args.hasArg(options::OPT_ffixed_x9))
407
2
    Features.push_back("+reserve-x9");
408
409
1.14k
  if (Args.hasArg(options::OPT_ffixed_x10))
410
2
    Features.push_back("+reserve-x10");
411
412
1.14k
  if (Args.hasArg(options::OPT_ffixed_x11))
413
2
    Features.push_back("+reserve-x11");
414
415
1.14k
  if (Args.hasArg(options::OPT_ffixed_x12))
416
2
    Features.push_back("+reserve-x12");
417
418
1.14k
  if (Args.hasArg(options::OPT_ffixed_x13))
419
2
    Features.push_back("+reserve-x13");
420
421
1.14k
  if (Args.hasArg(options::OPT_ffixed_x14))
422
2
    Features.push_back("+reserve-x14");
423
424
1.14k
  if (Args.hasArg(options::OPT_ffixed_x15))
425
2
    Features.push_back("+reserve-x15");
426
427
1.14k
  if (Args.hasArg(options::OPT_ffixed_x18))
428
7
    Features.push_back("+reserve-x18");
429
430
1.14k
  if (Args.hasArg(options::OPT_ffixed_x20))
431
2
    Features.push_back("+reserve-x20");
432
433
1.14k
  if (Args.hasArg(options::OPT_ffixed_x21))
434
2
    Features.push_back("+reserve-x21");
435
436
1.14k
  if (Args.hasArg(options::OPT_ffixed_x22))
437
2
    Features.push_back("+reserve-x22");
438
439
1.14k
  if (Args.hasArg(options::OPT_ffixed_x23))
440
2
    Features.push_back("+reserve-x23");
441
442
1.14k
  if (Args.hasArg(options::OPT_ffixed_x24))
443
2
    Features.push_back("+reserve-x24");
444
445
1.14k
  if (Args.hasArg(options::OPT_ffixed_x25))
446
2
    Features.push_back("+reserve-x25");
447
448
1.14k
  if (Args.hasArg(options::OPT_ffixed_x26))
449
2
    Features.push_back("+reserve-x26");
450
451
1.14k
  if (Args.hasArg(options::OPT_ffixed_x27))
452
2
    Features.push_back("+reserve-x27");
453
454
1.14k
  if (Args.hasArg(options::OPT_ffixed_x28))
455
2
    Features.push_back("+reserve-x28");
456
457
1.14k
  if (Args.hasArg(options::OPT_ffixed_x30))
458
1
    Features.push_back("+reserve-x30");
459
460
1.14k
  if (Args.hasArg(options::OPT_fcall_saved_x8))
461
2
    Features.push_back("+call-saved-x8");
462
463
1.14k
  if (Args.hasArg(options::OPT_fcall_saved_x9))
464
2
    Features.push_back("+call-saved-x9");
465
466
1.14k
  if (Args.hasArg(options::OPT_fcall_saved_x10))
467
2
    Features.push_back("+call-saved-x10");
468
469
1.14k
  if (Args.hasArg(options::OPT_fcall_saved_x11))
470
2
    Features.push_back("+call-saved-x11");
471
472
1.14k
  if (Args.hasArg(options::OPT_fcall_saved_x12))
473
2
    Features.push_back("+call-saved-x12");
474
475
1.14k
  if (Args.hasArg(options::OPT_fcall_saved_x13))
476
2
    Features.push_back("+call-saved-x13");
477
478
1.14k
  if (Args.hasArg(options::OPT_fcall_saved_x14))
479
2
    Features.push_back("+call-saved-x14");
480
481
1.14k
  if (Args.hasArg(options::OPT_fcall_saved_x15))
482
2
    Features.push_back("+call-saved-x15");
483
484
1.14k
  if (Args.hasArg(options::OPT_fcall_saved_x18))
485
3
    Features.push_back("+call-saved-x18");
486
487
1.14k
  if (Args.hasArg(options::OPT_mno_neg_immediates))
488
1
    Features.push_back("+no-neg-immediates");
489
1.14k
}