[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-gcc-list] Assembly constraints in words
From: |
Svein E. Seldal |
Subject: |
[avr-gcc-list] Assembly constraints in words |
Date: |
Tue, 20 Aug 2002 23:47:38 +0200 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.0) Gecko/20020530 |
Hello,
I want to create an word LPM that is based on the one found in avr-libc,
only that this new one reads out a complete word, not just a single
byte. How do I constuct the asm constraint? I want to do the following:
__asm__ (
"lpm %0, Z+" "\n"
"lpm %0+1, Z" "\n"
: "=e" (__result16)
: "z" (__addr16)
: "z"
);
where i want "%0" to be one of the word registers (but not Z, of course)
and i want "%0+1" to be this word register +1. I can easily pin it down
to use a specific register pair, but I would prefer that gcc still can
select what register to use. Can anyone tell me how, please?
PS! Also note that the asm clobbers the z register. Is there a better
way to specify that z is input *and* is clobbered?
Svein
avr-gcc-list at http://avr1.org
- [avr-gcc-list] Assembly constraints in words,
Svein E. Seldal <=