On Fri, 14 Apr 2023 00:15:07 PDT (-0700), Kito Cheng wrote:
Wait, take second round review:

* All extensions were being prefixed with an underscore, which leads to
  some odd combinations like "rv32gc_v", this just adds underscores to
  the multi-letter extensions.
* The input base ISAs were being canonicalized, which resulted in some
  odd multilib default search paths.  I'm not sure if anything breaks
  due to this, but it seems safer to just leave them alone.

* All extensions were being prefixed with an underscore, which leads to
 some odd combinations like "rv32gc_v", this just adds underscores to
 the multi-letter extensions.

I think that weirdness can be removed arch-canonicalize I think?

And currently all -march will be canonicalized before query multi lib

@@ -163,14 +168,13 @@ for cmodel in cmodels:
     if cmodel == "compact" and arch.startswith("rv32"):
       continue

-    arch = arch_canonicalize (arch, args.misa_spec)
     arches[arch] = 1
     abis[abi] = 1
     extra = list(filter(None, extra.split(',')))
     ext_combs = expand_combination(ext)
     alts = sum([[x] + [x + y for y in ext_combs] for x in [arch] + extra], [])
     alts = filter(lambda x: len(x) != 0, alts)
-    alts = list(map(lambda a : arch_canonicalize(a, args.misa_spec), alts))
+    alts = alts + list(map(lambda a : arch_canonicalize(a, args.misa_spec), 
alts))

So we don't really need to append non-canonical one to the list?

IIUC the multilib processing happens before the canonicialization, so we'd need the non-canonicial strings in there too (as those are what most users will provide, and what we have now). I haven't actually tested that, though...

Reply via email to