[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] Calling functions (-udivhi3) from asm ?

From: Robert Rozman
Subject: [avr-gcc-list] Calling functions (-udivhi3) from asm ?
Date: Sat, 10 Mar 2001 14:20:41 +0100


after some work in gcc, I have some small parts of project that I'd like to
implement in asm (I use avr-gcc assembler). But I ran into problems:
- I'd need function like itoa but I want function to return pointer to last
character - so I transferred itos.S into my project, make changes and the
try to compile - but I get error:

: undefined reference to '_udivhi3'

itoa.S calls this function with line :

 XCALL _U(_udivhi3) ; quotient in rP1:rP0, remainder in r26:r27

I obviously don't know how to specifiy extern function in asm file.

But then I tried another solution for test - I've changed original itoa.S,
recompiled library and then used itoa as part of stdlib. But I get same type
of error. Is itoa functional as it is in original form or I'm doing
something wrong ?

Of cource right solution is if I change some global functions to include
them as custom parts of my project - but I'd like to know how to solve this
problem in asm file so main question remains :

How to properly call function '_udivhi3' from asm procedure ? What
definitions should I make ?

Thanks in advance,

Robert Rozman

reply via email to

[Prev in Thread] Current Thread [Next in Thread]