Only use wild_sort_fast

there's no reason why the tree-based variant can't always be used
when sorting is required, it merely needs to also support filename
sorting and have a fast path for insertion at end (aka rightmost tree
leaf).

The filename sorting isn't tested anywhere and the only scripttempl
that uses it is avr (for 'SORT(*)(.ctors)'), and I believe even there it
was a mistake.  Either way, this adds a testcase for filename sorting as
well.

Then the non-BST based sorting can be simplified to only support
the fast case of no sorting required at all (at the same time renaming
the two variants to _sort and _nosort).
This commit is contained in:
Michael Matz
2022-11-10 16:06:20 +01:00
parent 049522cae9
commit af31506c31
6 changed files with 163 additions and 178 deletions

View File

@@ -0,0 +1,6 @@
.text
infile2:
.long 0
.data
data2:
.long 0