Consider the endianness of the target when printing register names. This is in line with the documentation at http://llvm.org/docs/LangRef.html#asm-template-argument-modifiers
Thanks for the review Thomas. I have update the diff so it has context, and have fixed the formatting issue. I think the if statement is probably better as is, although I'm also not entirely sure.