Skip to content

Code generated for function returning struct incompatible with native ABI #9538

@ZviRackover

Description

@ZviRackover
Bugzilla Link 9166
Resolution FIXED
Resolved on Feb 15, 2012 17:50
Version trunk
OS Windows XP
Attachments Reproducer test, Fix Candidate
CC @AaronBallman,@asl,@jckarter

Extended Description

The Win32 native compiler, VC, generates a call to a function returning a struct in the following manner:

  1. The caller allocates a buffer which will be filled by the caller with the return value
  2. Before calling, the caller pushes the address of this buffer on the stack
  3. Unlike other targets, such as Linux32, the callee does not pop the address before returning

Currently, the Win32 target does not follow the above rules. This becomes an issue when native-compiled and LLVM-compiled codes are mixed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions