Subject:
|
H8/300 Assembler/C interface
|
Newsgroups:
|
lugnet.robotics.rcx
|
Date:
|
Wed, 18 Apr 2001 17:01:15 GMT
|
Viewed:
|
1377 times
|
| |
| |
Does anyone know offhand what the calling convention
between C/C++ and H8/300 assembler is using the GNU tools?
The assumptions I'm making are as follows:
R7 is the stack pointer
R6 is the first (leftmost) parameter passed and the result
R0-5 are for other parameters and are considered volatile through
function calls.
Functions clean up their own parameter stack usage - not the caller
If any of these are incorrect, please let me know. I'm not at
my regular computer right now, or I'd look there...
|
|
Message has 2 Replies: | | Re: H8/300 Assembler/C interface
|
| (...) Somebody correct me if I'm wrong. I just compiled some programs to check this. I believe that maybe the *ROM* calling convection is as Ralph described, but almost definitely the GCC calling convention is: - r0, r1, r2 hold parameters from left (...) (24 years ago, 18-Apr-01, to lugnet.robotics.rcx)
| | | RE: H8/300 Assembler/C interface
|
| One more question for Kekoa before I'm done... The RCX ROM routines take a parameter in r6, with additional params on the stack. Return value is in r6 too. Are all other registers considered volatile through the call, or do the ROM routines save (...) (24 years ago, 20-Apr-01, to lugnet.robotics.rcx)
|
20 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|