label int64 0 1 | func1 stringlengths 23 97k | id int64 0 27.3k |
|---|---|---|
1 | void acpi_pcihp_init(Object *owner, AcpiPciHpState *s, PCIBus *root_bus, MemoryRegion *address_space_io, bool bridges_enabled) { s->io_len = ACPI_PCIHP_SIZE; s->io_base = ACPI_PCIHP_ADDR; s->root= root_bus; s->legacy_piix = !bridges_enabled; if (s->legacy_piix) { unsigned *bus_bsel = g_malloc(sizeof *bus_bsel); s->io_l... | 13,336 |
1 | paint_mouse_pointer(XImage *image, struct x11grab *s) { int x_off = s->x_off; int y_off = s->y_off; int width = s->width; int height = s->height; Display *dpy = s->dpy; XFixesCursorImage *xcim; int x, y; int line, column; int to_line, to_column; int pixstride = image->bits_per_pixel >> 3; /* Warning: in its insanity, x... | 13,338 |
1 | int coroutine_fn bdrv_co_pdiscard(BlockDriverState *bs, int64_t offset, int bytes) { BdrvTrackedRequest req; int max_pdiscard, ret; int head, tail, align; return -ENOMEDIUM; if (bdrv_has_readonly_bitmaps(bs)) { return -EPERM; ret = bdrv_check_byte_request(bs, offset, bytes); if (ret < 0) { return ret; } else if (bs->re... | 13,340 |
1 | int ff_mediacodec_dec_close(AVCodecContext *avctx, MediaCodecDecContext *s) { if (s->codec) { ff_AMediaCodec_delete(s->codec); s->codec = NULL; } if (s->format) { ff_AMediaFormat_delete(s->format); s->format = NULL; } return 0; } | 13,341 |
1 | static void uhci_async_validate_end(UHCIState *s) { UHCIQueue *queue, *n; QTAILQ_FOREACH_SAFE(queue, &s->queues, next, n) { if (!queue->valid) { uhci_queue_free(queue); } } } | 13,342 |
1 | static int fic_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) { FICContext *ctx = avctx->priv_data; uint8_t *src = avpkt->data; int ret; int slice, nslices; int msize; int tsize; int cur_x, cur_y; int skip_cursor = ctx->skip_cursor; uint8_t *sdata; if ((ret = ff_reget_buffer(avctx, ctx... | 13,343 |
1 | static void cdrom_pio_impl(int nblocks) { QPCIDevice *dev; void *bmdma_base, *ide_base; FILE *fh; int patt_blocks = MAX(16, nblocks); size_t patt_len = ATAPI_BLOCK_SIZE * patt_blocks; char *pattern = g_malloc(patt_len); size_t rxsize = ATAPI_BLOCK_SIZE * nblocks; uint16_t *rx = g_malloc0(rxsize); int i, j; uint8_t data... | 13,344 |
1 | static int append_to_cached_buf(AVCodecContext *avctx, const uint8_t *buf, int buf_size) { DVDSubContext *ctx = avctx->priv_data; if (ctx->buf_size > 0xffff - buf_size) { av_log(avctx, AV_LOG_WARNING, "Attempt to reconstruct " "too large SPU packets aborted.\n"); av_freep(&ctx->buf); return AVERROR_INVALIDDATA; } ctx->... | 13,345 |
0 | static RxFilterInfo *virtio_net_query_rxfilter(NetClientState *nc) { VirtIONet *n = qemu_get_nic_opaque(nc); VirtIODevice *vdev = VIRTIO_DEVICE(n); RxFilterInfo *info; strList *str_list, *entry; int i; info = g_malloc0(sizeof(*info)); info->name = g_strdup(nc->name); info->promiscuous = n->promisc; if (n->nouni) { info... | 13,348 |
0 | static inline int64_t get_sector_offset(BlockDriverState *bs, int64_t sector_num, int write) { BDRVVPCState *s = bs->opaque; uint64_t offset = sector_num * 512; uint64_t bitmap_offset, block_offset; uint32_t pagetable_index, pageentry_index; pagetable_index = offset / s->block_size; pageentry_index = (offset % s->block... | 13,349 |
0 | av_cold void ff_dcadsp_init_x86(DCADSPContext *s) { int cpu_flags = av_get_cpu_flags(); if (EXTERNAL_SSE(cpu_flags)) { #if ARCH_X86_32 s->int8x8_fmul_int32 = ff_int8x8_fmul_int32_sse; #endif s->lfe_fir[0] = ff_dca_lfe_fir0_sse; s->lfe_fir[1] = ff_dca_lfe_fir1_sse; } if (EXTERNAL_SSE2(cpu_flags)) { s->int8x8_fmul_int32 ... | 13,350 |
0 | vpc_co_preadv(BlockDriverState *bs, uint64_t offset, uint64_t bytes, QEMUIOVector *qiov, int flags) { BDRVVPCState *s = bs->opaque; int ret; int64_t image_offset; int64_t n_bytes; int64_t bytes_done = 0; VHDFooter *footer = (VHDFooter *) s->footer_buf; QEMUIOVector local_qiov; if (be32_to_cpu(footer->type) == VHD_FIXED... | 13,351 |
0 | void do_store_dcr (void) { if (unlikely(env->dcr_env == NULL)) { if (loglevel != 0) { fprintf(logfile, "No DCR environment\n"); } do_raise_exception_err(EXCP_PROGRAM, EXCP_INVAL | EXCP_INVAL_INVAL); } else if (unlikely(ppc_dcr_write(env->dcr_env, T0, T1) != 0)) { if (loglevel != 0) { fprintf(logfile, "DCR write error %... | 13,352 |
0 | static int coroutine_fn bdrv_aligned_pwritev(BlockDriverState *bs, int64_t offset, unsigned int bytes, QEMUIOVector *qiov, int flags) { BlockDriver *drv = bs->drv; BdrvTrackedRequest req; int ret; int64_t sector_num = offset >> BDRV_SECTOR_BITS; unsigned int nb_sectors = bytes >> BDRV_SECTOR_BITS; assert((offset & (BDR... | 13,353 |
0 | INLINE flag extractFloat64Sign( float64 a ) { return a>>63; } | 13,354 |
0 | static void read_storage_element1_info(SCLPDevice *sclp, SCCB *sccb) { ReadStorageElementInfo *storage_info = (ReadStorageElementInfo *) sccb; sclpMemoryHotplugDev *mhd = get_sclp_memory_hotplug_dev(); assert(mhd); if ((mhd->standby_mem_size >> mhd->increment_size) >= 0x10000) { sccb->h.response_code = cpu_to_be16(SCLP... | 13,355 |
0 | uint32_t HELPER(get_cp15)(CPUState *env, uint32_t insn) { cpu_abort(env, "cp15 insn %08x\n", insn); return 0; } | 13,356 |
0 | static void tcg_out_st(TCGContext *s, TCGType type, TCGReg arg, TCGReg arg1, intptr_t arg2) { uint8_t *old_code_ptr = s->code_ptr; if (type == TCG_TYPE_I32) { tcg_out_op_t(s, INDEX_op_st_i32); tcg_out_r(s, arg); tcg_out_r(s, arg1); tcg_out32(s, arg2); } else { assert(type == TCG_TYPE_I64); #if TCG_TARGET_REG_BITS == 64... | 13,358 |
0 | static void sdram_unmap_bcr (ppc4xx_sdram_t *sdram) { int i; for (i = 0; i < sdram->nbanks; i++) { #ifdef DEBUG_SDRAM printf("%s: Unmap RAM area " TARGET_FMT_plx " " TARGET_FMT_lx "\n", __func__, sdram_base(sdram->bcr[i]), sdram_size(sdram->bcr[i])); #endif cpu_register_physical_memory(sdram_base(sdram->bcr[i]), sdram_... | 13,359 |
0 | static int find_pte64(CPUPPCState *env, struct mmu_ctx_hash64 *ctx, int h, int rw, int type, 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 = (ctx->hash[h] * HASH_PTEG_SIZE_64) & env->htab_mask; for (i = 0; i < HPTES_PER_GROUP; i++... | 13,362 |
0 | int qed_read_l2_table_sync(BDRVQEDState *s, QEDRequest *request, uint64_t offset) { int ret = -EINPROGRESS; qed_read_l2_table(s, request, offset, qed_sync_cb, &ret); while (ret == -EINPROGRESS) { aio_poll(bdrv_get_aio_context(s->bs), true); } return ret; } | 13,364 |
0 | static void kvm_getput_reg(__u64 *kvm_reg, target_ulong *qemu_reg, int set) { if (set) *kvm_reg = *qemu_reg; else *qemu_reg = *kvm_reg; } | 13,368 |
0 | static bool sensor_type_is_dr(uint32_t sensor_type) { switch (sensor_type) { case RTAS_SENSOR_TYPE_ISOLATION_STATE: case RTAS_SENSOR_TYPE_DR: case RTAS_SENSOR_TYPE_ALLOCATION_STATE: return true; } return false; } | 13,369 |
0 | static uint64_t omap_mpuio_read(void *opaque, target_phys_addr_t addr, unsigned size) { struct omap_mpuio_s *s = (struct omap_mpuio_s *) opaque; int offset = addr & OMAP_MPUI_REG_MASK; uint16_t ret; if (size != 2) { return omap_badwidth_read16(opaque, addr); } switch (offset) { case 0x00: /* INPUT_LATCH */ return s->in... | 13,370 |
0 | int64_t qemu_get_clock_ns(QEMUClock *clock) { return 0; } | 13,371 |
0 | static always_inline void gen_qemu_stf (TCGv t0, TCGv t1, int flags) { TCGv tmp = tcg_temp_new(TCG_TYPE_I32); tcg_gen_helper_1_1(helper_f_to_memory, tmp, t0); tcg_gen_qemu_st32(tmp, t1, flags); tcg_temp_free(tmp); } | 13,374 |
0 | static void vfio_put_group(VFIOGroup *group) { if (!QLIST_EMPTY(&group->device_list)) { return; } vfio_kvm_device_del_group(group); vfio_disconnect_container(group); QLIST_REMOVE(group, next); trace_vfio_put_group(group->fd); close(group->fd); g_free(group); if (QLIST_EMPTY(&group_list)) { qemu_unregister_reset(vfio_pc... | 13,376 |
0 | static void virtio_ccw_start_ioeventfd(VirtioCcwDevice *dev) { VirtIODevice *vdev; int n, r; if (!(dev->flags & VIRTIO_CCW_FLAG_USE_IOEVENTFD) || dev->ioeventfd_disabled || dev->ioeventfd_started) { return; } vdev = virtio_bus_get_device(&dev->bus); for (n = 0; n < VIRTIO_PCI_QUEUE_MAX; n++) { if (!virtio_queue_get_num... | 13,378 |
0 | void bdrv_set_read_only(BlockDriverState *bs, bool read_only) { bs->read_only = read_only; } | 13,379 |
0 | void HELPER(crypto_aesmc)(CPUARMState *env, uint32_t rd, uint32_t rm, uint32_t decrypt) { static uint32_t const mc[][256] = { { /* MixColumns lookup table */ 0x00000000, 0x03010102, 0x06020204, 0x05030306, 0x0c040408, 0x0f05050a, 0x0a06060c, 0x0907070e, 0x18080810, 0x1b090912, 0x1e0a0a14, 0x1d0b0b16, 0x140c0c18, 0x170d... | 13,380 |
0 | int qcow2_get_cluster_offset(BlockDriverState *bs, uint64_t offset, int *num, uint64_t *cluster_offset) { BDRVQcowState *s = bs->opaque; unsigned int l2_index; uint64_t l1_index, l2_offset, *l2_table; int l1_bits, c; unsigned int index_in_cluster, nb_clusters; uint64_t nb_available, nb_needed; int ret; index_in_cluster... | 13,381 |
0 | static int v9fs_synth_mkdir(FsContext *fs_ctx, V9fsPath *path, const char *buf, FsCred *credp) { errno = EPERM; return -1; } | 13,382 |
0 | static int rm_write_packet(AVFormatContext *s, AVPacket *pkt) { if (s->streams[pkt->stream_index]->codec.codec_type == CODEC_TYPE_AUDIO) return rm_write_audio(s, pkt->data, pkt->size); else return rm_write_video(s, pkt->data, pkt->size); } | 13,383 |
0 | static uint64_t cs_mem_read(void *opaque, target_phys_addr_t addr, unsigned size) { CSState *s = opaque; uint32_t saddr, ret; saddr = addr >> 2; switch (saddr) { case 1: switch (CS_RAP(s)) { case 3: // Write only ret = 0; break; default: ret = s->dregs[CS_RAP(s)]; break; } trace_cs4231_mem_readl_dreg(CS_RAP(s), ret); b... | 13,384 |
0 | static int sctp_write(URLContext *h, const uint8_t *buf, int size) { SCTPContext *s = h->priv_data; int ret; if (!(h->flags & AVIO_FLAG_NONBLOCK)) { ret = sctp_wait_fd(s->fd, 1); if (ret < 0) return ret; } if (s->max_streams) { /*StreamId is introduced as a 2byte code into the stream*/ struct sctp_sndrcvinfo info = { 0... | 13,386 |
0 | int avformat_network_init(void) { #if CONFIG_NETWORK int ret; ff_network_inited_globally = 1; if ((ret = ff_network_init()) < 0) return ret; if ((ret = ff_tls_init()) < 0) return ret; #endif return 0; } | 13,387 |
0 | static inline void cvtyuvtoRGB (SwsContext *c, vector signed short Y, vector signed short U, vector signed short V, vector signed short *R, vector signed short *G, vector signed short *B) { vector signed short vx,ux,uvx; Y = vec_mradds (Y, c->CY, c->OY); U = vec_sub (U,(vector signed short)(128)); V = vec_sub (V,(vecto... | 13,390 |
0 | static void vaapi_encode_h264_write_sei(PutBitContext *pbc, VAAPIEncodeContext *ctx, VAAPIEncodePicture *pic) { VAAPIEncodeH264Context *priv = ctx->priv_data; PutBitContext payload_bits; char payload[256]; int payload_type, payload_size, i; void (*write_payload)(PutBitContext *pbc, VAAPIEncodeContext *ctx, VAAPIEncodeP... | 13,391 |
1 | Visitor *visitor_input_test_init(TestInputVisitorData *data, const char *json_string, ...) { Visitor *v; va_list ap; va_start(ap, json_string); data->obj = qobject_from_jsonv(json_string, &ap); va_end(ap); g_assert(data->obj != NULL); data->qiv = qmp_input_visitor_new(data->obj); g_assert(data->qiv != NULL); v = qmp_in... | 13,392 |
1 | static void dump_syscall(CPUState *env) { fprintf(logfile, "syscall r0=0x%08x r3=0x%08x r4=0x%08x " "r5=0x%08x r6=0x%08x nip=0x%08x\n", env->gpr[0], env->gpr[3], env->gpr[4], env->gpr[5], env->gpr[6], env->nip); } | 13,393 |
1 | static int vnc_auth_sasl_check_ssf(VncState *vs) { const void *val; int err, ssf; if (!vs->sasl.wantSSF) return 1; err = sasl_getprop(vs->sasl.conn, SASL_SSF, &val); if (err != SASL_OK) return 0; ssf = *(const int *)val; VNC_DEBUG("negotiated an SSF of %d\n", ssf); if (ssf < 56) return 0; /* 56 is good for Kerberos */ ... | 13,394 |
1 | static int parse_metadata(DBEContext *s) { int i, ret, key = parse_key(s), mtd_size; if ((ret = convert_input(s, 1, key)) < 0) return ret; skip_bits(&s->gb, 4); mtd_size = get_bits(&s->gb, 10); if (!mtd_size) { av_log(s->avctx, AV_LOG_ERROR, "Invalid metadata size\n"); return AVERROR_INVALIDDATA; } if ((ret = convert_i... | 13,395 |
1 | static void vp8_release_frame(VP8Context *s, AVFrame *f, int is_close) { if (!is_close) { if (f->ref_index[0]) { assert(s->num_maps_to_be_freed < FF_ARRAY_ELEMS(s->segmentation_maps)); s->segmentation_maps[s->num_maps_to_be_freed++] = f->ref_index[0]; f->ref_index[0] = NULL; } } else { av_freep(&f->ref_index[0]); } ff_... | 13,397 |
1 | int qemu_socket(int domain, int type, int protocol) { int ret; #ifdef SOCK_CLOEXEC ret = socket(domain, type | SOCK_CLOEXEC, protocol); #else ret = socket(domain, type, protocol); if (ret >= 0) { qemu_set_cloexec(ret); } #endif return ret; } | 13,398 |
1 | static int smacker_probe(AVProbeData *p) { if(p->buf[0] == 'S' && p->buf[1] == 'M' && p->buf[2] == 'K' && (p->buf[3] == '2' || p->buf[3] == '4')) return AVPROBE_SCORE_MAX; else return 0; } | 13,399 |
0 | static av_noinline void FUNC(hl_decode_mb)(H264Context *h, H264SliceContext *sl) { const int mb_x = h->mb_x; const int mb_y = h->mb_y; const int mb_xy = h->mb_xy; const int mb_type = h->cur_pic.mb_type[mb_xy]; uint8_t *dest_y, *dest_cb, *dest_cr; int linesize, uvlinesize /*dct_offset*/; int i, j; int *block_offset = &h... | 13,400 |
1 | static int hds_write_header(AVFormatContext *s) { HDSContext *c = s->priv_data; int ret = 0, i; AVOutputFormat *oformat; mkdir(s->filename, 0777); oformat = av_guess_format("flv", NULL, NULL); if (!oformat) { ret = AVERROR_MUXER_NOT_FOUND; goto fail; } c->streams = av_mallocz(sizeof(*c->streams) * s->nb_streams); if (!... | 13,401 |
1 | static int disas_coproc_insn(DisasContext *s, uint32_t insn) { int cpnum, is64, crn, crm, opc1, opc2, isread, rt, rt2; const ARMCPRegInfo *ri; cpnum = (insn >> 8) & 0xf; /* First check for coprocessor space used for XScale/iwMMXt insns */ if (arm_dc_feature(s, ARM_FEATURE_XSCALE) && (cpnum < 2)) { if (extract32(s->c15_... | 13,402 |
0 | static inline int round_sample(int64_t *sum) { int sum1; sum1 = (int)((*sum) >> OUT_SHIFT); *sum &= (1<<OUT_SHIFT)-1; return av_clip(sum1, OUT_MIN, OUT_MAX); } | 13,403 |
0 | bool virtio_is_big_endian(void) { #if defined(TARGET_WORDS_BIGENDIAN) return true; #else return false; #endif } | 13,404 |
0 | static int check_opt(const CmdArgs *cmd_args, const char *name, QDict *args) { if (!cmd_args->optional) { qerror_report(QERR_MISSING_PARAMETER, name); return -1; } if (cmd_args->type == '-') { /* handlers expect a value, they need to be changed */ qdict_put(args, name, qint_from_int(0)); } return 0; } | 13,405 |
0 | static void i440fx_pcihost_get_pci_hole_end(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp) { I440FXState *s = I440FX_PCI_HOST_BRIDGE(obj); uint32_t value = s->pci_hole.end; visit_type_uint32(v, name, &value, errp); } | 13,406 |
0 | bool vring_enable_notification(VirtIODevice *vdev, Vring *vring) { if (vdev->guest_features & (1 << VIRTIO_RING_F_EVENT_IDX)) { vring_avail_event(&vring->vr) = vring->vr.avail->idx; } else { vring_clear_used_flags(vdev, vring, VRING_USED_F_NO_NOTIFY); } smp_mb(); /* ensure update is seen before reading avail_idx */ ret... | 13,407 |
0 | void helper_fcmpu (uint64_t arg1, uint64_t arg2, uint32_t crfD) { CPU_DoubleU farg1, farg2; uint32_t ret = 0; farg1.ll = arg1; farg2.ll = arg2; if (unlikely(float64_is_nan(farg1.d) || float64_is_nan(farg2.d))) { ret = 0x01UL; } else if (float64_lt(farg1.d, farg2.d, &env->fp_status)) { ret = 0x08UL; } else if (!float64_... | 13,408 |
0 | static void dec_fpu(DisasContext *dc) { if ((dc->tb_flags & MSR_EE_FLAG) && !(dc->env->pvr.regs[2] & PVR2_ILL_OPCODE_EXC_MASK) && !((dc->env->pvr.regs[2] & PVR2_USE_FPU_MASK))) { tcg_gen_movi_tl(cpu_SR[SR_ESR], ESR_EC_ILLEGAL_OP); t_gen_raise_exception(dc, EXCP_HW_EXCP); return; } qemu_log ("unimplemented FPU insn pc=%... | 13,409 |
0 | static void cdrom_pio_impl(int nblocks) { QPCIDevice *dev; QPCIBar bmdma_bar, ide_bar; FILE *fh; int patt_blocks = MAX(16, nblocks); size_t patt_len = ATAPI_BLOCK_SIZE * patt_blocks; char *pattern = g_malloc(patt_len); size_t rxsize = ATAPI_BLOCK_SIZE * nblocks; uint16_t *rx = g_malloc0(rxsize); int i, j; uint8_t data;... | 13,410 |
0 | static uint32_t m5206_mbar_readw(void *opaque, target_phys_addr_t offset) { m5206_mbar_state *s = (m5206_mbar_state *)opaque; int width; offset &= 0x3ff; if (offset >= 0x200) { hw_error("Bad MBAR read offset 0x%x", (int)offset); } width = m5206_mbar_width[offset >> 2]; if (width > 2) { uint32_t val; val = m5206_mbar_re... | 13,411 |
0 | static void test_visitor_out_bool(TestOutputVisitorData *data, const void *unused) { bool value = true; QObject *obj; visit_type_bool(data->ov, NULL, &value, &error_abort); obj = visitor_get(data); g_assert(qobject_type(obj) == QTYPE_QBOOL); g_assert(qbool_get_bool(qobject_to_qbool(obj)) == value); } | 13,412 |
0 | static void do_dcbz(target_ulong addr, int dcache_line_size) { addr &= ~(dcache_line_size - 1); int i; for (i = 0 ; i < dcache_line_size ; i += 4) { stl(addr + i , 0); } if (env->reserve == addr) env->reserve = (target_ulong)-1ULL; } | 13,413 |
0 | static void render_slice(Vp3DecodeContext *s, int slice) { int x, y; int m, n; int i; /* indicates current fragment */ int16_t *dequantizer; DCTELEM __align16 block[64]; unsigned char *output_plane; unsigned char *last_plane; unsigned char *golden_plane; int stride; int motion_x = 0xdeadbeef, motion_y = 0xdeadbeef; int... | 13,414 |
0 | match_insn_m68k (bfd_vma memaddr, disassemble_info * info, const struct m68k_opcode * best, struct private * priv) { unsigned char *save_p; unsigned char *p; const char *d; bfd_byte *buffer = priv->the_buffer; fprintf_ftype save_printer = info->fprintf_func; void (* save_print_address) (bfd_vma, struct disassemble_info... | 13,416 |
0 | static void rcu_qtest_init(void) { struct list_element *new_el; int i; nthreadsrunning = 0; srand(time(0)); for (i = 0; i < RCU_Q_LEN; i++) { new_el = g_new(struct list_element, 1); new_el->val = i; QLIST_INSERT_HEAD_RCU(&Q_list_head, new_el, entry); } atomic_add(&n_nodes, RCU_Q_LEN); } | 13,417 |
0 | static void virtio_ccw_bus_class_init(ObjectClass *klass, void *data) { VirtioBusClass *k = VIRTIO_BUS_CLASS(klass); BusClass *bus_class = BUS_CLASS(klass); bus_class->max_dev = 1; k->notify = virtio_ccw_notify; k->vmstate_change = virtio_ccw_vmstate_change; k->query_guest_notifiers = virtio_ccw_query_guest_notifiers; ... | 13,418 |
0 | static void lan9118_cleanup(NetClientState *nc) { lan9118_state *s = qemu_get_nic_opaque(nc); s->nic = NULL; } | 13,419 |
0 | void pci_cirrus_vga_init(PCIBus *bus, DisplayState *ds, uint8_t *vga_ram_base, unsigned long vga_ram_offset, int vga_ram_size) { PCICirrusVGAState *d; uint8_t *pci_conf; CirrusVGAState *s; int device_id; device_id = CIRRUS_ID_CLGD5446; /* setup PCI configuration registers */ d = (PCICirrusVGAState *)pci_register_device... | 13,420 |
0 | static void spapr_io_write(void *opaque, hwaddr addr, uint64_t data, unsigned size) { switch (size) { case 1: cpu_outb(addr, data); return; case 2: cpu_outw(addr, data); return; case 4: cpu_outl(addr, data); return; } assert(0); } | 13,421 |
0 | static int scsi_disk_emulate_inquiry(SCSIRequest *req, uint8_t *outbuf) { SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, req->dev); int buflen = 0; if (req->cmd.buf[1] & 0x2) { /* Command support data - optional, not implemented */ BADF("optional INQUIRY command support request not implemented\n"); return -1; } if (... | 13,422 |
0 | static AddressSpace *memory_region_to_address_space(MemoryRegion *mr) { AddressSpace *as; while (mr->container) { mr = mr->container; } QTAILQ_FOREACH(as, &address_spaces, address_spaces_link) { if (mr == as->root) { return as; } } abort(); } | 13,423 |
0 | static void bastardized_rice_decompress(ALACContext *alac, int32_t *output_buffer, int output_size, int readsamplesize, /* arg_10 */ int rice_initialhistory, /* arg424->b */ int rice_kmodifier, /* arg424->d */ int rice_historymult, /* arg424->c */ int rice_kmodifier_mask /* arg424->e */ ) { int output_count; unsigned i... | 13,425 |
0 | void OPPROTO op_int_im(void) { EIP = PARAM1; raise_exception(EXCP0D_GPF); } | 13,428 |
1 | static inline TCGv gen_ld16s(TCGv addr, int index) { TCGv tmp = new_tmp(); tcg_gen_qemu_ld16s(tmp, addr, index); return tmp; } | 13,430 |
1 | static av_cold int vc2_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr) { int ret; int max_frame_bytes, sig_size = 256; VC2EncContext *s = avctx->priv_data; const char aux_data[] = LIBAVCODEC_IDENT; const int aux_data_size = sizeof(aux_data); const int header_size = 100 + ... | 13,431 |
1 | static inline int xhci_running(XHCIState *xhci) { return !(xhci->usbsts & USBSTS_HCH) && !xhci->intr[0].er_full; } | 13,432 |
1 | static int local_utimensat(FsContext *s, V9fsPath *fs_path, const struct timespec *buf) { char *buffer; int ret; char *path = fs_path->data; buffer = rpath(s, path); ret = qemu_utimens(buffer, buf); g_free(buffer); return ret; } | 13,433 |
1 | static int qemu_chr_open_stdio(QemuOpts *opts, CharDriverState **_chr) { CharDriverState *chr; if (stdio_nb_clients >= STDIO_MAX_CLIENTS) { return -EBUSY; } if (stdio_nb_clients == 0) { old_fd0_flags = fcntl(0, F_GETFL); tcgetattr (0, &oldtty); fcntl(0, F_SETFL, O_NONBLOCK); atexit(term_exit); } chr = qemu_chr_open_fd(... | 13,434 |
1 | static int qemu_gluster_reopen_prepare(BDRVReopenState *state, BlockReopenQueue *queue, Error **errp) { int ret = 0; BDRVGlusterReopenState *reop_s; GlusterConf *gconf = NULL; int open_flags = 0; assert(state != NULL); assert(state->bs != NULL); state->opaque = g_malloc0(sizeof(BDRVGlusterReopenState)); reop_s = state-... | 13,435 |
1 | static void cabac_reinit(HEVCLocalContext *lc) { skip_bytes(&lc->cc, 0); } | 13,436 |
1 | static int write_option(void *optctx, const OptionDef *po, const char *opt, const char *arg) { /* new-style options contain an offset into optctx, old-style address of * a global var*/ void *dst = po->flags & (OPT_OFFSET | OPT_SPEC) ? (uint8_t *)optctx + po->u.off : po->u.dst_ptr; int *dstcount; if (po->flags & OPT_SPE... | 13,438 |
1 | static uint32_t serial_ioport_read(void *opaque, uint32_t addr) { SerialState *s = opaque; uint32_t ret; addr &= 7; switch(addr) { default: case 0: if (s->lcr & UART_LCR_DLAB) { ret = s->divider & 0xff; } else { ret = s->rbr; s->lsr &= ~(UART_LSR_DR | UART_LSR_BI); serial_update_irq(s); if (!(s->mcr & UART_MCR_LOOP)) {... | 13,439 |
1 | e1000e_init_msix(E1000EState *s) { PCIDevice *d = PCI_DEVICE(s); int res = msix_init(PCI_DEVICE(s), E1000E_MSIX_VEC_NUM, &s->msix, E1000E_MSIX_IDX, E1000E_MSIX_TABLE, &s->msix, E1000E_MSIX_IDX, E1000E_MSIX_PBA, 0xA0); if (res < 0) { trace_e1000e_msix_init_fail(res); } else { if (!e1000e_use_msix_vectors(s, E1000E_MSIX_... | 13,440 |
0 | static int RENAME(resample_linear)(ResampleContext *c, DELEM *dst, const DELEM *src, int n, int update_ctx) { int dst_index; int index= c->index; int frac= c->frac; int sample_index = index >> c->phase_shift; #if FILTER_SHIFT == 0 double inv_src_incr = 1.0 / c->src_incr; #endif index &= c->phase_mask; for (dst_index = ... | 13,441 |
0 | int ff_h263_resync(MpegEncContext *s){ int left, ret; if(s->codec_id==CODEC_ID_MPEG4) skip_bits1(&s->gb); align_get_bits(&s->gb); if(show_bits(&s->gb, 16)==0){ if(s->codec_id==CODEC_ID_MPEG4) ret= mpeg4_decode_video_packet_header(s); else ret= h263_decode_gob_header(s); if(ret>=0) return 0; } //ok, its not where its su... | 13,443 |
1 | static void aio_write_done(void *opaque, int ret) { struct aio_ctx *ctx = opaque; struct timeval t2; gettimeofday(&t2, NULL); if (ret < 0) { printf("aio_write failed: %s\n", strerror(-ret)); goto out; } if (ctx->qflag) { goto out; } /* Finally, report back -- -C gives a parsable format */ t2 = tsub(t2, ctx->t1); print_... | 13,444 |
1 | static void add_pixels_clamped2_c(const DCTELEM *block, uint8_t *restrict pixels, int line_size) { int i; uint8_t *cm = ff_cropTbl + MAX_NEG_CROP; /* read the pixels */ for(i=0;i<2;i++) { pixels[0] = cm[pixels[0] + block[0]]; pixels[1] = cm[pixels[1] + block[1]]; pixels += line_size; block += 8; } } | 13,445 |
1 | static int jpeg2000_read_main_headers(Jpeg2000DecoderContext *s) { Jpeg2000CodingStyle *codsty = s->codsty; Jpeg2000QuantStyle *qntsty = s->qntsty; uint8_t *properties = s->properties; for (;;) { int len, ret = 0; uint16_t marker; int oldpos; if (bytestream2_get_bytes_left(&s->g) < 2) { av_log(s->avctx, AV_LOG_ERROR, "... | 13,446 |
1 | static void ehci_reset(void *opaque) { EHCIState *s = opaque; int i; USBDevice *devs[NB_PORTS]; trace_usb_ehci_reset(); /* * Do the detach before touching portsc, so that it correctly gets send to * us or to our companion based on PORTSC_POWNER before the reset. */ for(i = 0; i < NB_PORTS; i++) { devs[i] = s->ports[i].... | 13,447 |
1 | void OPPROTO op_POWER_slq (void) { uint32_t msk = -1, tmp; msk = msk << (T1 & 0x1FUL); if (T1 & 0x20UL) msk = ~msk; T1 &= 0x1FUL; tmp = rotl32(T0, T1); T0 = tmp & msk; env->spr[SPR_MQ] = tmp; RETURN(); } | 13,450 |
1 | int ff_MPV_lowest_referenced_row(MpegEncContext *s, int dir) { int my_max = INT_MIN, my_min = INT_MAX, qpel_shift = !s->quarter_sample; int my, off, i, mvs; if (s->picture_structure != PICT_FRAME) goto unhandled; switch (s->mv_type) { case MV_TYPE_16X16: mvs = 1; break; case MV_TYPE_16X8: mvs = 2; break; case MV_TYPE_8... | 13,451 |
0 | static inline int snake_search(MpegEncContext * s, int *best, int dmin, UINT8 *new_pic, UINT8 *old_pic, int pic_stride, int pred_x, int pred_y, UINT16 *mv_penalty, int quant, int xmin, int ymin, int xmax, int ymax, int shift) { int dir=0; int c=1; static int x_dir[8]= {1,1,0,-1,-1,-1, 0, 1}; static int y_dir[8]= {0,1,1... | 13,452 |
1 | static int qio_channel_command_close(QIOChannel *ioc, Error **errp) { QIOChannelCommand *cioc = QIO_CHANNEL_COMMAND(ioc); int rv = 0; /* We close FDs before killing, because that * gives a better chance of clean shutdown */ if (close(cioc->writefd) < 0) { rv = -1; } if (close(cioc->readfd) < 0) { rv = -1; } #ifndef WIN... | 13,453 |
1 | AVFixedDSPContext * avpriv_alloc_fixed_dsp(int bit_exact) { AVFixedDSPContext * fdsp = av_malloc(sizeof(AVFixedDSPContext)); fdsp->vector_fmul_window_scaled = vector_fmul_window_fixed_scaled_c; fdsp->vector_fmul_window = vector_fmul_window_fixed_c; return fdsp; } | 13,454 |
1 | static av_always_inline void encode_mb_internal(MpegEncContext *s, int motion_x, int motion_y, int mb_block_height, int mb_block_count) { int16_t weight[8][64]; int16_t orig[8][64]; const int mb_x = s->mb_x; const int mb_y = s->mb_y; int i; int skip_dct[8]; int dct_offset = s->linesize * 8; // default for progressive f... | 13,455 |
1 | void sh_intc_register_sources(struct intc_desc *desc, struct intc_vect *vectors, int nr_vectors, struct intc_group *groups, int nr_groups) { unsigned int i, k; struct intc_source *s; for (i = 0; i < nr_vectors; i++) { struct intc_vect *vect = vectors + i; sh_intc_register_source(desc, vect->enum_id, groups, nr_groups);... | 13,456 |
1 | void sparc64_get_context(CPUSPARCState *env) { abi_ulong ucp_addr; struct target_ucontext *ucp; target_mc_gregset_t *grp; target_mcontext_t *mcp; abi_ulong fp, i7, w_addr; int err; unsigned int i; target_sigset_t target_set; sigset_t set; ucp_addr = env->regwptr[UREG_I0]; if (!lock_user_struct(VERIFY_WRITE, ucp, ucp_ad... | 13,458 |
0 | void av_close_input_file(AVFormatContext *s) { int i; if (s->iformat->read_close) s->iformat->read_close(s); for(i=0;i<s->nb_streams;i++) { av_free(s->streams[i]); } if (s->packet_buffer) { AVPacketList *p, *p1; p = s->packet_buffer; while (p != NULL) { p1 = p->next; av_free_packet(&p->pkt); av_free(p); p = p1; } s->pa... | 13,461 |
1 | void stw_tce(VIOsPAPRDevice *dev, uint64_t taddr, uint32_t val) { val = tswap32(val); spapr_tce_dma_write(dev, taddr, &val, sizeof(val)); } | 13,463 |
1 | static inline void RENAME(rgb32to24)(const uint8_t *src,uint8_t *dst,long src_size) { uint8_t *dest = dst; const uint8_t *s = src; const uint8_t *end; #ifdef HAVE_MMX const uint8_t *mm_end; #endif end = s + src_size; #ifdef HAVE_MMX __asm __volatile(PREFETCH" %0"::"m"(*s):"memory"); mm_end = end - 31; while(s < mm_end)... | 13,464 |
1 | static void term_exit(void) { tcsetattr(0, TCSANOW, &oldtty); } | 13,465 |
1 | static inline int ohci_put_hcca(OHCIState *ohci, uint32_t addr, struct ohci_hcca *hcca) { cpu_physical_memory_write(addr + ohci->localmem_base, hcca, sizeof(*hcca)); return 1; } | 13,466 |
1 | static int vqf_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags) { VqfContext *c = s->priv_data; AVStream *st; int ret; int64_t pos; st = s->streams[stream_index]; pos = av_rescale_rnd(timestamp * st->codec->bit_rate, st->time_base.num, st->time_base.den * (int64_t)c->frame_bit_len, (flags &... | 13,469 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.