Coverage Report

Created: 2021-01-19 06:58

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