diff options
author | Kai Tietz <kai.tietz@onevision.com> | 2010-04-12 18:04:44 +0000 |
---|---|---|
committer | Kai Tietz <ktietz@gcc.gnu.org> | 2010-04-12 20:04:44 +0200 |
commit | c1b8e1399f95bbedb88b5a37f9ba338b917f1d7f (patch) | |
tree | 707016651977c66c4e64b10ce1938e86ea72d132 /gcc | |
parent | b38bcccad0d85e4776e91fc5141382b60510e083 (diff) | |
download | gcc-c1b8e1399f95bbedb88b5a37f9ba338b917f1d7f.zip gcc-c1b8e1399f95bbedb88b5a37f9ba338b917f1d7f.tar.gz gcc-c1b8e1399f95bbedb88b5a37f9ba338b917f1d7f.tar.bz2 |
i386.c (x86_this_parameter): Handle aggregate for __thiscall convention.
2010-04-12 Kai Tietz <kai.tietz@onevision.com>
PR/43702
* config/i386/i386.c (x86_this_parameter): Handle aggregate for
__thiscall convention.
From-SVN: r158232
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 10 |
2 files changed, 12 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e46891f..0c7cb7f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2010-04-12 Kai Tietz <kai.tietz@onevision.com> + + PR/43702 + * config/i386/i386.c (x86_this_parameter): Handle aggregate for + __thiscall convention. + 2010-04-12 Steve Ellcey <sje@cup.hp.com> * config/pa/pa.c (hppa_legitimize_address): Remove unused variable diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 2c6a09c..b99fe2a 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -26232,11 +26232,13 @@ x86_this_parameter (tree function) if (lookup_attribute ("fastcall", TYPE_ATTRIBUTES (type))) regno = aggr ? DX_REG : CX_REG; - /* ???: To be verified. It is not absolutely clear how aggregates - have to be treated for thiscall. We assume that they are - identical to fastcall. */ else if (lookup_attribute ("thiscall", TYPE_ATTRIBUTES (type))) - regno = aggr ? DX_REG : CX_REG; + { + regno = CX_REG; + if (aggr) + return gen_rtx_MEM (SImode, + plus_constant (stack_pointer_rtx, 4)); + } else { regno = AX_REG; |