[LLVMdev] Handling SRet on Windows x86

Anton Korobeynikov asl at math.spbu.ru
Tue Oct 2 09:44:51 PDT 2012

Hello Timur,

>>> b) Should I be altering CC_X86_32_ThisCall
>>>     OR should I introduce CC_X86_Win32_ThisCall instead?
>>>     [Answer not clear to me - is there any platform besides Windows
>>>     that uses thiscall?]
>> no
> Can you please clarify which question you've answered here?
To both. You're assuming that Windows == MSVC. This is not true.

>> It's frontend responsibility to emit proper IR in this case.
> Isn't it what's SRet is supposed to be?
Yes and no. Yes, when source language / compiler semantics is
low-level enough, so it can be represented via single attribute. And
no - when there will be additional frontend job to "lift" the stuff.

With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University

More information about the llvm-dev mailing list