#define TO_TEXT __attribute__ ((section (".text")))
-#define PIC_ADR(_ptr,_var) \
- { \
- __asm__ ( \
- "bsr 1f\n" \
- "1:\tmov.l @sp+,%0\n" \
- "\tadd.l %1-1b,%0\n" \
- : "=r" (_ptr) : "i" (&(_var)) : "cc" \
- ); \
- }
-
static const unsigned long
flash_blocks[] TO_TEXT =
{0x00000,0x01000,0x02000,0x03000,0x04000,0x05000,0x06000,0x07000,
{
int bl=0;
unsigned long *blocks;
- PIC_ADR(blocks,flash_blocks[0]);
+ blocks = &flash_blocks[0];
if(adr<blocks[0]) return -1;
while(blocks[bl+1]){
{
__u16 *p, *pe;
unsigned long *blocks;
- PIC_ADR(blocks,flash_blocks[0]);
+ blocks = &flash_blocks[0];
if(bl>=flash_block_count) return -2;
if(bl<0) return -2;