This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ARM swi service routine


On Wed, 2005-01-19 at 18:17, Shaun Jackman wrote:
> Hello,
> 
> Is the ARM swi service routine allowed to trash r1-r3 and r12 like a
> function call, or must it preserve these values like an interrupt
> handler? The return value is in r0, so it's a moot point.
> 
> Is there any code for an ARM swi service routine in libgloss perhaps
> or elsewhere?

There isn't really a single answer to this question.  There's no 'ABI'
for SWI calls, so it depends on the SWI service. 

On some OSes there might be a general rule, on others it might be
completely different from call to call.  For example, some OSes have a
general rule that an error is reported by setting the V flag in the
CPSR, others do it through special return values.

R.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]