View Single Post
Old 18 September 2019, 22:39   #30
Bartman
Registered User
 
Join Date: Feb 2019
Location: Munich, Germany
Posts: 14
Quote:
Originally Posted by deimos View Post
Is there a way to call an assembly routine with arguments as specific registers with this version of gcc?

I want to call a bit of existing code that takes a pointer in a0 and returns its result in d0. I'm used to adding bits to the C prototype to get this to work in other compilers, but no variation I've tried will compile under this gcc.

As far as I can tell, the gcc 8.3 manual does not cover this situation, only mixing inline assembly.

There must be a way, right? Or should I give up and write a wrapper that takes parameters from the stack?
Have a look at https://github.com/BartmanAbyss/vsco...nline/macros.h

That's how it's done for the AmigaOS interface. You should be able to adapt from there.

Otherwise the default calling convention is to just push all arguments on the stack.
Bartman is offline  
 
Page generated in 0.04184 seconds with 11 queries