[LLVMdev] returning a double in two registers

Rafael EspĂ­ndola rafael.espindola at gmail.com
Tue Oct 3 04:50:22 PDT 2006


> Alternatively, you could merge bitconvert into the fp_hi/lo flags.  That
> would make the pattern simpler, and eliminate the need to have to match a
> bare fp_hi/fp_lo node without the bitconvert.
good point!

> Unfortunately, you can't do this elegantly in tblgen.  You'd want to
> create an arm-local node at lowering time, then use custom C++ code to
> match it.  The X86 backend has some examples of how to write the custom
> matching code, but it's not for the faint of heart.
I will have a look at it.

> Extending tblgen to support instructions with multiple results is on the
> long term todo list, but we probably won't get to it in the near future.
>


> You defined your armfmmrd node as taking three inputs: two integer and one
> double.  Shouldn't it produce two outputs and take one input?  If so, you
> need to write custom c++ matching code.  Alternatively, you can avoid this
> by doing the two pieces separately, as you describe in 1).
It should. I have cheated to be able to use tblgen. Since the
instruction is only used with a flag connecting it to a return, I was
hoping that the hack was "safe".

> -Chris

Rafael



More information about the llvm-dev mailing list