95% of what goes into asm statements in mspgcc is not specific to the MSP430. See:
http://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html "i" simply means an immediate integer value. See http://gcc.gnu.org/onlinedocs/gccint/Simple-Constraints.html#Simple-Constraints. It does not imply 16-bit. That limitation comes from the current mspgcc back-end. There are a few constraints that you could use that are specific to the MSP430 back end, and of course the template has to contain valid asm operations. It's unlikely the manual will be updated with this information (well, it's way below my threshold at least), since the canonical source will always be the documentation for gas (which comes from binutils) and the machine description in gcc/config/msp430. uniarch now uses the standard GCC way of defining additional constraints, so they're in constraints.md, though the specific characters used are in flux as I determine what needs to be supported. Offhand, I expect that when 20-bit support is provided the indication that the immediate is to be printed in a 20-bit compatible form will come from a prefix character in the output template, such as: __asm__ __volatile__ ("movx.a %W1,%0":"=m" (DMA0SA):"i" (0xefefeUL)); Without this, gcc would not know that the context permits a 20-bit immediate, and would truncate it to 16-bits as it does currently. Those prefix characters too are documented only in msp430.md file, and are in flux. Peter >> Of course, the 'i' contraint extracts the lower 16 bit only, as it means a >> 16 bit immediate value (short int). The compiler is implicitely generating >> a "#llo(123456L)", which cuts off the upper bits. >> > > well if "i" means 16 bit immediate then I have to say it is doing the right > thing. But is there somewhere this is documented? > > I looked at the mspgcc manual under gcc extended asm syntax and it isn't > clear how it works. ------------------------------------------------------------------------------ Benefiting from Server Virtualization: Beyond Initial Workload Consolidation -- Increasing the use of server virtualization is a top priority.Virtualization can reduce costs, simplify management, and improve application availability and disaster protection. Learn more about boosting the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev _______________________________________________ Mspgcc-users mailing list Mspgcc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mspgcc-users