core/x86/interp.c
/* inserts proper instruction(s) to restore XCX spilled on indirect branch mangling
 *    assumes target instrlist is a trace!
 * returns size to be added to trace 
 */
inserts proper instruction(s) to restore XCX spilled on indirect branch mangling
assumes target instrlist is a trace.
returns size to be added to trace
inserts proper instruction ( s ) to restore XCX spilled on indirect branch mangling assumes target instrlist is a trace . returns size to be added to trace
static inline int
insert_restore_spilled_xcx(dcontext_t *dcontext, instrlist_t *trace, instr_t *next)
{    
    int added_size = 0;
    if (DYNAMO_OPTION(private_ib_in_tls)) {
        added_size += tracelist_add(dcontext, trace, next, 
            INSTR_CREATE_mov_ld(dcontext,
                                opnd_create_reg(REG_XCX),
                                opnd_create_tls_slot(os_tls_offset(MANGLE_XCX_SPILL_SLOT))));
    } else {
        added_size += tracelist_add(dcontext, trace, next,
                                    instr_create_restore_from_dcontext
                                    (dcontext, REG_XCX, XCX_OFFSET));
    }
    return added_size;
}
static inline int insert_restore_spilled_xcx ( dcontext_t * dcontext , instrlist_t * trace , instr_t * next ) { int added_size = 0 ; if ( DYNAMO_OPTION ( private_ib_in_tls ) ) { added_size += tracelist_add ( dcontext , trace , next , INSTR_CREATE_mov_ld ( dcontext , opnd_create_reg ( REG_XCX ) , opnd_create_tls_slot ( os_tls_offset ( MANGLE_XCX_SPILL_SLOT ) ) ) ) ; } else { added_size += tracelist_add ( dcontext , trace , next , instr_create_restore_from_dcontext ( dcontext , REG_XCX , XCX_OFFSET ) ) ; } return added_size ; }
inserts proper instruction(s) to restore XCX spilled on indirect branch mangling
    assumes target instrlist is a trace!
inserts proper instruction ( s ) to restore XCX spilled on indirect branch mangling assumes target instrlist is a trace!
/* We need to restore XCX from TLS for shared fragments, but from
         * mcontext for private fragments, and all traces are private
         */