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

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

AW: [avr-gcc-list] inline assembler, ijmp, X-Register


From: Haase Bjoern (PT-BEU/EMT) *
Subject: AW: [avr-gcc-list] inline assembler, ijmp, X-Register
Date: Tue, 5 Jul 2005 09:29:00 +0200

That's what I meant :-).
 
Anyway, forcing the address in the X register by inline asm constraints is wrong one needs to force it into z instead.
 
Yours,
 
Björn


Von: Stumpf Michael [mailto:address@hidden
Gesendet: Dienstag, 5. Juli 2005 07:13
An: Haase Bjoern (PT-BEU/EMT) *; Torsten Mohr; address@hidden
Betreff: AW: [avr-gcc-list] inline assembler, ijmp, X-Register

No, wrong

ijmp will use Z register implicitely, you must load Z before manually

regards, Michael

> -----Ursprüngliche Nachricht-----
> Von: address@hidden
> [mailto:address@hidden
> gnu.org]Im
> Auftrag von Haase Bjoern (PT-BEU/EMT) *
> Gesendet: Montag, 4. Juli 2005 09:45
> An: Torsten Mohr; address@hidden
> Betreff: AW: [avr-gcc-list] inline assembler, ijmp, X-Register
>
>
> Actually:
>
> You must use the z register for ijmp. Any other register is illegal.
>
> Yours,
>
> Björn

>
> -----Ursprüngliche Nachricht-----
> Von:
> address@hidden
> [mailto:address@hidden.
org] Im Auftrag von Torsten Mohr
Gesendet: Freitag, 1. Juli 2005 19:53
An: address@hidden
Betreff: Re: [avr-gcc-list] inline assembler, ijmp, X-Register

Hi,

> Just another guess:  What happens if you do something like
>
>    uint16_t fptr2 = fptr/2;
>    asm("ijmp":: "x" fptr2);

yes, that works.  Great, thanks.

It seems it was related to the size of the argument.  It has to be 16 bit.


Best regards,
Torsten.


_______________________________________________
AVR-GCC-list mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list





_______________________________________________
AVR-GCC-list mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list


reply via email to

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