search for: regcall

Displaying 6 results from an estimated 6 matches for "regcall".

Did you mean: recall
2016 Sep 22
2
RFC: Adding Register Calling Convention Support
Hi All, The Register Calling Convention (RegCall) was introduced by Intel to optimize parameter transfer on function call. This calling convention ensures that as many values as possible are passed or returned in registers. To use RegCall, place the keyword before a function declaration. For example: __regcall int foo (int i, int j); // Windows...
2017 Jan 09
5
RFC: Dynamically Allocated "Callee Saved Registers" Lists
...ee function. All other registers should be saved by the caller. Some CCs use additional condition: If the register is used for passing/returning arguments - the caller needs to save it - even if it is part of the Callee Saved Registers (CSR) list. For example consider the following function: void __regcall func(int a, int b, int c, int d, int e); According to RegCall CC, parameters d and e should reside in registers EDI and ESI. The problem is that these registers also appear in the CSR list of RegCall calling convention. So, since the registers were used to pass arguments the callee doesn't have...
2017 Jan 11
2
RFC: Dynamically Allocated "Callee Saved Registers" Lists
...ee function. All other registers should be saved by the caller. Some CCs use additional condition: If the register is used for passing/returning arguments – the caller needs to save it - even if it is part of the Callee Saved Registers (CSR) list. For example consider the following function: void __regcall func(int a, int b, int c, int d, int e); According to RegCall CC, parameters d and e should reside in registers EDI and ESI. The problem is that these registers also appear in the CSR list of RegCall calling convention. So, since the registers were used to pass arguments the callee doesn’t have to...
2017 Jan 12
2
RFC: Dynamically Allocated "Callee Saved Registers" Lists
...ee function. All other registers should be saved by the caller. Some CCs use additional condition: If the register is used for passing/returning arguments – the caller needs to save it - even if it is part of the Callee Saved Registers (CSR) list. For example consider the following function: void __regcall func(int a, int b, int c, int d, int e); According to RegCall CC, parameters d and e should reside in registers EDI and ESI. The problem is that these registers also appear in the CSR list of RegCall calling convention. So, since the registers were used to pass arguments the callee doesn’t have to...
2017 Jan 12
2
RFC: Dynamically Allocated "Callee Saved Registers" Lists
...tions "The proposed solution is to dynamically allocate the CSR lists”, which I thought is exactly what’s done in IPRA. Back to my point: outside of implementation details: my high-level impression is that it seems we need a "dynamic calling convention” mechanism in both case (IPRA and __regcall CC), and I’d approach this layer/feature independently as such (not just as the minimum ad-hoc structure to support one particular CC). Best, Mehdi Regarding immutable pass, I am not familiar with immutable passes that hold correctness information (can you share an example?). Thanks, Oren F...
2017 Jan 12
2
RFC: Dynamically Allocated "Callee Saved Registers" Lists
Here in an example that explains the difference. // Only declaration – No implementation // Assume that the value is returned in EAX and the arguments are passed in EAX, ECX, EDX, ESI, EDI. int __regcall callee (int a, int b, int c, int d, int e); // implemented in a different module void caller() { … x = callee(1,2,3,4,5); … } What will be RegMask using IPRA register usage collector? Callee Saved Registers (from the static register mask) minus RAX. What should really be the RegMask? Callee Sav...