search for: ccpassbyv

Displaying 5 results from an estimated 5 matches for "ccpassbyv".

Did you mean: ccpassbyval
2013 Jul 04
2
[LLVMdev] making a copy of a byval aggregate on the callee's frame
...he LowerCall is doing what it needs to do - passing pointer either on the stack or in register as per ABI. The LowerFormalArguments() is where I am stuck. LowerFormalArguments () calls CCInfo.AnalyzeFormalArguments(Ins, CC_XCore), which calls the CC_XCore(). This is where I placed the CCIfByVal<CCPassByVal<0,4>> which only pushed the pointer to the stack. However, I don't want to push the pointer to the stack but COPY the pointee. Indeed, I want to keep the pointer where it is BUT re-point it to a new object copied onto the callee's stack. Hmmm What I really want it something like:...
2013 Jul 04
0
[LLVMdev] making a copy of a byval aggregate on the callee's frame
...ing pointer either on the stack or in register as per ABI. >From very quick test-cases with no understanding of XCore, that looks plausible. > LowerFormalArguments () calls CCInfo.AnalyzeFormalArguments(Ins, CC_XCore), which calls the CC_XCore(). > This is where I placed the CCIfByVal<CCPassByVal<0,4>> which only pushed the pointer to the stack. Really, all it did was ask LowerCall and LowerFormalArguments to pass the pointer on the stack (well, strictly "ByVal") as they see fit. > static bool CC_XCore(...) { > <does weird and wonderful stuff> > }...
2013 Jul 04
2
[LLVMdev] making a copy of a byval aggregate on the callee's frame
...ionProlog() and it works - but it is not nice. BUT it seems most believe that it should be done within llvm using 'byVal'. I have tried to follow the the 'byval' flag but am too ignorant to make any meaningful headway viz: I tried adding to the XCoreCallingConv.td: CCIfByVal<CCPassByVal<0,4>> // pushes pointer to the stack and CCIfByVal<CCCustom<"XCoreCC_CustomByVal">> But Have got stuck knowing if I can add the copy at this stage. Is the pointee's details available or only the pointer's? (Sorry if I have not dug deep enough to t...
2013 Jul 04
0
[LLVMdev] making a copy of a byval aggregate on the callee's frame
Hi Robert, > I tried adding to the XCoreCallingConv.td: > CCIfByVal<CCPassByVal<0,4>> // pushes pointer to the stack This looks sensible to me. After that it comes down to cooperation between XCoreISelLowering's LowerFormalArguments and LowerCall functions. LowerFormalArguments is at the beginning of a function and is responsible for taking arguments out...
2013 Jul 04
2
[LLVMdev] making a copy of a byval aggregate on the callee's frame
Hi Tim, I may be missing something but using CCPassByVal is moving the pointer onto the stack - not what I'm after. I need to add an operation to the function prolog that actually makes a copy of the pointed to data. It is the responsibility of the callee to make the copy, not the caller - hence my trouble. (currently the callee can corrupt the ori...