no way to force gcc to issue 'dadd'
Instead:
asm volatile("dadd %1,%0": "=r" (a) : "r" (b));---------- Forwarded Message ---------- Subject: MSPGCC question Date: Thu, 21 Nov 2002 11:30:42 -0500 From: "Mark Stokes" <[email protected]> To: <[email protected]> Howdy, from South Carolina, USA. I am very pleased to find the MSPGCC project. Since I've developed a bunch of asm code for the 337 version of the MSP430, and am not upgrading to the 44x version, I really needed to find a solution that will work and not cost $2000 (IAR). I had been using the "Simulation Environment" provided by TI, but it doesn't support the flash devices. So, here I am. I have a very fundamental question: I am on a very tight power requirements budget. One of the things I am doing to meet that budget is to deal with most/all my numbers as BCD numbers. This means when I need to increment something, I use the DADD instruction. This is one of the reasons I like the MSP430 (that it has decimal math instructions). However, the IAR compiler doesn't have any way to force the compiler to use these instructions when performing +/- operations. This seems stupid and I'm not interested in wasting the extra battery power it takes to constantly convert a hex# to a BCD# (I am using the onboard LCD output/driver). Is there a way (aside from generating a library of asm routines, which I'm not opposed to doing), to force mspgcc to use DADD? At the time (and I think only recently they have fixed this), IAR didn't even allow inline assembly, only inline-machine (which is totally useless). So after purchasing it for $3k (US), almost 3 years ago, I sent it back. If you want me to put this is the discussion, I will. But I thought I'd ask here first. Thanks -Mark Stokes -------------------------------------------------------
