* fixed the comparison of near pointers in i8086 far data memory models

+ added charfarpointertype and charnearpointertype to symdef
* the system unit compiles in the i8086 compact memory model now

git-svn-id: trunk@27251 -
This commit is contained in:
nickysn 2014-03-24 00:34:52 +00:00
parent a0f08f3d5c
commit 71720533d7
3 changed files with 12 additions and 5 deletions

View File

@ -1635,15 +1635,14 @@ implementation
inserttypeconv_internal(left,java_jlobject);
inserttypeconv_internal(right,java_jlobject);
{$elseif defined(i8086)}
{ we don't have a charfarpointertype yet, so for far pointers we use bytefarpointertype }
if is_farpointer(left.resultdef) then
inserttypeconv_internal(left,bytefarpointertype)
inserttypeconv_internal(left,charfarpointertype)
else
inserttypeconv_internal(left,charpointertype);
inserttypeconv_internal(left,charnearpointertype);
if is_farpointer(right.resultdef) then
inserttypeconv_internal(right,bytefarpointertype)
inserttypeconv_internal(right,charfarpointertype)
else
inserttypeconv_internal(right,charpointertype);
inserttypeconv_internal(right,charnearpointertype);
{$else}
inserttypeconv_internal(left,charpointertype);
inserttypeconv_internal(right,charpointertype);

View File

@ -289,6 +289,8 @@ implementation
{$ifdef i8086}
voidfarpointertype:=tpointerdef.createx86(voidtype,x86pt_far);
voidhugepointertype:=tpointerdef.createx86(voidtype,x86pt_huge);
charnearpointertype:=tpointerdef.createx86(cansichartype,x86pt_near);
charfarpointertype:=tpointerdef.createx86(cansichartype,x86pt_far);
bytefarpointertype:=tpointerdef.createx86(u8inttype,x86pt_far);
wordfarpointertype:=tpointerdef.createx86(u16inttype,x86pt_far);
longintfarpointertype:=tpointerdef.createx86(s32inttype,x86pt_far);
@ -427,6 +429,8 @@ implementation
{$ifdef i8086}
addtype('$void_farpointer',voidfarpointertype);
addtype('$void_hugepointer',voidhugepointertype);
addtype('$char_nearpointer',charnearpointertype);
addtype('$char_farpointer',charfarpointertype);
addtype('$byte_farpointer',bytefarpointertype);
addtype('$word_farpointer',wordfarpointertype);
addtype('$longint_farpointer',longintfarpointertype);
@ -563,6 +567,8 @@ implementation
{$ifdef i8086}
loadtype('void_farpointer',voidfarpointertype);
loadtype('void_hugepointer',voidhugepointertype);
loadtype('char_nearpointer',charnearpointertype);
loadtype('char_farpointer',charfarpointertype);
loadtype('byte_farpointer',bytefarpointertype);
loadtype('word_farpointer',wordfarpointertype);
loadtype('longint_farpointer',longintfarpointertype);

View File

@ -907,6 +907,8 @@ interface
{$ifdef i8086}
voidfarpointertype,
voidhugepointertype,
charnearpointertype,
charfarpointertype,
bytefarpointertype, { used for Mem[] }
wordfarpointertype, { used for MemW[] }
longintfarpointertype, { used for MemL[] }