[PATCH] D14390: [mips] Expansion of LI.S and LI.D

Vasileios Kalintiris via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 18 07:37:20 PST 2015


vkalintiris added a subscriber: vkalintiris.
vkalintiris added a comment.

I believe that we can achieve the same thing without introducing new floating-point operands. We could add the `AsmToken::Real` case in the switch cases inside `parseImm()` & `parseOperand()`. This way the generic parser would parse the floats/doubles, saving the result in a int64_t type. After that it's just a matter of re-interpreting the bits to float or double depending on the instruction that we expand, and save the new bits in in64_t again. This would allow us to utilize the backtracking from the generic matcher in the future. Of course, we wouldn't be able to `print()` the operands with their types. However, we only care for their value, not their types, so there's no harm done.


http://reviews.llvm.org/D14390





More information about the llvm-commits mailing list