[PATCH] [mips] [IAS] Refactor the emitDirectiveModuleFP() functions.
daniel.sanders at imgtec.com
Tue Jun 23 07:02:56 PDT 2015
LGTM with an appropriate commit message. This is really a non-functional change (see below).
> However, it looks like we weren't changing the STI.FeatureBits at all before. That doesn't seem right to me.
It's probably best to update the feature bits for the sake of consistency with other .module directives but for FPXX it doesn't really matter to the assembler at the moment. The only assembler level effect of FPXX on IAS is a bit in the ABI flags section. That said, we will want the odd-numbered register warning at some point which will probably need the FPXX flag to be correct.
The fp64 bit is more important since it may select the wrong instruction at the moment. However, despite picking the wrong instruction, it will still get the correct encoding/relocs.
Overall, I think we should update these bits even though the effect is currently non-functional.
> This might need a test case, but I don't know what to put in it, as I'm not very knowledgeable about fpxx.
> I would appreciate some help with this. I was thinking of something like this:
> Set -mfp32 on the command line.
> Use .module fp=xx.
> At this point, we should be in fpxx mode, but actually we're still in fp32 mode, because we didn't change the STI.FeatureBits, we just updated the flags information.
test/MC/Mips/mips_abi_flags_xx.s covers this.
More information about the llvm-commits