Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No standard calling convention(s) #2

Open
Blecki opened this issue Apr 17, 2012 · 3 comments
Open

No standard calling convention(s) #2

Blecki opened this issue Apr 17, 2012 · 3 comments

Comments

@Blecki
Copy link
Member

Blecki commented Apr 17, 2012

No description provided.

@Blecki
Copy link
Member Author

Blecki commented Apr 17, 2012

Suggest conforming to https://github.com/0x10cStandardsCommittee/0x10c-Standards/blob/master/ABI/ABI%20draft%202.txt or whatever is standardized by the committee.

@lifthrasiir
Copy link
Member

I agree on the use of ABI draft, but I'm not sure about rules for multiple returns (which the draft ABI does not address for now). For now I'm using B as a secondary return value (e.g. getline) but I may have to make them return only one argument.

Note that (seemingly) multiple returns are actually not rare in the real-world ABIs; x86-32 ABI has used EAX and EDX to return 64-bit integers, for example.

@Blecki
Copy link
Member Author

Blecki commented Apr 18, 2012

Since A, B and C are all clobberable a function can use all three to return values without technically violating the ABI. The issue would be the caller knowing that there's more than one return value, which can be indicated in the function header somehow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants