View Single Post
Old 19 June 2020, 11:33   #83
deimos
It's coming back!
 
deimos's Avatar
 
Join Date: Jul 2018
Location: comp.sys.amiga
Posts: 762
Quote:
Originally Posted by Antiriad_UK View Post
If the function call trashes say d0-d7 does the compiler save/restore all the regsiters by default or do you have to specify that here to stay safe?
You need to specify them, so probably
"d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7", "cc", "memory"
.

You can still do the normal movem thing to save them yourself, if you prefer, but the compiler may be able to be more selective about what it saves.

EDIT: There are some caveats, such as not being allowed to modify inputs unless they're also specified as outputs, so, assuming you are passing inputs, they may have to be listed as outputs rather than as clobbers. https://gcc.gnu.org/onlinedocs/gcc/E...atch-Registers

Last edited by deimos; 19 June 2020 at 11:58.
deimos is offline  
 
Page generated in 0.07110 seconds with 11 queries