Back to index

lightning-sunbird  0.9+nobinonly
Functions
xptcinvoke_mips.cpp File Reference
#include "xptcprivate.h"

Go to the source code of this file.

Functions

uint32 invoke_count_words (PRUint32 paramCount, nsXPTCVariant *s)
void invoke_copy_to_stack (PRUint32 *d, PRUint32 paramCount, nsXPTCVariant *s)
nsresult _XPTC_InvokeByIndex (nsISupports *that, PRUint32 methodIndex, PRUint32 paramCount, nsXPTCVariant *params)
 XPTC_InvokeByIndex (nsISupports *that, PRUint32 methodIndex, PRUint32 paramCount, nsXPTCVariant *params)

Function Documentation

nsresult _XPTC_InvokeByIndex ( nsISupports *  that,
PRUint32  methodIndex,
PRUint32  paramCount,
nsXPTCVariant params 
)
void invoke_copy_to_stack ( PRUint32 d,
PRUint32  paramCount,
nsXPTCVariant s 
)

Definition at line 77 of file xptcinvoke_mips.cpp.

{
    // Skip the unused a0 slot, which we keep only for register pair alignment.
    d++;

    for (PRUint32 i = 0; i < paramCount; i++, d++, s++)
    {
        if (s->IsPtrData())
        {
            *((void**)d) = s->ptr;
            continue;
        }

        *((void**)d) = s->val.p;

        switch(s->type)
        {
        case nsXPTType::T_I64    :
            if ((PRWord)d & 4) d++;
            *((PRInt64*) d)  = s->val.i64;    d++;
            break;
        case nsXPTType::T_U64    :
            if ((PRWord)d & 4) d++;
            *((PRUint64*) d) = s->val.u64;    d++;
            break;
        case nsXPTType::T_DOUBLE :
            if ((PRWord)d & 4) d++;
            *((double*)   d) = s->val.d;      d++;
            break;
        }
    }
}

Here is the call graph for this function:

uint32 invoke_count_words ( PRUint32  paramCount,
nsXPTCVariant s 
)

Definition at line 50 of file xptcinvoke_mips.cpp.

{
    // Count a word for a0 even though it's never stored or loaded
    // We do this only for alignment of register pairs.
    PRUint32 result = 1;
    for (PRUint32 i = 0; i < paramCount; i++, s++)
    {
        result++;

        if (s->IsPtrData())
            continue;

        switch(s->type)
        {
        case nsXPTType::T_I64    :
        case nsXPTType::T_U64    :
        case nsXPTType::T_DOUBLE :
           if (result & 1)
              result++;
           result++;
           break;
        }
    }
    return (result + 1) & ~(PRUint32)1;
}

Here is the call graph for this function:

XPTC_InvokeByIndex ( nsISupports *  that,
PRUint32  methodIndex,
PRUint32  paramCount,
nsXPTCVariant params 
)

Definition at line 117 of file xptcinvoke_mips.cpp.

{
    return _XPTC_InvokeByIndex(that, methodIndex, paramCount, params);
}    

Here is the call graph for this function: