cavanus wrote:
Hello,In this scenario: typedef { uint16_t x[10]; uint8_t y[4]; } T; T t; // ... void function() { register uint16_t addr __asm__ ("r30"); register uint8_t addrl __asm__ ("r30"); register uint8_t addrh __asm__ ("r31"); // ... } // ... How to generate in function() this assembly lines (loading address of global structure [t] in [rZ]) using avr-gcc inline asm? ldi r30, lo8(&t) ldi r31, hi8(&t) __asm__ __volatile__("ldi %0, %1" : "=r" (addrl) : "M" (???)); __asm__ __volatile__("ldi %0, %1" : "=r" (addrh) : "M" (???)); I shoud try various typecasts in [???] but the compiler never match the constraints...
Coud you explain more of what you are trying to do by using inline assembly?
-- Eric Weddington _______________________________________________ AVR-GCC-list mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
