|
@@ -57,6 +57,7 @@ type
|
|
|
|
|
|
tcpupointerdef = class(tx86pointerdef)
|
|
tcpupointerdef = class(tx86pointerdef)
|
|
class function default_x86_data_pointer_type: tx86pointertyp; override;
|
|
class function default_x86_data_pointer_type: tx86pointertyp; override;
|
|
|
|
+ function alignment:shortint;override;
|
|
function pointer_arithmetic_int_type:tdef; override;
|
|
function pointer_arithmetic_int_type:tdef; override;
|
|
function pointer_subtraction_result_type:tdef; override;
|
|
function pointer_subtraction_result_type:tdef; override;
|
|
end;
|
|
end;
|
|
@@ -75,6 +76,7 @@ type
|
|
tcpuobjectdefclass = class of tcpuobjectdef;
|
|
tcpuobjectdefclass = class of tcpuobjectdef;
|
|
|
|
|
|
tcpuclassrefdef = class(tclassrefdef)
|
|
tcpuclassrefdef = class(tclassrefdef)
|
|
|
|
+ function alignment:shortint;override;
|
|
end;
|
|
end;
|
|
tcpuclassrefdefclass = class of tcpuclassrefdef;
|
|
tcpuclassrefdefclass = class of tcpuclassrefdef;
|
|
|
|
|
|
@@ -254,6 +256,15 @@ implementation
|
|
result:=(p.typ=pointerdef) and (tcpupointerdef(p).x86pointertyp=x86pt_huge);
|
|
result:=(p.typ=pointerdef) and (tcpupointerdef(p).x86pointertyp=x86pt_huge);
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+{****************************************************************************
|
|
|
|
+ tcpuclassrefdef
|
|
|
|
+****************************************************************************}
|
|
|
|
+
|
|
|
|
+ function tcpuclassrefdef.alignment:shortint;
|
|
|
|
+ begin
|
|
|
|
+ Result:=2;
|
|
|
|
+ end;
|
|
|
|
+
|
|
{****************************************************************************
|
|
{****************************************************************************
|
|
tcpuarraydef
|
|
tcpuarraydef
|
|
****************************************************************************}
|
|
****************************************************************************}
|
|
@@ -408,6 +419,14 @@ implementation
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
+ function tcpupointerdef.alignment:shortint;
|
|
|
|
+ begin
|
|
|
|
+ { on i8086, we use 16-bit alignment for all pointer types, even far and
|
|
|
|
+ huge (which are 4 bytes long) }
|
|
|
|
+ result:=2;
|
|
|
|
+ end;
|
|
|
|
+
|
|
|
|
+
|
|
function tcpupointerdef.pointer_arithmetic_int_type:tdef;
|
|
function tcpupointerdef.pointer_arithmetic_int_type:tdef;
|
|
begin
|
|
begin
|
|
if x86pointertyp=x86pt_huge then
|
|
if x86pointertyp=x86pt_huge then
|