mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-02 14:22:40 +02:00
+ added i8086-specific methods tai_const.Create_sym_near and tai_const.Create_sym_far, which allow creating explicitly a near or far ptr const, regardless of current memory model's defaults
git-svn-id: trunk@25502 -
This commit is contained in:
parent
5b9341df76
commit
3bc89a50ed
@ -531,6 +531,9 @@ interface
|
||||
|
||||
|
||||
{ Generates an integer const }
|
||||
|
||||
{ tai_const }
|
||||
|
||||
tai_const = class(tai)
|
||||
sym,
|
||||
endsym : tasmsymbol;
|
||||
@ -557,6 +560,10 @@ interface
|
||||
constructor Create_pint(_value : pint);
|
||||
constructor Create_pint_unaligned(_value : pint);
|
||||
constructor Create_sym(_sym:tasmsymbol);
|
||||
{$ifdef i8086}
|
||||
constructor Create_sym_near(_sym:tasmsymbol);
|
||||
constructor Create_sym_far(_sym:tasmsymbol);
|
||||
{$endif i8086}
|
||||
constructor Create_type_sym(_typ:taiconst_type;_sym:tasmsymbol);
|
||||
constructor Create_sym_offset(_sym:tasmsymbol;ofs:aint);
|
||||
constructor Create_type_sym_offset(_typ:taiconst_type;_sym:tasmsymbol;ofs:aint);
|
||||
@ -1618,6 +1625,21 @@ implementation
|
||||
end;
|
||||
|
||||
|
||||
{$ifdef i8086}
|
||||
constructor tai_const.Create_sym_near(_sym: tasmsymbol);
|
||||
begin
|
||||
self.create_sym(_sym);
|
||||
consttype:=aitconst_ptr;
|
||||
end;
|
||||
|
||||
constructor tai_const.Create_sym_far(_sym: tasmsymbol);
|
||||
begin
|
||||
self.create_sym(_sym);
|
||||
consttype:=aitconst_farptr;
|
||||
end;
|
||||
{$endif i8086}
|
||||
|
||||
|
||||
constructor tai_const.Create_sym_offset(_sym:tasmsymbol;ofs:aint);
|
||||
begin
|
||||
inherited Create;
|
||||
|
Loading…
Reference in New Issue
Block a user