Michael Matz <[email protected]>: > I don't like this. tccgen.c should become _less_ dependend on the > TARGET defines, not more. Hence either VT_REF has a purpose and it > might make sense to use it in more backends, or it hasn't and should > be removed also from x86_64.
I agree, but inserting those #ifdefs is merely making the architecture-specificity explicit, thereby perhaps encouraging someone to do something about it. Without the #ifdefs, but with VT_REF only used by the x86_64 back end, you have hidden target-specificity, which is more dangerous. > AFAIU VT_REF is added when an argument is passed in a caller > allocated buffer whose address itself is passed in a register (i.e. > by-reference-passing). Do you mean on the stack? On arm64 the caller sometimes allocates a buffer then passes a pointer to that buffer on the stack, and I'm handling that with VT_LLOCAL, which is already widely used. (I checked that a lot of VT_LLOCALs are generated when you run the test suite on i386, for example.) I'd definitely prefer it if someone could remove VT_REF altogether. Alternatively, someone could patch the documentation to explain exactly what VT_REF means, why it's needed, and how it differs from VT_LLOCAL. If neither of those patches is forthcoming I'd prefer something like my patch to be committed to just leaving it as it is. Edmund _______________________________________________ Tinycc-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/tinycc-devel
