Home | History | Annotate | Download | only in loongarch

Lines Matching refs:abi

35 /* ABI-related configuration.  */
53 #define isa_required(ABI) (abi_minimal_isa[(ABI).base][(ABI).ext])
58 is_multilib_enabled (struct loongarch_abi abi)
60 return enabled_abi_types[abi.base][abi.ext];
94 static const char* abi_str (struct loongarch_abi abi);
106 struct loongarch_abi abi);
107 static int abi_default_cpu_arch (struct loongarch_abi abi);
159 /* 1. Target ABI */
160 t.abi.base = constrained.abi_base ? opt_abi_base : DEFAULT_ABI_BASE;
162 t.abi.ext = constrained.abi_ext ? opt_abi_ext : DEFAULT_ABI_EXT;
186 /* The target ISA is not ready yet, but (isa_required (t.abi)
187 + forced fpu) is enough for computing the forced base ABI. */
188 struct loongarch_isa default_isa = isa_required (t.abi);
190 struct loongarch_abi force_abi = t.abi;
194 if (constrained.abi_base && (t.abi.base != force_abi.base))
196 "%<-m%s%> overrides %<-m%s=%s%>, adjusting ABI to %qs",
198 OPTSTR_ABI_BASE, loongarch_abi_base_strings[t.abi.base],
201 t.abi.base = force_abi.base;
206 if (t.abi.base != DEFAULT_ABI_BASE || t.abi.ext != DEFAULT_ABI_EXT)
211 warning (0, "ABI changed (%qs to %qs) while multilib is disabled",
212 abi_str (default_abi), abi_str (t.abi));
255 /* 4. ABI-ISA compatibility */
257 - There IS a unique default -march value for each ABI type
258 (config.gcc: triplet -> abi -> default arch).
260 - If the base ABI is incompatible with the default arch,
267 abi_tmp = t.abi;
275 int fallback_arch = abi_default_cpu_arch (t.abi);
279 "does not support %qs ABI, falling back to %<-m%s=%s%>",
280 arch_str (&t), abi_str (t.abi), OPTSTR_ARCH,
284 "does not support %qs ABI, falling back to %<-m%s=%s%>",
285 arch_str (&t), abi_str (t.abi), OPTSTR_ARCH,
295 try selecting another base ABI type. */
305 /* If -march is compatible with the default ABI
314 "unable to implement ABI %qs with instruction set %qs",
315 abi_str (t.abi), isa_str (&t.isa, '/'));
318 /* Using the fallback ABI. */
319 if (abi_tmp.base != t.abi.base || abi_tmp.ext != t.abi.ext)
325 /* Continue falling back until we find a feasible ABI type
336 warning (0, "ABI %qs cannot be implemented due to "
338 "falling back to %qs", abi_str (t.abi),
348 "default ABI %qs, falling back to %qs",
349 isa_str (&t.isa, '/'), abi_str (t.abi),
352 warning (0, "no multilib-enabled ABI (%qs) can be implemented "
361 t.abi = abi_tmp;
365 if (!is_multilib_enabled (t.abi))
368 "ABI %qs is not enabled at configure-time, "
369 "the linker might report an error", abi_str (t.abi));
371 inform (UNKNOWN_LOCATION, "ABI with startfiles: %s",
385 /* Returns the default ABI for the given instruction set. */
389 struct loongarch_abi abi;
395 abi.base = ABI_BASE_LP64D;
400 abi.base = ABI_BASE_LP64F;
405 abi.base = ABI_BASE_LP64S;
412 abi.ext = ABI_EXT_BASE;
413 return abi;
453 abi_compat_p (const struct loongarch_isa *isa, struct loongarch_abi abi)
456 const struct loongarch_isa *isa2 = &isa_required (abi);
467 abi_default_cpu_arch (struct loongarch_abi abi)
469 switch (abi.base)
474 if (abi.ext == ABI_EXT_BASE)
481 abi_str (struct loongarch_abi abi)
484 if (abi.ext == ABI_EXT_BASE)
486 obstack_copy0 (&msg_obstack, loongarch_abi_base_strings[abi.base],
487 strlen (loongarch_abi_base_strings[abi.base]));
490 APPEND_STRING (loongarch_abi_base_strings[abi.base])
492 APPEND_STRING (loongarch_abi_ext_strings[abi.ext])
588 opts->x_la_opt_abi_base = target->abi.base;