[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Why are we using EICALL and EIJMP for AVR256?
From: |
Lars Noschinski |
Subject: |
Re: [avr-gcc-list] Why are we using EICALL and EIJMP for AVR256? |
Date: |
Tue, 15 Dec 2009 19:31:32 +0100 |
User-agent: |
mutt-ng/devel-r804 (Linux) |
* address@hidden <address@hidden> [09-12-15 19:09]:
> void (*fptr)();
>
> fptr = main;
>
> (*fptr)(); //Will use EICALL - should be CALL main
Hm, this problem seems to exist not only for the "big device". Using gcc
4.3.4 (from debian testing) on following C file with
$ avr-gcc -Wa,-adhlns=foo.lst foo.c -o foo.out -O2 -mmcu=atmega88
-- foo.c --------
static const void (*fptr)() = 0;
int main(void) {
fptr();
}
-----------------
yields the following code:
-----------------
13 main:
14 /* prologue: function */
15 /* frame size = 0 */
16 0000 E0E0 ldi r30,lo8(0)
17 0002 F0E0 ldi r31,hi8(0)
18 0004 0995 icall
19 /* epilogue start */
20 0006 0895 ret
-----------------
i.e. uses an indirect call instead of an direct call.
- Lars.
- [avr-gcc-list] Why are we using EICALL and EIJMP for AVR256?, Andrew Hutchinson, 2009/12/14
- Re: [avr-gcc-list] Why are we using EICALL and EIJMP for AVR256?, Sean D'Epagnier, 2009/12/15
- Re: [avr-gcc-list] Why are we using EICALL and EIJMP for AVR256?, andrewhutchinson, 2009/12/15
- R: [avr-gcc-list] Why are we using EICALL and EIJMP for AVR256?, palmerino tallarico, 2009/12/15
- Re: [avr-gcc-list] Why are we using EICALL and EIJMP for AVR256?,
Lars Noschinski <=
- Re: [avr-gcc-list] Why are we using EICALL and EIJMP for AVR256?, Dusan Ferbas, 2009/12/17
- Re: [avr-gcc-list] Why are we using EICALL and EIJMP for AVR256?, Andrew Hutchinson, 2009/12/17
- Re: [avr-gcc-list] Why are we using EICALL and EIJMP for AVR256?, Dusan Ferbas, 2009/12/17
- Re: [avr-gcc-list] Why are we using EICALL and EIJMP for AVR256?, Andy H, 2009/12/17
- Re: [avr-gcc-list] Why are we using EICALL and EIJMP for AVR256?, Dusan Ferbas, 2009/12/17
- RE: [avr-gcc-list] Why are we using EICALL and EIJMP for AVR256?, Weddington, Eric, 2009/12/17
- Re: [avr-gcc-list] Why are we using EICALL and EIJMP for AVR256?, Sean D'Epagnier, 2009/12/18
- Re: [avr-gcc-list] Why are we using EICALL and EIJMP for AVR256?, andrewhutchinson, 2009/12/18
- [avr-gcc-list] Re: Why are we using EICALL and EIJMP for AVR256?, David Brown, 2009/12/18