How to use a different calling convention for assembler routines?

Kazu Hirata kazu@cs.umass.edu
Tue Oct 22 06:18:00 GMT 2002


Hi Ingmar,

> I have quite a lot routines written in assembler for the H8/3052.
> They use the following calling convention:
> - the first parameter is passed in ER6 (or R6 or R6L)
> - other parameters are passed on the stack (the last one is written
>   first on the stack)
> - the result is returned in ER6 (or R6 or R6L)
> 
> Can GCC use a different calling convention?
> How can I instruct GCC to use this calling convention for the
> assembler routines?

I can't think of a clean way other than writing a wrapper around your
assembly routines.

Kazu Hirata



More information about the Gcc-help mailing list