Re: Returning structs in c_func

new topic     » goto parent     » topic index » view thread      » older message » newer message
jimcbrown said...
mattlewis said...

We'd have to figure out how to get that stuff off the stack. Yuck.

Hmm. Is this really more difficult than doing some pop() calls, like older versions of be_callc.c used to do for integer return types?

Could be. I just have no clue, personally.

jimcbrown said...
mattlewis said...

And I suspect it will work differently on different architectures. Double yuck.

I would have thought that this would actually depend on calling convention... I see no reason for the assembly code to work differently on an ARM vs x86-64 for this case.

Possibly. But they're all finicky in different ways.

jimcbrown said...
mattlewis said...

I would rather return a sequence containing the data as it would appear if you peeked it as a memstruct.

I agree that this is the better approach, but we'd need to support memstructs first before this can be done.

Yes. But it makes my head hurt to think that we're going to do it wrong.

Matt

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu