avr-libc-commit
[Top][All Lists]
Advanced

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

[avr-libc-commit] [2169] 2010-06-14 Eric B.


From: Eric Weddington
Subject: [avr-libc-commit] [2169] 2010-06-14 Eric B.
Date: Mon, 14 Jun 2010 06:28:24 +0000

Revision: 2169
          http://svn.sv.gnu.org/viewvc/?view=rev&root=avr-libc&revision=2169
Author:   arcanum
Date:     2010-06-14 06:28:23 +0000 (Mon, 14 Jun 2010)
Log Message:
-----------
2010-06-14  Eric B. Weddington  <address@hidden>

        * include/avr/pgmspace.h: Remove new features regarding new segments.
        Feature not yet ready. Correct comment.

Modified Paths:
--------------
    trunk/avr-libc/ChangeLog
    trunk/avr-libc/include/avr/pgmspace.h

Modified: trunk/avr-libc/ChangeLog
===================================================================
--- trunk/avr-libc/ChangeLog    2010-06-13 14:35:04 UTC (rev 2168)
+++ trunk/avr-libc/ChangeLog    2010-06-14 06:28:23 UTC (rev 2169)
@@ -1,3 +1,8 @@
+2010-06-14  Eric B. Weddington  <address@hidden>
+
+       * include/avr/pgmspace.h: Remove new features regarding new segments.
+       Feature not yet ready. Correct comment.
+
 2010-06-13  Joerg Wunsch <address@hidden>
 
        * include/avr/pgmspace.h: Remove the #error for architectures that

Modified: trunk/avr-libc/include/avr/pgmspace.h
===================================================================
--- trunk/avr-libc/include/avr/pgmspace.h       2010-06-13 14:35:04 UTC (rev 
2168)
+++ trunk/avr-libc/include/avr/pgmspace.h       2010-06-14 06:28:23 UTC (rev 
2169)
@@ -852,7 +852,7 @@
 #endif
 
 
-/* GET_FAR_ADDRESS() macro
+/* pgm_get_far_address() macro
 
    This macro facilitates the obtention of a 32 bit "far" pointer (only 24 bits
    used) to data even passed the 64KB limit for the 16 bit ordinary pointer. It
@@ -904,112 +904,6 @@
 })
 
 
-/* PROGMEM_FAR macro
-*/
-
-#ifndef PROGMEM_FAR
-#define PROGMEM_FAR __attribute__((__section__("._progmem_far")))
-#endif
-
-#ifndef PROGMEM_SEG1
-#define PROGMEM_SEG1 __attribute__((__section__("._progmem_segment1")))
-#endif
-
-#ifndef PROGMEM_SEG2
-#define PROGMEM_SEG2 __attribute__((__section__("._progmem_segment2")))
-#endif
-
-#ifndef PROGMEM_SEG3
-#define PROGMEM_SEG3 __attribute__((__section__("._progmem_segment3")))
-#endif
-
-#define PROGMEM_SEG1_BASE 0x10000UL
-#define PROGMEM_SEG2_BASE 0x20000UL
-#define PROGMEM_SEG3_BASE 0x30000UL
-
-/* PFSTR() macro
-
-
-*/
-
-# define PFSTR(s) (__extension__({static char __c[] PROGMEM_FAR = (s); 
pgm_get_far_address(__c[0]);}))
-# define PS1STR(s) (__extension__({static char __c[] PROGMEM_SEG1 = (s); 
PROGMEM_SEG1_BASE + (uint16_t)&__c[0];}))
-# define PS2STR(s) (__extension__({static char __c[] PROGMEM_SEG2 = (s); 
PROGMEM_SEG2_BASE + (uint16_t)&__c[0];}))
-# define PS3STR(s) (__extension__({static char __c[] PROGMEM_SEG3 = (s); 
PROGMEM_SEG3_BASE + (uint16_t)&__c[0];}))
-
-// for segmented access, pointers are 16-bit
-typedef uint16_t uint_segptr_t;
-
-
-#if defined (__AVR_HAVE_LPMX__)
-
-  #define pgm_read_byte_seg1(addr)          \
-  (__extension__({                          \
-      uint16_t __addr16 = (uint16_t)(addr); \
-      uint8_t __result;                     \
-      __asm__                               \
-      (                                     \
-          "ldi r30, 1"   "\n\t"             \
-          "out %2, r30"  "\n\t"             \
-          "movw r30, %1" "\n\t"             \
-          "elpm %0, Z+"  "\n\t"             \
-          : "=r" (__result)                 \
-          : "r" (__addr16),                 \
-            "I" (_SFR_IO_ADDR(RAMPZ))       \
-          : "r30", "r31"                    \
-      );                                    \
-      __result;                             \
-  }))
-
-
-  #define pgm_read_word_seg1(addr)          \
-  (__extension__({                          \
-      uint16_t __addr16 = (uint16_t)(addr); \
-      uint16_t __result;                    \
-      __asm__                               \
-      (                                     \
-          "ldi r30, 1"    "\n\t"            \
-          "out %2, r30"   "\n\t"            \
-          "movw r30, %1"  "\n\t"            \
-          "elpm %A0, Z+"  "\n\t"            \
-          "elpm %B0, Z"   "\n\t"            \
-          : "=r" (__result)                 \
-          : "r" (__addr16),                 \
-            "I" (_SFR_IO_ADDR(RAMPZ))       \
-          : "r30", "r31"                    \
-      );                                    \
-      __result;                             \
-  }))
-
-
-  #define pgm_read_dword_seg1(addr)         \
-  (__extension__({                          \
-      uint16_t __addr16 = (uint16_t)(addr); \
-      uint32_t __result;                    \
-      __asm__                               \
-      (                                     \
-          "ldi r30, 1"    "\n\t"            \
-          "out %2,  r30"  "\n\t"            \
-          "movw r30, %1"  "\n\t"            \
-          "elpm %A0, Z+"  "\n\t"            \
-          "elpm %B0, Z+"  "\n\t"            \
-          "elpm %C0, Z+"  "\n\t"            \
-          "elpm %D0, Z"   "\n\t"            \
-          : "=r" (__result)                 \
-          : "r" (__addr16),                 \
-            "I" (_SFR_IO_ADDR(RAMPZ))       \
-          : "r30", "r31"                    \
-      );                                    \
-      __result;                             \
-  }))
-
-
-//#else
-//  No support for segmented program space memory available.
-#endif
-
-
-
 extern PGM_VOID_P memchr_P(PGM_VOID_P, int __val, size_t __len) __ATTR_CONST__;
 extern int memcmp_P(const void *, PGM_VOID_P, size_t) __ATTR_PURE__;
 extern void *memccpy_P(void *, PGM_VOID_P, int __val, size_t);




reply via email to

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