mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-18 20:39:43 +02:00
* 8086: Fixed using far procvars in a near code memory model and vice versa.
git-svn-id: trunk@46558 -
This commit is contained in:
parent
6a3971c9b6
commit
eee67af684
@ -249,14 +249,16 @@ implementation
|
||||
(size.typ=classrefdef) then
|
||||
size:=voidpointertype;
|
||||
|
||||
{ procvars follow the default code pointer size for the current memory model }
|
||||
if size.typ=procvardef then
|
||||
if ((po_methodpointer in tprocvardef(size).procoptions) or
|
||||
is_nested_pd(tprocvardef(size))) and
|
||||
not(po_addressonly in tprocvardef(size).procoptions) then
|
||||
internalerror(2015120101)
|
||||
else
|
||||
size:=voidcodepointertype;
|
||||
if is_proc_far(tabstractprocdef(size)) then
|
||||
size:=voidfarpointertype
|
||||
else
|
||||
size:=voidnearpointertype;
|
||||
|
||||
if is_farpointer(size) or is_hugepointer(size) then
|
||||
Result:=cg.getintregister(list,OS_32)
|
||||
|
Loading…
Reference in New Issue
Block a user