>>>>> "JR" == Jens Rieks <[EMAIL PROTECTED]> writes:

JR> Hi,
JR> On Monday 22 March 2004 10:44, Ilya Martynov wrote:
>> Hello all,
>> 
>> 1) First question is how to tell if variadic function recieved 11 or
>> 12 or more params (for simplicity let's suppose that we use only
>> pmc parameters).
>> 
>> According calling conventions (pdd03) first 11 params end up in P5-P15
>> registers and leftover goes into array in P3. The problem is that
>> there is no indication (unless I'm missing something) if function was
>> called with more than 11 params other than register P3 being
>> initialized with some array PMC. But it may be as well that function
>> was called with just 11 params and P3 contains some array by accident
>> (it could be for example some array from previous sub call).
JR> I0=1 => prototyped  I0=0 => unprototyped
JR> I1=number of INT parameters
JR> I2=number of STRING parameters
JR> I3=number of PMC parameters
JR> I4=number of NUM parameters

These registers contain number of parameters stored in *registers*. It
doesn't include left-over parameters in array in P3. It is always 11
if you have more than 11 parameters.

>> [..snip..]

-- 
Ilya Martynov,  [EMAIL PROTECTED]
CTO IPonWEB (UK) Ltd
Quality Perl Programming and Unix Support
UK managed @ offshore prices - http://www.iponweb.net
Personal website - http://martynov.org

Reply via email to