Welcome, Guest. Please login or register.

Author Topic: Will MorphOS go ARM?  (Read 7297 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline mschulz

Re: Will MorphOS go ARM?
« on: February 12, 2009, 08:17:25 AM »
Quote

CodeSmith wrote:
Ah, sign extension.  The bane of the bit banger.  Bitter experience has taught me to use typedef'd unsigned ints and chars for all low level datatypes.  I hope it didn't take Michal too long to find that bug,


Well, the problem was more complex. The virtual address space for PPC architecture is slightly larger than 4GB. Since I wanted to make it clear, I was in the need (at least to some degree) of 64 bit arithmetic. Yes, my fault :) but I really didn't knew, that a cast like:
Code: [Select]

uint64_t foo(void *addr)
{
    return (uint64_t)addr;
}

will sign-extend all addresses above 0x7fffffff :) Well :)

But no, it didn't took that much time. As soon as I saw that the PTE search in MMU tables fails for upper 2GB range, where it should not fail at all, I fixed it pretty quickly.