Re: [Mspgcc-users] Question about libgcc 16x16=>32 multiply

2007-03-22 Thread Ralf Hildebrandt
Grant Edwards wrote: uint32_t r; void foo(uint16_t u1, uint16_t u2) { r = (uint32_t)u1 * (uint32_t)u2; } This will result in a 32x32 Bit Multiplication with the result cropped to 32 Bits. Try: r = (uint32_t)u1 * u2; Smart compilers will then recognize, that you are demand

Re: [Mspgcc-users] Question about libgcc 16x16=>32 multiply

2007-03-22 Thread Oleg Verych
> From: Grant Edwards > Newsgroups: gmane.comp.hardware.texas-instruments.msp430.gcc.user > Subject: Question about libgcc 16x16=>32 multiply > Date: Thu, 22 Mar 2007 20:23:28 + (UTC) Hallo. > uint32_t r; > > void foo(uint16_t u1, uint16_t u2) > { > r = (uint32_t)u1 * (uint32_t

Re: [Mspgcc-users] Building mspgcc on Ubuntu x86_64

2007-03-22 Thread Oleg Verych
> From: John Pitney > Newsgroups: gmane.comp.hardware.texas-instruments.msp430.gcc.user > Subject: Building mspgcc on Ubuntu x86_64 > Date: Sat, 17 Mar 2007 19:57:16 -0500 > Hi, > > I'm having a problem compiling mspgcc on my Ubuntu 6.06 x86_64 system. There are two relatively new deb reposito

[Mspgcc-users] Question about libgcc 16x16=>32 multiply

2007-03-22 Thread Grant Edwards
uint32_t r; void foo(uint16_t u1, uint16_t u2) { r = (uint32_t)u1 * (uint32_t)u2; } I've been looking at the code for the case above: 1 foo: 2 pushr11 3 pushr10 4 mov r15, r10 5 mov r14, r12 6