avr-gcc-list
[Top][All Lists]
Advanced

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

Re: [avr-gcc-list] Structs in program memory.


From: Dmitry K.
Subject: Re: [avr-gcc-list] Structs in program memory.
Date: Wed, 28 Apr 2004 15:56:41 +1100
User-agent: KMail/1.5

Hi.

Port of gcc (2.3.3 snapshot 930305) for ADSP-21XX (Analog Devices) has
this feature - additional memory qualifier.

See:

   int x;          /* in data memory       */
   int pm x1;      /* in program memory    */
   int dm * pm x2; /* pointer in program memory to data memory     */

   int foo (void)
   {
       return x + x1 + *x2;
   }

is compiled to:

   !       END FUNCTION PROLOGUE: foo
           i6=^x1_;
           ax1=dm(x_);
           ay1=pm(i6,m6);
           i6=^x2_;
           ar=ax1+ay1,mx1=pm(i6,m6);       !!PRLL-2
           i2=mx1;
           ay1=dm(i2,m2);
           ar=ar+ay1;
   !       FUNCTION EPILOGUE: foo

Tarball may be find on `ftp.analog.com/pub' (I do not remember
exactly).

Best regards.



reply via email to

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