label int64 0 1 | func1 stringlengths 23 97k | id int64 0 27.3k |
|---|---|---|
1 | static void boston_mach_init(MachineState *machine) { DeviceState *dev; BostonState *s; Error *err = NULL; const char *cpu_model; MemoryRegion *flash, *ddr, *ddr_low_alias, *lcd, *platreg; MemoryRegion *sys_mem = get_system_memory(); XilinxPCIEHost *pcie2; PCIDevice *ahci; DriveInfo *hd[6]; Chardev *chr; int fw_size, f... | 1,479 |
1 | static int cng_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt) { AVFrame *frame = data; CNGContext *p = avctx->priv_data; int buf_size = avpkt->size; int ret, i; int16_t *buf_out; float e = 1.0; float scaling; if (avpkt->size) { int dbov = -avpkt->data[0]; p->target_energy = 1081109... | 1,480 |
0 | static int vfio_pci_hot_reset_multi(VFIOPCIDevice *vdev) { return vfio_pci_hot_reset(vdev, false); } | 1,481 |
0 | void qerror_print(QError *qerror) { QString *qstring = qerror_human(qerror); loc_push_restore(&qerror->loc); error_report("%s", qstring_get_str(qstring)); loc_pop(&qerror->loc); QDECREF(qstring); } | 1,482 |
0 | static int is_async_return(const QObject *data) { if (data && qobject_type(data) == QTYPE_QDICT) { return qdict_haskey(qobject_to_qdict(data), "__mon_async"); } return 0; } | 1,483 |
0 | static void stereo_processing(PSContext *ps, float (*l)[32][2], float (*r)[32][2], int is34) { int e, b, k, n; float (*H11)[PS_MAX_NUM_ENV+1][PS_MAX_NR_IIDICC] = ps->H11; float (*H12)[PS_MAX_NUM_ENV+1][PS_MAX_NR_IIDICC] = ps->H12; float (*H21)[PS_MAX_NUM_ENV+1][PS_MAX_NR_IIDICC] = ps->H21; float (*H22)[PS_MAX_NUM_ENV+1... | 1,484 |
0 | static int monitor_read_password(Monitor *mon, ReadLineFunc *readline_func, void *opaque) { if (mon->rs) { readline_start(mon->rs, "Password: ", 1, readline_func, opaque); /* prompt is printed on return from the command handler */ return 0; } else { monitor_printf(mon, "terminal does not support password prompting\n");... | 1,485 |
0 | static inline void gen_efdnabs(DisasContext *ctx) { if (unlikely(!ctx->spe_enabled)) { gen_exception(ctx, POWERPC_EXCP_APU); return; } #if defined(TARGET_PPC64) tcg_gen_ori_tl(cpu_gpr[rD(ctx->opcode)], cpu_gpr[rA(ctx->opcode)], 0x8000000000000000LL); #else tcg_gen_mov_tl(cpu_gpr[rD(ctx->opcode)], cpu_gpr[rA(ctx->opcode... | 1,486 |
0 | int vhost_dev_init(struct vhost_dev *hdev, void *opaque, VhostBackendType backend_type) { uint64_t features; int i, r; if (vhost_set_backend_type(hdev, backend_type) < 0) { close((uintptr_t)opaque); return -1; } if (hdev->vhost_ops->vhost_backend_init(hdev, opaque) < 0) { close((uintptr_t)opaque); return -errno; } r = ... | 1,488 |
0 | static void tcg_out_ld(TCGContext *s, TCGType type, TCGReg ret, TCGReg arg1, tcg_target_long arg2) { uint8_t *old_code_ptr = s->code_ptr; if (type == TCG_TYPE_I32) { tcg_out_op_t(s, INDEX_op_ld_i32); tcg_out_r(s, ret); tcg_out_r(s, arg1); tcg_out32(s, arg2); } else { assert(type == TCG_TYPE_I64); #if TCG_TARGET_REG_BIT... | 1,489 |
0 | static int tight_send_framebuffer_update(VncState *vs, int x, int y, int w, int h) { int max_rows; if (vs->clientds.pf.bytes_per_pixel == 4 && vs->clientds.pf.rmax == 0xFF && vs->clientds.pf.bmax == 0xFF && vs->clientds.pf.gmax == 0xFF) { vs->tight.pixel24 = true; } else { vs->tight.pixel24 = false; } if (vs->tight.qua... | 1,490 |
0 | void helper_booke206_tlbwe(CPUPPCState *env) { PowerPCCPU *cpu = ppc_env_get_cpu(env); uint32_t tlbncfg, tlbn; ppcmas_tlb_t *tlb; uint32_t size_tlb, size_ps; target_ulong mask; switch (env->spr[SPR_BOOKE_MAS0] & MAS0_WQ_MASK) { case MAS0_WQ_ALWAYS: /* good to go, write that entry */ break; case MAS0_WQ_COND: /* XXX che... | 1,491 |
0 | static uint32_t qpi_mem_readl(void *opaque, target_phys_addr_t addr) { CPUState *env; env = cpu_single_env; if (!env) return 0; return env->eflags & (IF_MASK | IOPL_MASK); } | 1,492 |
0 | static void test_visitor_out_number(TestOutputVisitorData *data, const void *unused) { double value = 3.14; QObject *obj; visit_type_number(data->ov, NULL, &value, &error_abort); obj = visitor_get(data); g_assert(qobject_type(obj) == QTYPE_QFLOAT); g_assert(qfloat_get_double(qobject_to_qfloat(obj)) == value); } | 1,493 |
0 | static int find_pte32(CPUPPCState *env, struct mmu_ctx_hash32 *ctx, target_ulong eaddr, int h, int rwx, int target_page_bits) { hwaddr pteg_off; target_ulong pte0, pte1; int i, good = -1; int ret, r; ret = -1; /* No entry found */ pteg_off = get_pteg_offset32(env, ctx->hash[h]); for (i = 0; i < HPTES_PER_GROUP; i++) { ... | 1,494 |
0 | int avpicture_get_size(enum AVPixelFormat pix_fmt, int width, int height) { const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt); AVPicture dummy_pict; int ret; if (!desc) return AVERROR(EINVAL); if ((ret = av_image_check_size(width, height, 0, NULL)) < 0) return ret; if (desc->flags & AV_PIX_FMT_FLAG_PSEUDOPA... | 1,495 |
0 | uint32_t HELPER(testblock)(CPUS390XState *env, uint64_t real_addr) { uintptr_t ra = GETPC(); CPUState *cs = CPU(s390_env_get_cpu(env)); int i; real_addr = wrap_address(env, real_addr) & TARGET_PAGE_MASK; /* Check low-address protection */ if ((env->cregs[0] & CR0_LOWPROT) && real_addr < 0x2000) { cpu_restore_state(cs, ... | 1,496 |
0 | static void block_dirty_bitmap_add_prepare(BlkActionState *common, Error **errp) { Error *local_err = NULL; BlockDirtyBitmapAdd *action; BlockDirtyBitmapState *state = DO_UPCAST(BlockDirtyBitmapState, common, common); if (action_check_completion_mode(common, errp) < 0) { return; } action = common->action->u.block_dirty... | 1,498 |
0 | int32_t scsi_req_enqueue(SCSIRequest *req, uint8_t *buf) { int32_t rc; assert(!req->enqueued); scsi_req_ref(req); req->enqueued = true; QTAILQ_INSERT_TAIL(&req->dev->requests, req, next); scsi_req_ref(req); rc = req->ops->send_command(req, buf); scsi_req_unref(req); return rc; } | 1,499 |
0 | static int sd_parse_uri(BDRVSheepdogState *s, const char *filename, char *vdi, uint32_t *snapid, char *tag) { URI *uri; QueryParams *qp = NULL; int ret = 0; uri = uri_parse(filename); if (!uri) { return -EINVAL; } /* transport */ if (!strcmp(uri->scheme, "sheepdog")) { s->is_unix = false; } else if (!strcmp(uri->scheme... | 1,501 |
0 | static void rtas_ibm_query_interrupt_source_number(sPAPREnvironment *spapr, uint32_t token, uint32_t nargs, target_ulong args, uint32_t nret, target_ulong rets) { uint32_t config_addr = rtas_ld(args, 0); uint64_t buid = ((uint64_t)rtas_ld(args, 1) << 32) | rtas_ld(args, 2); unsigned int intr_src_num = -1, ioa_intr_num ... | 1,502 |
0 | static void mpic_irq_raise(openpic_t *mpp, int n_CPU, IRQ_src_t *src) { int n_ci = IDR_CI0 - n_CPU; if(test_bit(&src->ide, n_ci)) { qemu_irq_raise(mpp->dst[n_CPU].irqs[OPENPIC_OUTPUT_CINT]); } else { qemu_irq_raise(mpp->dst[n_CPU].irqs[OPENPIC_OUTPUT_INT]); } } | 1,503 |
0 | static void tc6393xb_gpio_handler_update(TC6393xbState *s) { uint32_t level, diff; int bit; level = s->gpio_level & s->gpio_dir; for (diff = s->prev_level ^ level; diff; diff ^= 1 << bit) { bit = ffs(diff) - 1; qemu_set_irq(s->handler[bit], (level >> bit) & 1); } s->prev_level = level; } | 1,504 |
0 | static void spapr_cpu_core_realize(DeviceState *dev, Error **errp) { /* We don't use SPAPR_MACHINE() in order to exit gracefully if the user * tries to add a sPAPR CPU core to a non-pseries machine. */ sPAPRMachineState *spapr = (sPAPRMachineState *) object_dynamic_cast(qdev_get_machine(), TYPE_SPAPR_MACHINE); sPAPRCPU... | 1,505 |
1 | static int unpack_block_qpis(Vp3DecodeContext *s, GetBitContext *gb) { int qpi, i, j, bit, run_length, blocks_decoded, num_blocks_at_qpi; int num_blocks = s->total_num_coded_frags; for (qpi = 0; qpi < s->nqps-1 && num_blocks > 0; qpi++) { i = blocks_decoded = num_blocks_at_qpi = 0; bit = get_bits1(gb); do { run_length ... | 1,506 |
1 | static int coroutine_fn sd_co_flush_to_disk(BlockDriverState *bs) { BDRVSheepdogState *s = bs->opaque; SheepdogAIOCB *acb; AIOReq *aio_req; if (s->cache_flags != SD_FLAG_CMD_CACHE) { return 0; } acb = sd_aio_setup(bs, NULL, 0, 0); acb->aiocb_type = AIOCB_FLUSH_CACHE; acb->aio_done_func = sd_finish_aiocb; aio_req = allo... | 1,510 |
1 | void qemu_notify_event(void) { CPUState *env = cpu_single_env; qemu_event_increment (); if (env) { cpu_exit(env); } if (next_cpu && env != next_cpu) { cpu_exit(next_cpu); } exit_request = 1; } | 1,511 |
1 | static void tcg_out_qemu_ld(TCGContext* s, TCGReg data_reg, TCGReg addr_reg, TCGMemOpIdx oi) { TCGMemOp opc = get_memop(oi); #ifdef CONFIG_SOFTMMU unsigned mem_index = get_mmuidx(oi); tcg_insn_unit *label_ptr; TCGReg base_reg; base_reg = tcg_out_tlb_read(s, addr_reg, opc, mem_index, 1); label_ptr = s->code_ptr + 1; tcg... | 1,512 |
1 | char *qdist_pr_plain(const struct qdist *dist, size_t n) { struct qdist binned; char *ret; if (dist->n == 0) { return NULL; } qdist_bin__internal(&binned, dist, n); ret = qdist_pr_internal(&binned); qdist_destroy(&binned); return ret; } | 1,513 |
1 | static int dvvideo_encode_frame(AVCodecContext *c, uint8_t *buf, int buf_size, void *data) { DVVideoContext *s = c->priv_data; s->sys = dv_codec_profile(c); if (!s->sys) return -1; if(buf_size < s->sys->frame_size) return -1; c->pix_fmt = s->sys->pix_fmt; s->picture = *((AVFrame *)data); s->picture.key_frame = 1; s->pi... | 1,514 |
1 | static int mov_read_esds(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom) { AVStream *st = c->fc->streams[c->fc->nb_streams-1]; int tag, len; get_be32(pb); /* version + flags */ len = mp4_read_descr(c, pb, &tag); if (tag == MP4ESDescrTag) { get_be16(pb); /* ID */ get_byte(pb); /* priority */ } else get_be16(pb); /* I... | 1,515 |
1 | static void audio_run_in (AudioState *s) { HWVoiceIn *hw = NULL; while ((hw = audio_pcm_hw_find_any_enabled_in (hw))) { SWVoiceIn *sw; int captured, min; captured = hw->pcm_ops->run_in (hw); min = audio_pcm_hw_find_min_in (hw); hw->total_samples_captured += captured - min; hw->ts_helper += captured; for (sw = hw->sw_he... | 1,516 |
1 | static int avs_read_packet(AVFormatContext * s, AVPacket * pkt) { AvsFormat *avs = s->priv_data; int sub_type = 0, size = 0; AvsBlockType type = AVS_NONE; int palette_size = 0; uint8_t palette[4 + 3 * 256]; int ret; if (avs->remaining_audio_size > 0) if (avs_read_audio_packet(s, pkt) > 0) return 0; while (1) { if (avs-... | 1,517 |
1 | void HELPER(simcall)(CPUXtensaState *env) { uint32_t *regs = env->regs; switch (regs[2]) { case TARGET_SYS_exit: qemu_log("exit(%d) simcall\n", regs[3]); exit(regs[3]); break; case TARGET_SYS_read: case TARGET_SYS_write: { bool is_write = regs[2] == TARGET_SYS_write; uint32_t fd = regs[3]; uint32_t vaddr = regs[4]; uin... | 1,518 |
1 | static void decode_lpc(int32_t *coeffs, int mode, int length) { int i; if (length < 2) return; if (mode == 1) { unsigned a1 = *coeffs++; for (i = 0; i < length - 1 >> 1; i++) { *coeffs += a1; coeffs[1] += *coeffs; a1 = coeffs[1]; coeffs += 2; } if (length - 1 & 1) *coeffs += a1; } else if (mode == 2) { unsigned a1 = co... | 1,520 |
0 | static void term_init(void) { #ifndef __MINGW32__ struct termios tty; tcgetattr (0, &tty); oldtty = tty; tty.c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP |INLCR|IGNCR|ICRNL|IXON); tty.c_oflag |= OPOST; tty.c_lflag &= ~(ECHO|ECHONL|ICANON|IEXTEN); tty.c_cflag &= ~(CSIZE|PARENB); tty.c_cflag |= CS8; tty.c_cc[VMIN] = 1; tty.c... | 1,521 |
0 | static int xan_decode_frame_type0(AVCodecContext *avctx) { XanContext *s = avctx->priv_data; uint8_t *ybuf, *prev_buf, *src = s->scratch_buffer; unsigned chroma_off, corr_off; int cur, last; int i, j; int ret; chroma_off = bytestream2_get_le32(&s->gb); corr_off = bytestream2_get_le32(&s->gb); if ((ret = xan_decode_chro... | 1,522 |
0 | static int bethsoftvid_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) { BethsoftvidContext * vid = avctx->priv_data; char block_type; uint8_t * dst; uint8_t * frame_end; int remaining = avctx->width; // number of bytes remaining on a line const int wrap_to_next_line = vid->frame.linesi... | 1,523 |
0 | static void decode_delta_d(uint8_t *dst, const uint8_t *buf, const uint8_t *buf_end, int w, int flag, int bpp, int dst_size) { int planepitch = FFALIGN(w, 16) >> 3; int pitch = planepitch * bpp; int planepitch_byte = (w + 7) / 8; unsigned entries, ofssrc; GetByteContext gb, ptrs; PutByteContext pb; int k; if (buf_end -... | 1,524 |
0 | static void avc_luma_hv_qrt_and_aver_dst_8x8_msa(const uint8_t *src_x, const uint8_t *src_y, int32_t src_stride, uint8_t *dst, int32_t dst_stride) { uint32_t loop_cnt; v16i8 src_hz0, src_hz1, src_hz2, src_hz3; v16u8 dst0, dst1, dst2, dst3; v16i8 src_vt0, src_vt1, src_vt2, src_vt3; v16i8 src_vt4, src_vt5, src_vt6, src_v... | 1,526 |
1 | static void hScale8To19_c(SwsContext *c, int16_t *_dst, int dstW, const uint8_t *src, const int16_t *filter, const int16_t *filterPos, int filterSize) { int i; int32_t *dst = (int32_t *) _dst; for (i=0; i<dstW; i++) { int j; int srcPos= filterPos[i]; int val=0; for (j=0; j<filterSize; j++) { val += ((int)src[srcPos + j... | 1,527 |
1 | static void cpu_notify_map_clients_locked(void) { MapClient *client; while (!QLIST_EMPTY(&map_client_list)) { client = QLIST_FIRST(&map_client_list); client->callback(client->opaque); cpu_unregister_map_client(client); } } | 1,529 |
1 | int show_bsfs(void *optctx, const char *opt, const char *arg) { AVBitStreamFilter *bsf = NULL; printf("Bitstream filters:\n"); while ((bsf = av_bitstream_filter_next(bsf))) printf("%s\n", bsf->name); printf("\n"); return 0; } | 1,530 |
1 | static inline int decode_vui_parameters(H264Context *h, SPS *sps){ MpegEncContext * const s = &h->s; int aspect_ratio_info_present_flag; unsigned int aspect_ratio_idc; aspect_ratio_info_present_flag= get_bits1(&s->gb); if( aspect_ratio_info_present_flag ) { aspect_ratio_idc= get_bits(&s->gb, 8); if( aspect_ratio_idc ==... | 1,531 |
1 | void migration_set_incoming_channel(MigrationState *s, QIOChannel *ioc) { QEMUFile *f = qemu_fopen_channel_input(ioc); process_incoming_migration(f); } | 1,532 |
1 | static int buffered_rate_limit(void *opaque) { MigrationState *s = opaque; int ret; ret = qemu_file_get_error(s->file); if (ret) { return ret; } if (s->bytes_xfer > s->xfer_limit) { return 1; } return 0; } | 1,534 |
1 | static const unsigned char *seq_decode_op2(SeqVideoContext *seq, const unsigned char *src, unsigned char *dst) { int i; for (i = 0; i < 8; i++) { memcpy(dst, src, 8); src += 8; dst += seq->frame.linesize[0]; } return src; } | 1,535 |
1 | int opt_default(void *optctx, const char *opt, const char *arg) { const AVOption *o; int consumed = 0; char opt_stripped[128]; const char *p; const AVClass *cc = avcodec_get_class(), *fc = avformat_get_class(); const av_unused AVClass *rc_class; const AVClass *sc, *swr_class; if (!strcmp(opt, "debug") || !strcmp(opt, "... | 1,536 |
1 | static void event_test_emit(test_QAPIEvent event, QDict *d, Error **errp) { QObject *obj; QDict *t; int64_t s, ms; /* Verify that we have timestamp, then remove it to compare other fields */ obj = qdict_get(d, "timestamp"); g_assert(obj); t = qobject_to_qdict(obj); g_assert(t); obj = qdict_get(t, "seconds"); g_assert(o... | 1,537 |
0 | void ff_put_h264_qpel8_mc20_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride) { avc_luma_hz_8w_msa(src - 2, stride, dst, stride, 8); } | 1,538 |
0 | static void ini_print_object_header(const char *name) { int i; PrintElement *el = octx.prefix + octx.level -1; if (el->nb_elems) avio_printf(probe_out, "\n"); avio_printf(probe_out, "["); for (i = 1; i < octx.level; i++) { el = octx.prefix + i; avio_printf(probe_out, "%s.", el->name); if (el->index >= 0) avio_printf(pr... | 1,539 |
0 | int avformat_queue_attached_pictures(AVFormatContext *s) { int i; for (i = 0; i < s->nb_streams; i++) if (s->streams[i]->disposition & AV_DISPOSITION_ATTACHED_PIC && s->streams[i]->discard < AVDISCARD_ALL) { AVPacket copy = s->streams[i]->attached_pic; if (copy.size <= 0) return AVERROR(EINVAL); copy.buf = av_buffer_re... | 1,541 |
0 | static inline void mix_dualmono_to_mono(AC3DecodeContext *ctx) { int i; float (*output)[256] = ctx->audio_block.block_output; for (i = 0; i < 256; i++) output[1][i] += output[2][i]; memset(output[2], 0, sizeof(output[2])); } | 1,542 |
0 | static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) { PNGDecContext *const s = avctx->priv_data; const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; AVFrame *p = data; uint8_t *crow_buf_base = NULL; uint32_t tag, length; int ret; /* check signature */ if (buf_size < 8 |... | 1,543 |
0 | static bool rtas_event_log_contains(uint32_t event_mask) { sPAPREventLogEntry *entry = NULL; /* we only queue EPOW events atm. */ if ((event_mask & EVENT_MASK_EPOW) == 0) { return false; } QTAILQ_FOREACH(entry, &spapr->pending_events, next) { /* EPOW and hotplug events are surfaced in the same manner */ if (entry->log_... | 1,544 |
0 | static void test_visitor_out_native_list_int16(TestOutputVisitorData *data, const void *unused) { test_native_list(data, unused, USER_DEF_NATIVE_LIST_UNION_KIND_S16); } | 1,545 |
0 | void sh4_cpu_list(FILE *f, int (*cpu_fprintf)(FILE *f, const char *fmt, ...)) { int i; for (i = 0; i < ARRAY_SIZE(sh4_defs); i++) (*cpu_fprintf)(f, "%s\n", sh4_defs[i].name); } | 1,546 |
0 | static int qemu_rbd_set_conf(rados_t cluster, const char *conf) { char *p, *buf; char name[RBD_MAX_CONF_NAME_SIZE]; char value[RBD_MAX_CONF_VAL_SIZE]; int ret = 0; buf = g_strdup(conf); p = buf; while (p) { ret = qemu_rbd_next_tok(name, sizeof(name), p, '=', "conf option name", &p); if (ret < 0) { break; } if (!p) { er... | 1,547 |
0 | static void patch_reloc(tcg_insn_unit *code_ptr, int type, intptr_t value, intptr_t addend) { assert(type == R_ARM_PC24); assert(addend == 0); reloc_pc24(code_ptr, (tcg_insn_unit *)value); } | 1,548 |
0 | void ff_avg_h264_qpel8_mc13_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride) { avc_luma_hv_qrt_and_aver_dst_8x8_msa(src + stride - 2, src - (stride * 2), stride, dst, stride); } | 1,549 |
0 | static int v9fs_do_symlink(V9fsState *s, V9fsString *oldpath, V9fsString *newpath) { return s->ops->symlink(&s->ctx, oldpath->data, newpath->data); } | 1,550 |
0 | static int find_pte32 (mmu_ctx_t *ctx, int h, int rw) { return _find_pte(ctx, 0, h, rw); } | 1,551 |
0 | static int nic_load(QEMUFile * f, void *opaque, int version_id) { EEPRO100State *s = opaque; int i; int ret; if (version_id > 3) return -EINVAL; if (version_id >= 3) { ret = pci_device_load(&s->dev, f); if (ret < 0) return ret; } if (version_id >= 2) { qemu_get_8s(f, &s->rxcr); } else { s->rxcr = 0x0c; } qemu_get_8s(f,... | 1,552 |
0 | static uint32_t slavio_serial_mem_readb(void *opaque, target_phys_addr_t addr) { SerialState *ser = opaque; ChannelState *s; uint32_t saddr; uint32_t ret; int channel; saddr = (addr & 3) >> 1; channel = (addr & SERIAL_MAXADDR) >> 2; s = &ser->chn[channel]; switch (saddr) { case 0: SER_DPRINTF("Read channel %c, reg[%d] ... | 1,553 |
0 | int cpu_sparc_handle_mmu_fault (CPUState *env, uint32_t address, int rw, int is_user, int is_softmmu) { int exception = 0; int access_type, access_perms = 0, access_index = 0; uint8_t *pde_ptr; uint32_t pde, virt_addr; int error_code = 0, is_dirty, prot, ret = 0; unsigned long paddr, vaddr, page_offset; access_type = e... | 1,554 |
0 | static void gen_farith (DisasContext *ctx, enum fopcode op1, int ft, int fs, int fd, int cc) { const char *opn = "farith"; const char *condnames[] = { "c.f", "c.un", "c.eq", "c.ueq", "c.olt", "c.ult", "c.ole", "c.ule", "c.sf", "c.ngle", "c.seq", "c.ngl", "c.lt", "c.nge", "c.le", "c.ngt", }; const char *condnames_abs[] ... | 1,555 |
0 | static uint64_t ecc_mem_read(void *opaque, target_phys_addr_t addr, unsigned size) { ECCState *s = opaque; uint32_t ret = 0; switch (addr >> 2) { case ECC_MER: ret = s->regs[ECC_MER]; trace_ecc_mem_readl_mer(ret); break; case ECC_MDR: ret = s->regs[ECC_MDR]; trace_ecc_mem_readl_mdr(ret); break; case ECC_MFSR: ret = s->... | 1,556 |
0 | static int usb_host_handle_iso_data(USBHostDevice *s, USBPacket *p, int in) { AsyncURB *aurb; int i, j, ret, max_packet_size, offset, len = 0; uint8_t *buf; max_packet_size = usb_ep_get_max_packet_size(&s->dev, p->pid, p->devep); if (max_packet_size == 0) return USB_RET_NAK; aurb = get_iso_urb(s, p->pid, p->devep); if ... | 1,558 |
0 | static void gen_farith (DisasContext *ctx, uint32_t op1, int ft, int fs, int fd, int cc) { const char *opn = "farith"; const char *condnames[] = { "c.f", "c.un", "c.eq", "c.ueq", "c.olt", "c.ult", "c.ole", "c.ule", "c.sf", "c.ngle", "c.seq", "c.ngl", "c.lt", "c.nge", "c.le", "c.ngt", }; const char *condnames_abs[] = { ... | 1,559 |
0 | static void mkv_write_block(AVFormatContext *s, AVIOContext *pb, unsigned int blockid, AVPacket *pkt, int flags) { MatroskaMuxContext *mkv = s->priv_data; AVCodecContext *codec = s->streams[pkt->stream_index]->codec; uint8_t *data = NULL, *side_data = NULL; int offset = 0, size = pkt->size, side_data_size = 0; int64_t ... | 1,560 |
0 | static void omap2_mpu_reset(void *opaque) { struct omap_mpu_state_s *mpu = (struct omap_mpu_state_s *) opaque; omap_inth_reset(mpu->ih[0]); omap_dma_reset(mpu->dma); omap_prcm_reset(mpu->prcm); omap_sysctl_reset(mpu->sysc); omap_gp_timer_reset(mpu->gptimer[0]); omap_gp_timer_reset(mpu->gptimer[1]); omap_gp_timer_reset(... | 1,561 |
0 | void do_pci_device_hot_remove(Monitor *mon, const QDict *qdict) { pci_device_hot_remove(mon, qdict_get_str(qdict, "pci_addr")); } | 1,562 |
0 | static void register_multipage(AddressSpaceDispatch *d, MemoryRegionSection *section) { hwaddr start_addr = section->offset_within_address_space; uint16_t section_index = phys_section_add(section); uint64_t num_pages = int128_get64(int128_rshift(section->size, TARGET_PAGE_BITS)); assert(num_pages); phys_page_set(d, sta... | 1,564 |
0 | static void test_visitor_in_errors(TestInputVisitorData *data, const void *unused) { TestStruct *p = NULL; Error *err = NULL; Visitor *v; strList *q = NULL; UserDefTwo *r = NULL; WrapAlternate *s = NULL; v = visitor_input_test_init(data, "{ 'integer': false, 'boolean': 'foo', " "'string': -42 }"); visit_type_TestStruct... | 1,566 |
0 | static void acpi_pcihp_update_hotplug_bus(AcpiPciHpState *s, int bsel) { BusChild *kid, *next; PCIBus *bus = acpi_pcihp_find_hotplug_bus(s, bsel); /* Execute any pending removes during reset */ while (s->acpi_pcihp_pci_status[bsel].down) { acpi_pcihp_eject_slot(s, bsel, s->acpi_pcihp_pci_status[bsel].down); } s->acpi_p... | 1,567 |
0 | static void ahci_idp_write(void *opaque, target_phys_addr_t addr, uint64_t val, unsigned size) { AHCIState *s = opaque; if (addr == s->idp_offset) { /* index register - mask off reserved bits */ s->idp_index = (uint32_t)val & ((AHCI_MEM_BAR_SIZE - 1) & ~3); } else if (addr == s->idp_offset + 4) { /* data register - do ... | 1,568 |
0 | static void nbd_refresh_filename(BlockDriverState *bs, QDict *options) { BDRVNBDState *s = bs->opaque; QDict *opts = qdict_new(); QObject *saddr_qdict; Visitor *ov; const char *host = NULL, *port = NULL, *path = NULL; if (s->saddr->type == SOCKET_ADDRESS_KIND_INET) { const InetSocketAddress *inet = s->saddr->u.inet.dat... | 1,569 |
0 | static void virtio_balloon_receive_stats(VirtIODevice *vdev, VirtQueue *vq) { VirtIOBalloon *s = VIRTIO_BALLOON(vdev); VirtQueueElement *elem = &s->stats_vq_elem; VirtIOBalloonStat stat; size_t offset = 0; qemu_timeval tv; if (!virtqueue_pop(vq, elem)) { goto out; } /* Initialize the stats to get rid of any stale value... | 1,570 |
1 | ISABus *isa_bus_new(DeviceState *dev) { if (isabus) { fprintf(stderr, "Can't create a second ISA bus\n"); return NULL; } if (NULL == dev) { dev = qdev_create(NULL, "isabus-bridge"); qdev_init(dev); } isabus = FROM_QBUS(ISABus, qbus_create(&isa_bus_info, dev, NULL)); return isabus; } | 1,574 |
1 | void os_set_proc_name(const char *s) { #if defined(PR_SET_NAME) char name[16]; if (!s) return; name[sizeof(name) - 1] = 0; strncpy(name, s, sizeof(name)); /* Could rewrite argv[0] too, but that's a bit more complicated. This simple way is enough for `top'. */ if (prctl(PR_SET_NAME, name)) { perror("unable to change pro... | 1,575 |
1 | static int oss_poll_out (HWVoiceOut *hw) { OSSVoiceOut *oss = (OSSVoiceOut *) hw; return qemu_set_fd_handler (oss->fd, NULL, oss_helper_poll_out, NULL); } | 1,576 |
1 | void OPPROTO op_addzeo (void) { do_addzeo(); RETURN(); } | 1,577 |
0 | static void avc_loopfilter_cb_or_cr_inter_edge_hor_msa(uint8_t *data, uint8_t bs0, uint8_t bs1, uint8_t bs2, uint8_t bs3, uint8_t tc0, uint8_t tc1, uint8_t tc2, uint8_t tc3, uint8_t alpha_in, uint8_t beta_in, uint32_t img_width) { v16u8 alpha, beta; v8i16 tmp_vec; v8i16 bs = { 0 }; v8i16 tc = { 0 }; v16u8 p0, q0, p0_as... | 1,579 |
0 | static int64_t truehd_layout(int chanmap) { int layout = 0, i; for (i = 0; i < 13; i++) layout |= thd_layout[i] * ((chanmap >> i) & 1); return layout; } | 1,580 |
0 | void copy_picture_field(TInterlaceContext *tinterlace, uint8_t *dst[4], int dst_linesize[4], const uint8_t *src[4], int src_linesize[4], enum AVPixelFormat format, int w, int src_h, int src_field, int interleave, int dst_field, int flags) { const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(format); int hsub = desc->... | 1,581 |
0 | static double bessel(double x){ double lastv=0; double t, v; int i; static const double inv[100]={ 1.0/( 1* 1), 1.0/( 2* 2), 1.0/( 3* 3), 1.0/( 4* 4), 1.0/( 5* 5), 1.0/( 6* 6), 1.0/( 7* 7), 1.0/( 8* 8), 1.0/( 9* 9), 1.0/(10*10), 1.0/(11*11), 1.0/(12*12), 1.0/(13*13), 1.0/(14*14), 1.0/(15*15), 1.0/(16*16), 1.0/(17*17), ... | 1,582 |
0 | static int check_jni_invocation(void *log_ctx) { int ret = AVERROR_EXTERNAL; void *handle = NULL; void **jni_invocation = NULL; handle = dlopen(NULL, RTLD_LOCAL); if (!handle) { goto done; } jni_invocation = (void **)dlsym(handle, "_ZN13JniInvocation15jni_invocation_E"); if (!jni_invocation) { av_log(log_ctx, AV_LOG_ER... | 1,583 |
0 | static int gif_image_write_header(uint8_t **bytestream, int width, int height, int loop_count, uint32_t *palette) { int i; unsigned int v; bytestream_put_buffer(bytestream, "GIF", 3); bytestream_put_buffer(bytestream, "89a", 3); bytestream_put_le16(bytestream, width); bytestream_put_le16(bytestream, height); bytestream... | 1,584 |
0 | static int decode_p_mbs(VC9Context *v) { int x, y, current_mb = 0, i; /* MB/Block Position info */ int skip_mb_bit = 0, cbpcy; /* MB/B skip */ int hybrid_pred, ac_pred; /* Prediction types */ int mb_has_coeffs = 1 /* last_flag */, mb_is_intra; int dmv_x, dmv_y; /* Differential MV components */ int mv_mode_bit = 0; /* m... | 1,585 |
0 | matroska_parse_block(MatroskaDemuxContext *matroska, uint8_t *data, int size, int64_t pos, uint64_t cluster_time, uint64_t duration, int is_keyframe, int is_bframe) { int res = 0; int track; AVStream *st; AVPacket *pkt; uint8_t *origdata = data; int16_t block_time; uint32_t *lace_size = NULL; int n, flags, laces = 0; u... | 1,586 |
1 | static void vfio_listener_region_add(MemoryListener *listener, MemoryRegionSection *section) { VFIOContainer *container = container_of(listener, VFIOContainer, iommu_data.listener); hwaddr iova, end; void *vaddr; int ret; assert(!memory_region_is_iommu(section->mr)); if (vfio_listener_skipped_section(section)) { DPRINT... | 1,587 |
1 | static int mov_read_hdlr(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom) { AVStream *st = c->fc->streams[c->fc->nb_streams-1]; int len = 0; uint8_t *buf; uint32_t type; uint32_t ctype; print_atom("hdlr", atom); get_byte(pb); /* version */ get_byte(pb); get_byte(pb); get_byte(pb); /* flags */ /* component type */ cty... | 1,588 |
1 | static void qemu_rdma_dump_gid(const char *who, struct rdma_cm_id *id) { char sgid[33]; char dgid[33]; inet_ntop(AF_INET6, &id->route.addr.addr.ibaddr.sgid, sgid, sizeof sgid); inet_ntop(AF_INET6, &id->route.addr.addr.ibaddr.dgid, dgid, sizeof dgid); DPRINTF("%s Source GID: %s, Dest GID: %s\n", who, sgid, dgid); } | 1,589 |
1 | static int v410_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) { AVFrame *pic = avctx->coded_frame; uint8_t *src = avpkt->data; uint16_t *y, *u, *v; uint32_t val; int i, j; if (pic->data[0]) avctx->release_buffer(avctx, pic); pic->reference = 0; if (avctx->get_buffer(avctx, pic) < 0) {... | 1,590 |
1 | static void host_memory_backend_init(Object *obj) { HostMemoryBackend *backend = MEMORY_BACKEND(obj); backend->merge = qemu_opt_get_bool(qemu_get_machine_opts(), "mem-merge", true); backend->dump = qemu_opt_get_bool(qemu_get_machine_opts(), "dump-guest-core", true); backend->prealloc = mem_prealloc; object_property_add... | 1,591 |
1 | static void adaptive_gain_control(float *out, const float *in, const float *speech_synth, int size, float alpha, float *gain_mem) { int i; float speech_energy = 0.0, postfilter_energy = 0.0, gain_scale_factor; float mem = *gain_mem; for (i = 0; i < size; i++) { speech_energy += fabsf(speech_synth[i]); postfilter_energy... | 1,592 |
1 | void *qxl_phys2virt(PCIQXLDevice *qxl, QXLPHYSICAL pqxl, int group_id) { uint64_t phys = le64_to_cpu(pqxl); uint32_t slot = (phys >> (64 - 8)) & 0xff; uint64_t offset = phys & 0xffffffffffff; switch (group_id) { case MEMSLOT_GROUP_HOST: return (void *)(intptr_t)offset; case MEMSLOT_GROUP_GUEST: PANIC_ON(slot >= NUM_MEM... | 1,593 |
1 | static void ps_add_squares_c(INTFLOAT *dst, const INTFLOAT (*src)[2], int n) { int i; for (i = 0; i < n; i++) dst[i] += AAC_MADD28(src[i][0], src[i][0], src[i][1], src[i][1]); } | 1,594 |
1 | static void rtas_ibm_change_msi(PowerPCCPU *cpu, sPAPRMachineState *spapr, uint32_t token, uint32_t nargs, target_ulong args, uint32_t nret, target_ulong rets) { uint32_t config_addr = rtas_ld(args, 0); uint64_t buid = rtas_ldq(args, 1); unsigned int func = rtas_ld(args, 3); unsigned int req_num = rtas_ld(args, 4); /* ... | 1,595 |
1 | static inline TCGv gen_extend(TCGv val, int opsize, int sign) { TCGv tmp; switch (opsize) { case OS_BYTE: tmp = tcg_temp_new(); if (sign) tcg_gen_ext8s_i32(tmp, val); else tcg_gen_ext8u_i32(tmp, val); break; case OS_WORD: tmp = tcg_temp_new(); if (sign) tcg_gen_ext16s_i32(tmp, val); else tcg_gen_ext16u_i32(tmp, val); b... | 1,596 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.