• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ GETPC函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中GETPC函数的典型用法代码示例。如果您正苦于以下问题:C++ GETPC函数的具体用法?C++ GETPC怎么用?C++ GETPC使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了GETPC函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: HELPER

/* 128 -> 64/64 unsigned division */
uint64_t HELPER(divu64)(CPUS390XState *env, uint64_t ah, uint64_t al,
                        uint64_t b)
{
    uint64_t ret;
    /* Signal divide by zero.  */
    if (b == 0) {
        runtime_exception(env, PGM_FIXPT_DIVIDE, GETPC());
    }
    if (ah == 0) {
        /* 64 -> 64/64 case */
        env->retxl = al % b;
        ret = al / b;
    } else {
        /* ??? Move i386 idivq helper to host-utils.  */
#if HOST_LONG_BITS == 64 && defined(__GNUC__)
        /* assuming 64-bit hosts have __uint128_t */
        __uint128_t a = ((__uint128_t)ah << 64) | al;
        __uint128_t q = a / b;
        env->retxl = a % b;
        ret = q;
        if (ret != q) {
            runtime_exception(env, PGM_FIXPT_DIVIDE, GETPC());
        }
#else
        /* 32-bit hosts would need special wrapper functionality - just abort if
           we encounter such a case; it's very unlikely anyways. */
        cpu_abort(env, "128 -> 64/64 division not implemented\n");
#endif
    }
    return ret;
}
开发者ID:BernardXiong,项目名称:qemu,代码行数:32,代码来源:int_helper.c


示例2: helper_monitor

void helper_monitor(CPUX86State *env, target_ulong ptr)
{
    if ((uint32_t)env->regs[R_ECX] != 0) {
        raise_exception_ra(env, EXCP0D_GPF, GETPC());
    }
    /* XXX: store address? */
    cpu_svm_check_intercept_param(env, SVM_EXIT_MONITOR, 0, GETPC());
}
开发者ID:m000,项目名称:panda,代码行数:8,代码来源:misc_helper.c


示例3: helper_rdpmc

void helper_rdpmc(CPUX86State *env)
{
    if ((env->cr[4] & CR4_PCE_MASK) && ((env->hflags & HF_CPL_MASK) != 0)) {
        raise_exception_ra(env, EXCP0D_GPF, GETPC());
    }
    cpu_svm_check_intercept_param(env, SVM_EXIT_RDPMC, 0, GETPC());

    /* currently unimplemented */
    qemu_log_mask(LOG_UNIMP, "x86: unimplemented rdpmc\n");
    raise_exception_err(env, EXCP06_ILLOP, 0);
}
开发者ID:m000,项目名称:panda,代码行数:11,代码来源:misc_helper.c


示例4: helper_rdpkru

uint64_t helper_rdpkru(CPUX86State *env, uint32_t ecx)
{
    if ((env->cr[4] & CR4_PKE_MASK) == 0) {
        raise_exception_err_ra(env, EXCP06_ILLOP, 0, GETPC());
    }
    if (ecx != 0) {
        raise_exception_err_ra(env, EXCP0D_GPF, 0, GETPC());
    }

    return env->pkru;
}
开发者ID:m000,项目名称:panda,代码行数:11,代码来源:misc_helper.c


示例5: helper_boundl

void helper_boundl(CPUX86State *env, target_ulong a0, int v)
{
    int low, high;

    low = cpu_ldl_data_ra(env, a0, GETPC());
    high = cpu_ldl_data_ra(env, a0 + 4, GETPC());
    if (v < low || v > high) {
        if (env->hflags & HF_MPX_EN_MASK) {
            env->bndcs_regs.sts = 0;
        }
        raise_exception_ra(env, EXCP05_BOUND, GETPC());
    }
}
开发者ID:8tab,项目名称:qemu,代码行数:13,代码来源:mem_helper.c


示例6: helper_wrpkru

void helper_wrpkru(CPUX86State *env, uint32_t ecx, uint64_t val)
{
    CPUState *cs = CPU(x86_env_get_cpu(env));

    if ((env->cr[4] & CR4_PKE_MASK) == 0) {
        raise_exception_err_ra(env, EXCP06_ILLOP, 0, GETPC());
    }
    if (ecx != 0 || (val & 0xFFFFFFFF00000000ull)) {
        raise_exception_err_ra(env, EXCP0D_GPF, 0, GETPC());
    }

    env->pkru = val;
    tlb_flush(cs);
}
开发者ID:m000,项目名称:panda,代码行数:14,代码来源:misc_helper.c


示例7: helper_udiv_common

static target_ulong helper_udiv_common(CPUSPARCState *env, target_ulong a,
                                       target_ulong b, int cc)
{
    int overflow = 0;
    uint64_t x0;
    uint32_t x1;

    x0 = (a & 0xffffffff) | ((int64_t) (env->y) << 32);
    x1 = (b & 0xffffffff);

    if (x1 == 0) {
        cpu_restore_state2(env, GETPC());
        helper_raise_exception(env, TT_DIV_ZERO);
    }

    x0 = x0 / x1;
    if (x0 > 0xffffffff) {
        x0 = 0xffffffff;
        overflow = 1;
    }

    if (cc) {
        env->cc_dst = x0;
        env->cc_src2 = overflow;
        env->cc_op = CC_OP_DIV;
    }
    return x0;
}
开发者ID:BreakawayConsulting,项目名称:QEMU,代码行数:28,代码来源:helper.c


示例8: helper_tsubcctv

target_ulong helper_tsubcctv(CPUSPARCState *env, target_ulong src1,
                             target_ulong src2)
{
    target_ulong dst;

    /* Tag overflow occurs if either input has bits 0 or 1 set.  */
    if ((src1 | src2) & 3) {
        goto tag_overflow;
    }

    dst = src1 - src2;

    /* Tag overflow occurs if the subtraction overflows.  */
    if ((src1 ^ src2) & (src1 ^ dst) & (1u << 31)) {
        goto tag_overflow;
    }

    /* Only modify the CC after any exceptions have been generated.  */
    env->cc_op = CC_OP_TSUBTV;
    env->cc_src = src1;
    env->cc_src2 = src2;
    env->cc_dst = dst;
    return dst;

 tag_overflow:
    cpu_restore_state2(env, GETPC());
    helper_raise_exception(env, TT_TOVF);
}
开发者ID:BreakawayConsulting,项目名称:QEMU,代码行数:28,代码来源:helper.c


示例9: notmain

//------------------------------------------------------------------------
int notmain ( void )
{
    unsigned int ra;
    unsigned int rb;

    leds_off();
    uart_init();
    hexstring(0x12345678);
    hexstring(GETPC());
    hexstring(GETCPSR());
    hexstring(GETSCTLR());
    hexstring(GETMPIDR());
    hexstring(GET32(0x1000));
    hexstring(GET32(0x1004));
    hexstring(GET32(0x1008));

    if(1)
    {
        for(ra=0x000; ra<0x1000; ra+=4)
        {
            rb=GET32(ra);
            if(rb)
            {
                hexstrings(ra);
                hexstring(rb);
            }
        }
    }


    return(0);
}
开发者ID:dwelch67,项目名称:raspberrypi,代码行数:33,代码来源:uart01.c


示例10: helper_fsub_FT

float32 helper_fsub_FT(float32 t0, float32 t1)
{
    set_float_exception_flags(0, &env->fp_status);
    t0 = float32_sub(t0, t1, &env->fp_status);
    update_fpscr(GETPC());
    return t0;
}
开发者ID:B-Rich,项目名称:serialice,代码行数:7,代码来源:op_helper.c


示例11: helper_fsqrt_DT

float64 helper_fsqrt_DT(float64 t0)
{
    set_float_exception_flags(0, &env->fp_status);
    t0 = float64_sqrt(t0, &env->fp_status);
    update_fpscr(GETPC());
    return t0;
}
开发者ID:B-Rich,项目名称:serialice,代码行数:7,代码来源:op_helper.c


示例12: helper_fmul_DT

float64 helper_fmul_DT(float64 t0, float64 t1)
{
    set_float_exception_flags(0, &env->fp_status);
    t0 = float64_mul(t0, t1, &env->fp_status);
    update_fpscr(GETPC());
    return t0;
}
开发者ID:B-Rich,项目名称:serialice,代码行数:7,代码来源:op_helper.c


示例13: helper_fmul_FT

float32 helper_fmul_FT(CPUSH4State *env, float32 t0, float32 t1)
{
    set_float_exception_flags(0, &env->fp_status);
    t0 = float32_mul(t0, t1, &env->fp_status);
    update_fpscr(env, GETPC());
    return t0;
}
开发者ID:Flyalay,项目名称:kernel-qemu-pci,代码行数:7,代码来源:op_helper.c


示例14: helper_fsqrt_FT

float32 helper_fsqrt_FT(CPUSH4State *env, float32 t0)
{
    set_float_exception_flags(0, &env->fp_status);
    t0 = float32_sqrt(t0, &env->fp_status);
    update_fpscr(env, GETPC());
    return t0;
}
开发者ID:Flyalay,项目名称:kernel-qemu-pci,代码行数:7,代码来源:op_helper.c


示例15: helper_cmpxchg8b_unlocked

void helper_cmpxchg8b_unlocked(CPUX86State *env, target_ulong a0)
{
    uintptr_t ra = GETPC();
    uint64_t oldv, cmpv, newv;
    int eflags;

    eflags = cpu_cc_compute_all(env, CC_OP);

    cmpv = deposit64(env->regs[R_EAX], 32, 32, env->regs[R_EDX]);
    newv = deposit64(env->regs[R_EBX], 32, 32, env->regs[R_ECX]);

    oldv = cpu_ldq_data_ra(env, a0, ra);
    newv = (cmpv == oldv ? newv : oldv);
    /* always do the store */
    cpu_stq_data_ra(env, a0, newv, ra);

    if (oldv == cmpv) {
        eflags |= CC_Z;
    } else {
        env->regs[R_EAX] = (uint32_t)oldv;
        env->regs[R_EDX] = (uint32_t)(oldv >> 32);
        eflags &= ~CC_Z;
    }
    CC_SRC = eflags;
}
开发者ID:8tab,项目名称:qemu,代码行数:25,代码来源:mem_helper.c


示例16: helper_sti_vm

void helper_sti_vm(CPUX86State *env)
{
    env->eflags |= VIF_MASK;
    if (env->eflags & VIP_MASK) {
        raise_exception_ra(env, EXCP0D_GPF, GETPC());
    }
}
开发者ID:binape,项目名称:qemu,代码行数:7,代码来源:cc_helper.c


示例17: notmain

void notmain ( void ) {
    uart_init();
    hexstring(0x12345678);
    hexstring(GETPC());
    timer_init();

    /*
     * 132 byte packet.  All fields are 1 byte except for the 128 byte data
     * payload.
     * 		+-----+------+----------+--....----+-----+
     * 		| SOH | blk# | 255-blk# | ..data.. | cksum |
     * 		+-----+------+----------+--....----+-----+
     * Protocol:
     * 	- first block# = 1.
     *  - CRC is over the whole packet
     *  - after all packets sent, sender transmits a single EOT (must ACK).
     */
    unsigned char block = 1;
    unsigned addr = ARMBASE;
    while (1) {
        unsigned char b;

        // We received an EOT, send an ACK, jump to beginning of code
        if((b = getbyte()) == EOT) {
            uart_send(ACK);
            BRANCHTO(ARMBASE);
            return; // NOTREACHED
        }

        /*
         * if first byte is not SOH, or second byte is not the
         * expected block number or the third byte is not its
         * negation, send a nak for a resend of this block.
         */
        if(b != SOH
                || getbyte() != block
                || getbyte() != (0xFF - block)) {
            uart_send(NAK);
            continue;
        }

        // get the data bytes
        int i;
        unsigned char cksum;
        for(cksum = i = 0; i < PAYLOAD_SIZE; i++) {
            cksum += (b = getbyte());
            PUT8(addr+i, b);
        }

        // Checksum failed: NAK the block
        if(getbyte() != cksum)
            uart_send(NAK);
        // Commit our addr pointer and go to next block.
        else {
            uart_send(ACK);
            addr += PAYLOAD_SIZE;
            block++;
        }
    }
}
开发者ID:cvphelps,项目名称:courseware,代码行数:60,代码来源:bootloader.c


示例18: helper_cmpxchg16b

void helper_cmpxchg16b(CPUX86State *env, target_ulong a0)
{
    uintptr_t ra = GETPC();

    if ((a0 & 0xf) != 0) {
        raise_exception_ra(env, EXCP0D_GPF, ra);
    } else {
#ifndef CONFIG_ATOMIC128
        cpu_loop_exit_atomic(ENV_GET_CPU(env), ra);
#else
        int eflags = cpu_cc_compute_all(env, CC_OP);

        Int128 cmpv = int128_make128(env->regs[R_EAX], env->regs[R_EDX]);
        Int128 newv = int128_make128(env->regs[R_EBX], env->regs[R_ECX]);

        int mem_idx = cpu_mmu_index(env, false);
        TCGMemOpIdx oi = make_memop_idx(MO_TEQ | MO_ALIGN_16, mem_idx);
        Int128 oldv = helper_atomic_cmpxchgo_le_mmu(env, a0, cmpv,
                                                    newv, oi, ra);

        if (int128_eq(oldv, cmpv)) {
            eflags |= CC_Z;
        } else {
            env->regs[R_EAX] = int128_getlo(oldv);
            env->regs[R_EDX] = int128_gethi(oldv);
            eflags &= ~CC_Z;
        }
        CC_SRC = eflags;
#endif
    }
}
开发者ID:8tab,项目名称:qemu,代码行数:31,代码来源:mem_helper.c


示例19: helper_invlpg

void helper_invlpg(CPUX86State *env, target_ulong addr)
{
    X86CPU *cpu = x86_env_get_cpu(env);

    cpu_svm_check_intercept_param(env, SVM_EXIT_INVLPG, 0, GETPC());
    tlb_flush_page(CPU(cpu), addr);
}
开发者ID:m000,项目名称:panda,代码行数:7,代码来源:misc_helper.c


示例20: helper_bndck

void helper_bndck(CPUX86State *env, uint32_t fail)
{
    if (unlikely(fail)) {
        env->bndcs_regs.sts = 1;
        raise_exception_ra(env, EXCP05_BOUND, GETPC());
    }
}
开发者ID:JMR-b,项目名称:qemu,代码行数:7,代码来源:mpx_helper.c



注:本文中的GETPC函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GETQUERY函数代码示例发布时间:2022-05-30
下一篇:
C++ GETOPERAND函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap