[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] 8-bit relocations on AVR
From: |
Andrew Zabolotny |
Subject: |
Re: [avr-gcc-list] 8-bit relocations on AVR |
Date: |
Sun, 14 Feb 2010 13:13:13 +0300 |
From Sun, 14 Feb 2010 11:12:03 +1100
Erik Christiansen <address@hidden> wrote:
> If you have no objection to each message having global labels, it is
> not only achievable (via the ldi or ldd relocations), but the need to
> store the string length is avoided:
>
> .section .text
>
> ; In the code somewhere, we compute the length when it's needed:
> ldi r16,(end_msg1 - msg1)
> ; or, depending on needs:
> ldd r20,Y+(end_msg1 - msg1)
>
> msg1: .ascii "somestring"
> end_msg1:
>
> Does that come close enough to meeting your needs?
Unfortunately, I can't imagine how this would help me.
Well, to be concrete, I'm implementing a simple FORTH virtual machine.
A FORTH "word" (it's what we call subroutines in other programming
languages) begins with a header, and this header contains the length of
the name (in fact, the length is contained in lower 5 bits, upper 3
bits are reserved for various flags) before the name itself.
This all works on x86 and x86_64 just fine, problem arised when I've
tried to port it to avr.
I can try to make a binutils patch, but I'm not even sure whom I need
to contact to push the patch upstream.
--
Andrew
signature.asc
Description: PGP signature
- [avr-gcc-list] 8-bit relocations on AVR, Andrew Zabolotny, 2010/02/13
- Re: [avr-gcc-list] 8-bit relocations on AVR, Erik Christiansen, 2010/02/13
- Re: [avr-gcc-list] 8-bit relocations on AVR,
Andrew Zabolotny <=
- Re: [avr-gcc-list] 8-bit relocations on AVR, Andrew Zabolotny, 2010/02/16
- Re: [avr-gcc-list] 8-bit relocations on AVR, Andrew Zabolotny, 2010/02/16
- RE: [avr-gcc-list] 8-bit relocations on AVR, Weddington, Eric, 2010/02/16
- Re: [avr-gcc-list] 8-bit relocations on AVR, Andrew Zabolotny, 2010/02/18
- RE: [avr-gcc-list] 8-bit relocations on AVR, Weddington, Eric, 2010/02/21
- Re: [avr-gcc-list] 8-bit relocations on AVR, Andrew Zabolotny, 2010/02/22