mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-27 11:10:23 +02:00
* rm support for Mem without segment on i8086
git-svn-id: trunk@24780 -
This commit is contained in:
parent
dd0d2d6bf5
commit
7edabc64e6
@ -1868,33 +1868,22 @@ implementation
|
||||
(tloadnode(p1).symtableentry.name='MEML')) then
|
||||
begin
|
||||
{$if defined(i8086)}
|
||||
if try_to_consume(_COLON) then
|
||||
begin
|
||||
inserttypeconv(p2,u16inttype);
|
||||
inserttypeconv_internal(p2,u32inttype);
|
||||
p3:=cshlshrnode.create(shln,p2,cordconstnode.create($10,s16inttype,false));
|
||||
p2:=comp_expr(true,false);
|
||||
inserttypeconv(p2,u16inttype);
|
||||
inserttypeconv_internal(p2,u32inttype);
|
||||
p2:=caddnode.create(addn,p2,p3);
|
||||
case tloadnode(p1).symtableentry.name of
|
||||
'MEM': p2:=ctypeconvnode.create_internal(p2,bytefarpointertype);
|
||||
'MEMW': p2:=ctypeconvnode.create_internal(p2,wordfarpointertype);
|
||||
'MEML': p2:=ctypeconvnode.create_internal(p2,longintfarpointertype);
|
||||
else
|
||||
internalerror(2013053102);
|
||||
end;
|
||||
p1:=cderefnode.create(p2);
|
||||
end
|
||||
else
|
||||
begin
|
||||
{ TODO: fix, this is broken for now... }
|
||||
if try_to_consume(_POINTPOINT) then
|
||||
{ Support mem[$80000000..$80000002] which returns array [0..2] of memtype.}
|
||||
p2:=crangenode.create(p2,comp_expr(true,false));
|
||||
p1:=cvecnode.create(p1,p2);
|
||||
include(tvecnode(p1).flags,nf_memindex);
|
||||
end;
|
||||
consume(_COLON);
|
||||
inserttypeconv(p2,u16inttype);
|
||||
inserttypeconv_internal(p2,u32inttype);
|
||||
p3:=cshlshrnode.create(shln,p2,cordconstnode.create($10,s16inttype,false));
|
||||
p2:=comp_expr(true,false);
|
||||
inserttypeconv(p2,u16inttype);
|
||||
inserttypeconv_internal(p2,u32inttype);
|
||||
p2:=caddnode.create(addn,p2,p3);
|
||||
case tloadnode(p1).symtableentry.name of
|
||||
'MEM': p2:=ctypeconvnode.create_internal(p2,bytefarpointertype);
|
||||
'MEMW': p2:=ctypeconvnode.create_internal(p2,wordfarpointertype);
|
||||
'MEML': p2:=ctypeconvnode.create_internal(p2,longintfarpointertype);
|
||||
else
|
||||
internalerror(2013053102);
|
||||
end;
|
||||
p1:=cderefnode.create(p2);
|
||||
{$elseif defined(i386)}
|
||||
if try_to_consume(_COLON) then
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user