|
From: Maarten B. <sou...@ds...> - 2025-01-10 11:01:44
|
Philipp Klaus Krause wrote on 2025-01-10 10:59: > For the Rabbit ports, I'm considering introducing memory models where > __far pointers are wider than generic pointers. I.e. the __far address > space would be a superset of the generic address space. > AFAIK, no other port currently does this. Will this cause problems? > > Reasons: > > The Rabbits have efficient access to a 16-bit address space. But > acessing a wider access space needs to be done using special > instructions. So we might want a memory model where we have efficient > memory access by default, and only use the special instructions when > accessing something in __far space. This is also how Dynamic C, the > compiler provided by the Rabbit vendor, does it. > > The alternative would be a mcs51-like approach, where we have __near > pointers for access to the 16-bit address space, and any unqualified > pointer points to __far by default. Like for mcs51, this would make > using generic pointers less efficient. > > Philipp I believe generic pointers should be able to hold function pointers. And I assume that this means that generic pointers can also hold far pointers. And thus the mcs51-like approach is required. Maarten |