From 2504a0ce6cc7964ccf912af2a529dc8bd505c2d2 Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Sun, 22 Nov 2015 11:49:32 +0000 Subject: [PATCH] + codeptruinttype/codeptrsinttype that has the same size as voidcodepointertype git-svn-id: trunk@32470 - --- compiler/psystem.pas | 19 +++++++++++++++++++ compiler/symdef.pas | 3 +++ 2 files changed, 22 insertions(+) diff --git a/compiler/psystem.pas b/compiler/psystem.pas index d38e8e5c83..e872ddf526 100644 --- a/compiler/psystem.pas +++ b/compiler/psystem.pas @@ -163,6 +163,25 @@ implementation voidcodepointertype:=voidpointertype; voidstackpointertype:=voidpointertype; {$endif i8086} + case voidcodepointertype.size of + 2: + begin + codeptruinttype:=u16inttype; + codeptrsinttype:=s16inttype; + end; + 4: + begin + codeptruinttype:=u32inttype; + codeptrsinttype:=s32inttype; + end; + 8: + begin + codeptruinttype:=u64inttype; + codeptrsinttype:=s64inttype; + end; + else + Internalerror(2015112106); + end; end; procedure create_intern_types; diff --git a/compiler/symdef.pas b/compiler/symdef.pas index 891c6d6cdf..dd646ee89c 100644 --- a/compiler/symdef.pas +++ b/compiler/symdef.pas @@ -1065,6 +1065,9 @@ interface { unsigned and signed ord type with the same size as a pointer } ptruinttype, ptrsinttype, + { unsigned and signed ord type with the same size as a codepointer } + codeptruinttype, + codeptrsinttype, { several types to simulate more or less C++ objects for GDB } vmttype, vmtarraytype,