As noted in https://reviews.llvm.org/D148315, the ordering logic for OrderedExtensionMap currently puts s* before z* extensions, but per the ISA manual the correct order should be z* and then s* (with the exception of zxm*, which are ordered after s*).
This patch fixes the ordering and adds a TODO for zxm*. The changes are visible in the test case added in a35e67fc5be654a7efdfa6125343b90f8960a487 which also demonstrates an issue with the ordering of single letter extensions (which isn't addressed in this patch).