On Fri, Feb 27, 2015 at 12:03 PM, Keean Schupke <[email protected]> wrote:
> I guess kernel calls are the main use case for pass-by-register? In 'C' > you would probably have to write a bit of assembly to get data from a > specific register, and probably register names cannot be part of the > language because they are platform dependent. > Actually, nearly *all* procedure calls on modern architectures are register based. I can't help feeling that the details of the platform (number and names of > registers, and special uses for them) should be kept out of the language. > Sometimes you need to say such things, but it should be the rare exception rather than the rule. But talking about stack-based calling conventions is every bit as implementation-dependent as talking about register-based calling conventions. The main reason that the machine conventions and the language design issues come together is binary code. In the process of compiling stuff, you necessarily "fix" a bunch of these kinds of decisions. Once fixed, there are a bunch of transformations that are no longer doable. Among them things that entail stepping outside the calling convention. As I've said several times, some of the transforms you have discussed as long as you can see all the code involved and rewrite it accordingly. shap
_______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
