[fpc-devel] i8086 huge pointers

Nikolay Nikolov nickysn at gmail.com
Wed Apr 9 16:39:51 CEST 2014


On 9.4.2014 г. 16:32, Max Nazhalov wrote:
> Wednesday, April 9, 2014, Nikolay Nikolov wrote:
>> Hmm, then maybe we should support both and add a
>> {$HUGEPOINTERNORMALIZATION} directive?
> Well, I don't know for sure..
> But I think introducing huge pointers implies introduction of some minimal
> support routines, like [h]move(hugefrom,hugeto,hugelen), [h]fill(..), etc.
> Implementation of such routines is quite different among "normalized real"
> and "unnormalized common" modes, so going clean way sadly will require twice
> effort (and a quadruple maintenance, I suspect.. );

Yes, huge pointers will need RTL helper routines, but IMHO, not that 
many and they would be relatively simple. I think only pointer 
arithmetic will need helpers (i.e. adding a pointer with an integer and 
pointer difference). As for the other routines in the RTL like 
(h)FillChar and (h)Move, they will have to be made to work with 
unnormalized huge pointers (in order to support 16-bit protected mode) 
and this way they will automatically work with normalized huge pointers 
as well.

Nikolay



More information about the fpc-devel mailing list