This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: gfc_simplify_transfer implementation.


Meanwhile, the target-memory.c functions are in a sort of preliminary state which assumes that the host and target have the same memory representations, and thus don't work correctly on cross-compilers. They are, however, written in a way that should make it relatively easy to improve them and include proper target representations. And they do function properly for a native compiler.

Have you or Paul actually checked that they don't work correctly on cross-compilers? I think that at least the integer and real constants are stored in tress in host endianess (and thus, probably the logical and complex also work)...

As soon as I sent the mail, I understood why this sentence is completely wrong. But anyway, is there any reason that the following wouldn't work for taking care of memory representation:
- create a constant tree from the constant value
- fold_convert the value into the other type of similar length
- read back the value from the constant tree


I guess it's not low overhead, but that way we're relying on the middle-end to get the target memory representation right in all cases :) And it's probably not so hard to code and test, and then you can refine it if you want to.

FX

Attachment: smime.p7s
Description: S/MIME cryptographic signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]