can you compile to an asm file with ADS
like gcc -S option
if so do that and see what asm instructions you get.
but first I'd check ones that you've used L (ell) not 1 (numeric one) at the
end
with some screen font its hard to tell.
this is obviously not your code because
0x60000 * 0x40000 == 0x1800000000 (eight 0's not six)
my vote is a typo (missing missing x in a hex constant so it appears as an
octal or dec)
if you realy want help post code you've tested and cunt'n'paste it from the
working/none working source, it help people spot the bgs from the typos,
without having to run test code ourselves (I'm lazy that way!)
Mike.
----- Original Message -----
From: "Emil Arkman" <emil_arkman@...>
To: <gbadev@yahoogroups.com>
Sent: Friday, February 01, 2002 7:02 PM
Subject: [gbadev] u64 multiply
> I was going to do a fixed point mul and got strange results from ADS 1.1.
>
> Might be a bad example since the error is not that big, but it's simple
> code:
>
> void func (void)
> {
> s64 aLong, bLong, cLong;
> aLong=0x60000ll;
> bLong=0x40000ll;
> c=a*b;
>
> // at this point cLong is 0x18002800 instead of 0x18000000
> }
>
> Anyone know why?
>
>
>
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>