Conversation
|
Thanks for the proposal, but I'm not happy with losing X6 as an allocatable register. You're right that the pseudo-instructions |
|
Your comment made me want to dig a little deeper into the question. will generates relative address loading tags in the object file, and it is not exactly what we want. However, there is a special pseudo instruction For instance, if I have a and thus we can use x31 as a scratch register for tailcalls (and x31 is already marked as scratch in CompCert)! I have made a new proposition in lgourdin@b14d831. |
|
Thanks for the suggestion to use |
More information about the bugfix:
Pj_l, as it is only used for goto inside a function. (We can suppose that the case where an address does not fit is very unlikely for gotos inside a function; moreover, even if we have a huge function where it happens, we would then have more important problems to deal with such as the conditional jumps which are addressed on 12bits only).Pj_sprinter rule as above implies a modification in the Asm semantics of CompCert, as the pseudo instruction clobbers x6. This modification itself implies some small changes in the proof, and the need to declare x6 as a scratch register. It must thus be invisible from Mach.I modified the Asm semantics, as well as the Machregs builtins parameters, because x6 can not be used as an input for builtins anymore. Thus, we use x8 instead, and, consequentially, I adapted Asmexpand untrusted file to change builtins functions and corresponding assertions.
Don't hesitate to tell me if I forgot something here, but I think this commit solves the issue. The non-regression tests are passing successfully.