[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] ATmega 2561 - eicall uses "byte" address
From: |
hutchinsonandy |
Subject: |
Re: [avr-gcc-list] ATmega 2561 - eicall uses "byte" address |
Date: |
Fri, 06 Jun 2008 15:41:38 -0400 |
CALL can reach all 4M of address space.
EICALL is special version of ICALL - which would be appropropriate for
non-constant function pointers. And this would be the area in which
near/far pointer support would be useful. However, the true functions
pointers inside compiler are only 16bits, so its not a trivial change.
But your code has constant pointer. So CALL should be ok.
Andy
----------------------------------------------
Sent from my Dingleberry wired device.
-----Original Message-----
From: Dusan Ferbas <address@hidden>
To: address@hidden; address@hidden; address@hidden
Sent: Fri, 6 Jun 2008 3:02 pm
Subject: Re: [avr-gcc-list] ATmega 2561 - eicall uses "byte" address
I agree that there is a bug.
But with call, I have different opinion.
Compiler does not know, where a module will be linked.
However it knows, where the call targets, it does not know, from where
the call is made.
If it is in a same flash "bank", call is sufficient. If not, there
should be eicall with EIND handling.
It is strange, that compiler generates eicall without EIND handling,
even initializing.
So with near and far attributes, there will be possibility to force
compiler to use call or eicall.
Otherwise we have to code it in asm.
At 13:47 6.6.2008, address@hidden wrote:
Compiler should not need "near". This is a constant address. So it
should do CALL, which can be handle like any other call.
This is a bug.
Andy
-----Original Message-----
From: Dusan Ferbas <address@hidden>
To: Stu Bell <address@hidden>; address@hidden
Sent: Thu, 5 Jun 2008 7:29 pm
Subject: RE: [avr-gcc-list] ATmega 2561 - eicall uses "byte" address
I now checked the case also with WinAVR-20080512. Same bug as with
20071221 (WinAVR bug #1959227 at sf.net).
Is it possible to add an attribute st. like "near" to prevent
compiler using eicall and to generate icall (case 1 below) ?
Dusan
Message not available