Search the web
Sign In
New User? Sign Up
gbadev
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want to share photos of your group with the world? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
u64 multiply   Message List  
Reply | Forward Message #9733 of 15019 |
Re: [gbadev] u64 multiply

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/
>
>
>





Fri Feb 1, 2002 8:25 pm

mike.wynn@...
Send Email Send Email

Forward
Message #9733 of 15019 |
Expand Messages Author Sort by Date

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...
Emil Arkman
emil_arkman
Offline Send Email
Feb 1, 2002
7:05 pm

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...
Mike Wynn
mike.wynn@...
Send Email
Feb 2, 2002
1:17 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help