当前位置: 首页>>代码示例>>C++>>正文


C++ qemu_get_be32s函数代码示例

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


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

示例1: tcx_load

static int tcx_load(QEMUFile *f, void *opaque, int version_id)
{
    TCXState *s = opaque;
    uint32_t dummy;

    if (version_id != 3 && version_id != 4)
        return -EINVAL;

    if (version_id == 3) {
        qemu_get_be32s(f, &dummy);
        qemu_get_be32s(f, &dummy);
        qemu_get_be32s(f, &dummy);
    }
    qemu_get_be16s(f, &s->height);
    qemu_get_be16s(f, &s->width);
    qemu_get_be16s(f, &s->depth);
    qemu_get_buffer(f, s->r, 256);
    qemu_get_buffer(f, s->g, 256);
    qemu_get_buffer(f, s->b, 256);
    qemu_get_8s(f, &s->dac_index);
    qemu_get_8s(f, &s->dac_state);
    update_palette_entries(s, 0, 256);
    if (s->depth == 24)
        tcx24_invalidate_display(s);
    else
        tcx_invalidate_display(s);

    return 0;
}
开发者ID:BackupTheBerlios,项目名称:ar7-firmware-svn,代码行数:29,代码来源:tcx.c

示例2: ps2_common_load

static void ps2_common_load (QEMUFile *f, PS2State *s)
{
    qemu_get_be32s (f, &s->write_cmd);
    qemu_get_be32s (f, &s->queue.rptr);
    qemu_get_be32s (f, &s->queue.wptr);
    qemu_get_be32s (f, &s->queue.count);
    qemu_get_buffer (f, s->queue.data, sizeof (s->queue.data));
}
开发者ID:hackndev,项目名称:qemu,代码行数:8,代码来源:ps2.c

示例3: get_cpudouble

static int get_cpudouble(QEMUFile *f, void *pv, size_t size,
                         VMStateField *field)
{
    CPU_DoubleU *v = pv;
    qemu_get_be32s(f, &v->l.upper);
    qemu_get_be32s(f, &v->l.lower);
    return 0;
}
开发者ID:mmuman,项目名称:qemu,代码行数:8,代码来源:vmstate.c

示例4: cpu_get_timer

void cpu_get_timer(QEMUFile *f, CPUTimer *s)
{
    qemu_get_be32s(f, &s->frequency);
    qemu_get_be32s(f, &s->disabled);
    qemu_get_be64s(f, &s->disabled_mask);
    qemu_get_sbe64s(f, &s->clock_offset);

    qemu_get_timer(f, s->qtimer);
}
开发者ID:nvgreensocs,项目名称:qemu-arm-mmio,代码行数:9,代码来源:sun4u.c

示例5: ps2_kbd_load

static int ps2_kbd_load(QEMUFile* f, void* opaque, int version_id)
{
    PS2KbdState *s = (PS2KbdState*)opaque;

    if (version_id != 2)
        return -EINVAL;

    ps2_common_load (f, &s->common);
    qemu_get_be32s(f, &s->scan_enabled);
    qemu_get_be32s(f, &s->translate);
    return 0;
}
开发者ID:hackndev,项目名称:qemu,代码行数:12,代码来源:ps2.c

示例6: load_fpu

static void load_fpu(QEMUFile *f, CPUMIPSFPUContext *fpu)
{
    int i;

    for(i = 0; i < 32; i++)
        qemu_get_be64s(f, &fpu->fpr[i].d);
    qemu_get_s8s(f, &fpu->fp_status.float_detect_tininess);
    qemu_get_s8s(f, &fpu->fp_status.float_rounding_mode);
    qemu_get_s8s(f, &fpu->fp_status.float_exception_flags);
    qemu_get_be32s(f, &fpu->fcr0);
    qemu_get_be32s(f, &fpu->fcr31);
}
开发者ID:CriGio,项目名称:platform_external_qemu,代码行数:12,代码来源:machine.c

示例7: get_tlb

static int get_tlb(QEMUFile *f, void *pv, size_t size)
{
    r4k_tlb_t *v = pv;
    uint16_t flags;

    qemu_get_betls(f, &v->VPN);
    qemu_get_be32s(f, &v->PageMask);
    qemu_get_8s(f, &v->ASID);
    qemu_get_be16s(f, &flags);
    v->G = (flags >> 10) & 1;
    v->C0 = (flags >> 7) & 3;
    v->C1 = (flags >> 4) & 3;
    v->V0 = (flags >> 3) & 1;
    v->V1 = (flags >> 2) & 1;
    v->D0 = (flags >> 1) & 1;
    v->D1 = (flags >> 0) & 1;
    v->EHINV = (flags >> 15) & 1;
    v->RI1 = (flags >> 14) & 1;
    v->RI0 = (flags >> 13) & 1;
    v->XI1 = (flags >> 12) & 1;
    v->XI0 = (flags >> 11) & 1;
    qemu_get_betls(f, &v->PFN[0]);
    qemu_get_betls(f, &v->PFN[1]);

    return 0;
}
开发者ID:AdrianHuang,项目名称:qemu,代码行数:26,代码来源:machine.c

示例8: pxa2xx_keypad_load

static int pxa2xx_keypad_load(QEMUFile *f, void *opaque, int version_id)
{
    PXA2xxKeyPadState *s = (PXA2xxKeyPadState *) opaque;

    qemu_get_be32s(f, &s->kpc);
    qemu_get_be32s(f, &s->kpdk);
    qemu_get_be32s(f, &s->kprec);
    qemu_get_be32s(f, &s->kpmk);
    qemu_get_be32s(f, &s->kpas);
    qemu_get_be32s(f, &s->kpasmkp[0]);
    qemu_get_be32s(f, &s->kpasmkp[1]);
    qemu_get_be32s(f, &s->kpasmkp[2]);
    qemu_get_be32s(f, &s->kpasmkp[3]);
    qemu_get_be32s(f, &s->kpkdi);

    return 0;
}
开发者ID:Anastasiia-Lada,项目名称:QEMU-s5l89xx-port,代码行数:17,代码来源:pxa2xx_keypad.c

示例9: get_uint32_equal

static int get_uint32_equal(QEMUFile *f, void *pv, size_t size)
{
    uint32_t *v = pv;
    uint32_t v2;
    qemu_get_be32s(f, &v2);

    if (*v == v2) {
        return 0;
    }
    return -EINVAL;
}
开发者ID:Bludge0n,项目名称:qemu,代码行数:11,代码来源:vmstate.c

示例10: ps2_mouse_load

static int ps2_mouse_load(QEMUFile* f, void* opaque, int version_id)
{
    PS2MouseState *s = (PS2MouseState*)opaque;

    if (version_id != 2)
        return -EINVAL;

    ps2_common_load (f, &s->common);
    qemu_get_8s(f, &s->mouse_status);
    qemu_get_8s(f, &s->mouse_resolution);
    qemu_get_8s(f, &s->mouse_sample_rate);
    qemu_get_8s(f, &s->mouse_wrap);
    qemu_get_8s(f, &s->mouse_type);
    qemu_get_8s(f, &s->mouse_detect_state);
    qemu_get_be32s(f, &s->mouse_dx);
    qemu_get_be32s(f, &s->mouse_dy);
    qemu_get_be32s(f, &s->mouse_dz);
    qemu_get_8s(f, &s->mouse_buttons);
    return 0;
}
开发者ID:hackndev,项目名称:qemu,代码行数:20,代码来源:ps2.c

示例11: dma_load

static int dma_load(QEMUFile *f, void *opaque, int version_id)
{
    DMAState *s = opaque;
    unsigned int i;

    if (version_id != 1)
        return -EINVAL;
    for (i = 0; i < DMA_REGS; i++)
        qemu_get_be32s(f, &s->dmaregs[i]);

    return 0;
}
开发者ID:AmesianX,项目名称:winkvm,代码行数:12,代码来源:sparc32_dma.c

示例12: get_uint32_equal

static int get_uint32_equal(QEMUFile *f, void *pv, size_t size,
                            VMStateField *field)
{
    uint32_t *v = pv;
    uint32_t v2;
    qemu_get_be32s(f, &v2);

    if (*v == v2) {
        return 0;
    }
    error_report("%" PRIx32 " != %" PRIx32, *v, v2);
    return -EINVAL;
}
开发者ID:mmuman,项目名称:qemu,代码行数:13,代码来源:vmstate.c

示例13: pxa2xx_mmci_load

static int pxa2xx_mmci_load(QEMUFile *f, void *opaque, int version_id)
{
    PXA2xxMMCIState *s = (PXA2xxMMCIState *) opaque;
    int i;

    qemu_get_be32s(f, &s->status);
    qemu_get_be32s(f, &s->clkrt);
    qemu_get_be32s(f, &s->spi);
    qemu_get_be32s(f, &s->cmdat);
    qemu_get_be32s(f, &s->resp_tout);
    qemu_get_be32s(f, &s->read_tout);
    s->blklen = qemu_get_be32(f);
    s->numblk = qemu_get_be32(f);
    qemu_get_be32s(f, &s->intmask);
    qemu_get_be32s(f, &s->intreq);
    s->cmd = qemu_get_be32(f);
    qemu_get_be32s(f, &s->arg);
    s->cmdreq = qemu_get_be32(f);
    s->active = qemu_get_be32(f);
    s->bytesleft = qemu_get_be32(f);

    s->tx_len = qemu_get_byte(f);
    s->tx_start = 0;
    if (s->tx_len >= sizeof(s->tx_fifo) || s->tx_len < 0)
        return -EINVAL;
    for (i = 0; i < s->tx_len; i ++)
        s->tx_fifo[i] = qemu_get_byte(f);

    s->rx_len = qemu_get_byte(f);
    s->rx_start = 0;
    if (s->rx_len >= sizeof(s->rx_fifo) || s->rx_len < 0)
        return -EINVAL;
    for (i = 0; i < s->rx_len; i ++)
        s->rx_fifo[i] = qemu_get_byte(f);

    s->resp_len = qemu_get_byte(f);
    if (s->resp_len > 9 || s->resp_len < 0)
        return -EINVAL;
    for (i = s->resp_len; i < 9; i ++)
         qemu_get_be16s(f, &s->resp_fifo[i]);

    return 0;
}
开发者ID:16aug,项目名称:nvmeqemu,代码行数:43,代码来源:pxa2xx_mmci.c

示例14: cs_load

static int cs_load(QEMUFile *f, void *opaque, int version_id)
{
    CSState *s = opaque;
    unsigned int i;

    if (version_id > 1)
        return -EINVAL;

    for (i = 0; i < CS_REGS; i++)
        qemu_get_be32s(f, &s->regs[i]);

    qemu_get_buffer(f, s->dregs, CS_DREGS);
    return 0;
}
开发者ID:AmesianX,项目名称:winkvm,代码行数:14,代码来源:cs4231.c

示例15: sbi_load

static int sbi_load(QEMUFile *f, void *opaque, int version_id)
{
    SBIState *s = opaque;
    unsigned int i;

    if (version_id != 1)
        return -EINVAL;

    for (i = 0; i < MAX_CPUS; i++) {
        qemu_get_be32s(f, &s->intreg_pending[i]);
    }

    return 0;
}
开发者ID:ESOS-Lab,项目名称:VSSIM,代码行数:14,代码来源:sbi.c


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