* rm support for Mem without segment on i8086

git-svn-id: trunk@24780 -
This commit is contained in:
nickysn 2013-06-02 16:20:26 +00:00
parent dd0d2d6bf5
commit 7edabc64e6

View File

@ -1868,33 +1868,22 @@ implementation
(tloadnode(p1).symtableentry.name='MEML')) then (tloadnode(p1).symtableentry.name='MEML')) then
begin begin
{$if defined(i8086)} {$if defined(i8086)}
if try_to_consume(_COLON) then consume(_COLON);
begin inserttypeconv(p2,u16inttype);
inserttypeconv(p2,u16inttype); inserttypeconv_internal(p2,u32inttype);
inserttypeconv_internal(p2,u32inttype); p3:=cshlshrnode.create(shln,p2,cordconstnode.create($10,s16inttype,false));
p3:=cshlshrnode.create(shln,p2,cordconstnode.create($10,s16inttype,false)); p2:=comp_expr(true,false);
p2:=comp_expr(true,false); inserttypeconv(p2,u16inttype);
inserttypeconv(p2,u16inttype); inserttypeconv_internal(p2,u32inttype);
inserttypeconv_internal(p2,u32inttype); p2:=caddnode.create(addn,p2,p3);
p2:=caddnode.create(addn,p2,p3); case tloadnode(p1).symtableentry.name of
case tloadnode(p1).symtableentry.name of 'MEM': p2:=ctypeconvnode.create_internal(p2,bytefarpointertype);
'MEM': p2:=ctypeconvnode.create_internal(p2,bytefarpointertype); 'MEMW': p2:=ctypeconvnode.create_internal(p2,wordfarpointertype);
'MEMW': p2:=ctypeconvnode.create_internal(p2,wordfarpointertype); 'MEML': p2:=ctypeconvnode.create_internal(p2,longintfarpointertype);
'MEML': p2:=ctypeconvnode.create_internal(p2,longintfarpointertype); else
else internalerror(2013053102);
internalerror(2013053102); end;
end; p1:=cderefnode.create(p2);
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;
{$elseif defined(i386)} {$elseif defined(i386)}
if try_to_consume(_COLON) then if try_to_consume(_COLON) then
begin begin