diff options
author | peter <peter@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2007-07-31 12:26:40 +0000 |
---|---|---|
committer | peter <peter@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2007-07-31 12:26:40 +0000 |
commit | 518aa91c08834060853cfa69b951def5515fb6bb (patch) | |
tree | 0c430afce846324c6f0c4bac67599431882db40a | |
parent | 2d55949a493edbf468e8a699d9e3b27633ab3eea (diff) | |
download | fpc-518aa91c08834060853cfa69b951def5515fb6bb.tar.gz |
Merged revisions 8056 via svnmerge from
http://svn.freepascal.org/svn/fpc/trunk
........
r8056 | daniel | 2007-07-14 22:57:56 +0200 (Sat, 14 Jul 2007) | 2 lines
* Fix bug 9261.
........
git-svn-id: http://svn.freepascal.org/svn/fpc/branches/fixes_2_2@8203 3ad0048d-3df7-0310-abae-a5850022a9f2
-rw-r--r-- | compiler/defutil.pas | 9 | ||||
-rw-r--r-- | compiler/x86_64/cpupara.pas | 13 |
2 files changed, 19 insertions, 3 deletions
diff --git a/compiler/defutil.pas b/compiler/defutil.pas index ae5bb3ab1a..037ece832c 100644 --- a/compiler/defutil.pas +++ b/compiler/defutil.pas @@ -955,9 +955,14 @@ implementation begin if tprocvardef(def).is_methodpointer and (not tprocvardef(def).is_addressonly) then - result := OS_64 + if (sizeof(aint) = 4) then + result:=OS_64 + else if (sizeof(aint) = 8) then + result:=OS_128 + else + internalerror(200707141) else - result := OS_ADDR; + result:=OS_ADDR; end; stringdef : begin diff --git a/compiler/x86_64/cpupara.pas b/compiler/x86_64/cpupara.pas index cbbc97e5b6..97354c48e1 100644 --- a/compiler/x86_64/cpupara.pas +++ b/compiler/x86_64/cpupara.pas @@ -516,7 +516,18 @@ unit cpupara; begin paraloc:=hp.paraloc[side].add_location; paraloc^.loc:=LOC_REFERENCE; - if paracgsize in [OS_F32,OS_F64,OS_F80,OS_F128] then + {Hack alert!!! We should modify int_cgsize to handle OS_128, + however, since int_cgsize is called in many places in the + compiler where only a few can already handle OS_128, fixing it + properly is out of the question to release 2.2.0 in time. (DM)} + if paracgsize=OS_128 then + if paralen=8 then + paraloc^.size:=OS_64 + else if paralen=16 then + paraloc^.size:=OS_128 + else + internalerror(200707143) + else if paracgsize in [OS_F32,OS_F64,OS_F80,OS_F128] then paraloc^.size:=int_float_cgsize(paralen) else paraloc^.size:=int_cgsize(paralen); |