lxdream.org :: Forums :: View topic - sh4/mmu.c mmu_ext_page_remapped() problem
lxdream 0.9.1
released Jun 29
Download Now
It is currently Mon May 20, 2013 6:08 am

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: sh4/mmu.c mmu_ext_page_remapped() problem
PostPosted: Wed Feb 04, 2009 11:32 am 
Offline

Joined: Wed Feb 04, 2009 10:24 am
Posts: 1
Hello,

I 'm using linux and gcc version 4.3.2, compiled svn version seems to hang on this loop
for( i=0; i<= 0xC0000000; i+= 0x20000000 )

i think it has something to do with the fact that
unsigned 0xC0000000 is 3221225472 and the same value in signed int i is -1073741824


I'm not 100% sure I'm right about that, but it looks like it is working with "i" type changed to unsigned int

ps
thanks for the great work


Top
 Profile  
 
 Post subject: Re: sh4/mmu.c mmu_ext_page_remapped() problem
PostPosted: Wed Feb 04, 2009 9:47 pm 
Offline
Admin

Joined: Mon Jun 26, 2006 9:47 pm
Posts: 293
kaz wrote:
Hello,

I 'm using linux and gcc version 4.3.2, compiled svn version seems to hang on this loop
for( i=0; i<= 0xC0000000; i+= 0x20000000 )

i think it has something to do with the fact that
unsigned 0xC0000000 is 3221225472 and the same value in signed int i is -1073741824


I'm not 100% sure I'm right about that, but it looks like it is working with "i" type changed to unsigned int


It may be that gcc 4.2 treats this as an unsigned comparison but 4.3 does a signed comparison - either way you're right that i should be unsigned. Fixed in r1000

Thanks for the finding this :)

Cheers,
Nathan


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group