[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-gcc-list] inline assembler, ijmp, X-Register
From: |
Torsten Mohr |
Subject: |
[avr-gcc-list] inline assembler, ijmp, X-Register |
Date: |
Fri, 1 Jul 2005 14:44:32 +0200 |
User-agent: |
KMail/1.8 |
Hi,
i have a functionpointer that is located in the variable fptr:
uint32_t fptr;
I'd now like to jump to that location.
From the avr-libc-user-manual-1.2.3 i thought i'd need to put it like this:
asm("ijmp":: "x" (fptr / 2));
As i understood it, fptr/2 would then be loaded into r27:r26 abd then the
instruction ijmp would be executed.
Compiling the program leads to:
src/main.c:149: Fehler: unmögliche Registerbedingung in »asm«
src/main.c:149: Fehler: unmögliche Registerbedingung in »asm«
which translates to something like: "impossible register condition in 'asm'".
Can anybody tell me why this does not work?
Is there an easier way to jump to an address in 128k program space?
Best regards,
Torsten.
- [avr-gcc-list] inline assembler, ijmp, X-Register,
Torsten Mohr <=