From 82f9d1f96b30106a338e77ec83b7321c2c65f929 Mon Sep 17 00:00:00 2001 From: Xavier Leroy Date: Tue, 17 May 2016 15:37:56 +0200 Subject: Introduce register pairs to describe calling conventions more precisely This commit changes the loc_arguments and loc_result functions that describe calling conventions so that each argument/result can be mapped either to a single location or (in the case of a 64-bit integer) to a pair of two 32-bit locations. In the current CompCert, all arguments/results of type Tlong are systematically split in two 32-bit halves. We will need to change this in the future to support 64-bit processors. The alternative approach implemented by this commit enables the loc_arguments and loc_result functions to describe precisely which arguments need splitting. Eventually, the remainder of CompCert should not assume anything about splitting 64-bit types in two halves. Summary of changes: - AST: introduce the type "rpair A" of register pairs - Conventions1, Conventions: use it when describing calling conventions - LTL, Linear, Mach, Asm: honor the new calling conventions when observing external calls - Events: suppress external_call', no longer useful - All passes from Allocation to Asmgen: adapt accordingly. --- cfrontend/PrintClight.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cfrontend/PrintClight.ml') diff --git a/cfrontend/PrintClight.ml b/cfrontend/PrintClight.ml index e08411a5..7fa35f16 100644 --- a/cfrontend/PrintClight.ml +++ b/cfrontend/PrintClight.ml @@ -50,7 +50,7 @@ let precedence = function | Ebinop((Oadd|Osub), _, _, _) -> (12, LtoR) | Ebinop((Oshl|Oshr), _, _, _) -> (11, LtoR) | Ebinop((Olt|Ogt|Ole|Oge), _, _, _) -> (10, LtoR) - | Ebinop((Oeq|One), _, _, _) -> (9, LtoR) + | Ebinop((Oeq|Cop.One), _, _, _) -> (9, LtoR) | Ebinop(Oand, _, _, _) -> (8, LtoR) | Ebinop(Oxor, _, _, _) -> (7, LtoR) | Ebinop(Oor, _, _, _) -> (6, LtoR) -- cgit