Well, it's in stdlib as opposed to being in binutils or gcc.  And has
nothing to do with hardware multiply being used in the demonstration
program.  A one-line program calling printf with a format parameter shows
the problem.

Which is that when msp430-libc builds the multi-lib variants, it doesn't
bother to tell the compiler which MCU class to use when building functions
(it does for the chip-specific crt0 modules, but not for the libc archives
that supposedly provide family-specific variants).  This falls under the
heading of "how did it ever work", the answer appears to be that it didn't.
The necessary distinguishing flags were not preserved when mspgcc3's two
variants (with/without hardware multiply) were converted to multilibs in
support of mspgcc4's six variants.

I'll get a new msp430-libc release out later today.

Peter

On Wed, Oct 6, 2010 at 5:28 AM, JMGross <[email protected]> wrote:

>
>
> Not necessarily IN it, only related to it. :)
> The question is, why got only this function compiled with reference/usage
> of the hwmul functions and all other didn't.
> Or do you just use only this one function that does multiplication?
> Is the complete stdlib compiled wrong and uses hwmul while it shouldn't? Or
> just strtol?  If so, why and how (all should be compiled the same way)
> Or is the linker using the wrong version of the stdlib? If so, why? And in
> this case it isn't the fault of the stdlib at all, but in the linker script.
>
> how did you redefine strtol? did you use your own version of it, do you not
> use it anymore or did you change something in the stdlib sources and
> recompiled it?
>
> My suggested hotfix was to write your own hwmul function override and use
> the stdlib normally. (the hwmul functions are in the gcclib and never called
> directly, they are helper functions the compiler calls depending on
> normal C multiplications, and they are weak, so you can write your own). I
> did so for the mspgcc3, so the functions use the MPY32 instead of the MPY16
> emulation where it is available. Much faster and also a bit
> smaller.
>
> JMGross
>
> ----- Ursprüngliche Nachricht -----
> Von: Paolo Zebelloni
> An: [email protected]
> Gesendet am: 06 Okt 2010 00:21:19
> Betreff: [Mspgcc-users] 227x HW multiplier problem identified (Paolo
> Zebelloni)
>
> Peter, JMGross,
>
> After a stupid patch (a simple redefinition of strtol) I can compile the
> whole
> project.
> Now I'm sure that problem ***IS*** in stdlib, as Peter said.
>
> Regards.
>
>
>
> ------------------------------------------------------------------------------
> Beautiful is writing same markup. Internet Explorer 9 supports
> standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
> Spend less time writing and  rewriting code and more time creating great
> experiences on the web. Be a part of the beta today.
> http://p.sf.net/sfu/beautyoftheweb
> _______________________________________________
> Mspgcc-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mspgcc-users
>
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Mspgcc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mspgcc-users

Reply via email to