Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Compilers > Re: x86-64 and ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 17 Topic 2419 of 2461
Post > Topic >>

Re: x86-64 and calling conventions

by James Harris <james.harris.1@[EMAIL PROTECTED] > May 12, 2008 at 04:12 AM

On 12 May, 00:44, "cr88192" <cr88...@[EMAIL PROTECTED]
> wrote:
> Well, I have my own compiler, however, I don't as of yet target x86-64.
>
> one of the main reasons:
> the calling conventions used in Linux and friends are, scary...

I'm working on a language where the call conventions are to be filled-
in after compilation. Each function is to compile to also use virtual
registers rather than real ones. Then only when one function calls
another do we set up the registers for both functions, the calling
conventions to pass data between them, and decide which regs to either
spill or save.

I should say this is work in progress. I'm not sure how well it will
work but expect that for small called functions there may be useful
gains. Oh, yes, the decision as to whether to inline small functions
will happen at the same time (based on optimisation speed/space
goals).

Not sure if that's any help. If it works it would illustrate that
subroutine and OS calling conventions can be plugged in after and are
distinct from code generation. OS calls are just function calls where
the callee's needs have already been decided - stack for Windows, regs
for Linux etc.

--
James
[How do you plan to handle function pointers? -John]
 




 17 Posts in Topic:
x86-64 and calling conventions
"cr88192" <c  2008-05-12 09:44:42 
Re: x86-64 and calling conventions
"cr88192" <c  2008-05-12 20:10:59 
Re: x86-64 and calling conventions
Bart <bc@[EMAIL PROTEC  2008-05-14 19:22:59 
Re: x86-64 and calling conventions
"cr88192" <c  2008-05-15 15:44:11 
Re: x86-64 and calling conventions
James Harris <james.ha  2008-05-12 04:12:03 
Re: x86-64 and calling conventions
James Harris <james.ha  2008-05-14 03:38:42 
Re: x86-64 and calling conventions
James Harris <james.ha  2008-05-14 11:37:05 
Re: x86-64 and calling conventions
Vidar Hokstad <vidar.h  2008-05-12 05:48:02 
Re: x86-64 and calling conventions
"cr88192" <c  2008-05-13 18:19:29 
Re: x86-64 and calling conventions
Dave Parker <daveparke  2008-05-12 20:10:58 
Re: x86-64 and calling conventions
"cr88192" <c  2008-05-13 17:51:07 
Re: x86-64 and calling conventions
glen herrmannsfeldt <g  2008-05-13 01:28:57 
Re: x86-64 and calling conventions
"cr88192" <c  2008-05-15 07:44:35 
Re: x86-64 and calling conventions
Boleslaw Ciesielski <b  2008-05-23 12:05:14 
Re: x86-64 and calling conventions
glen herrmannsfeldt <g  2008-05-29 13:56:05 
Re: x86-64 and calling conventions
Vidar Hokstad <vidar.h  2008-05-14 08:20:27 
Re: x86-64 and calling conventions
"cr88192" <c  2008-05-15 06:46:20 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Jul 6 19:09:09 CDT 2008.