label int64 0 1 | func1 stringlengths 23 97k | id int64 0 27.3k |
|---|---|---|
1 | int bdrv_discard(BlockDriverState *bs, int64_t sector_num, int nb_sectors) { Coroutine *co; DiscardCo rwco = { .bs = bs, .sector_num = sector_num, .nb_sectors = nb_sectors, .ret = NOT_DONE, }; if (qemu_in_coroutine()) { /* Fast-path if already in coroutine context */ bdrv_discard_co_entry(&rwco); } else { AioContext *a... | 21,241 |
1 | static void cg3_realizefn(DeviceState *dev, Error **errp) { SysBusDevice *sbd = SYS_BUS_DEVICE(dev); CG3State *s = CG3(dev); int ret; char *fcode_filename; /* FCode ROM */ vmstate_register_ram_global(&s->rom); fcode_filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, CG3_ROM_FILE); if (fcode_filename) { ret = load_image_tar... | 21,242 |
1 | static void virtio_gpu_set_scanout(VirtIOGPU *g, struct virtio_gpu_ctrl_command *cmd) { struct virtio_gpu_simple_resource *res; struct virtio_gpu_scanout *scanout; pixman_format_code_t format; uint32_t offset; int bpp; struct virtio_gpu_set_scanout ss; VIRTIO_GPU_FILL_CMD(ss); trace_virtio_gpu_cmd_set_scanout(ss.scanou... | 21,243 |
1 | void kbd_put_keycode(int keycode) { QEMUPutKbdEntry *entry = QTAILQ_FIRST(&kbd_handlers); if (!runstate_is_running() && !runstate_check(RUN_STATE_SUSPENDED)) { return; } if (entry) { entry->put_kbd(entry->opaque, keycode); } } | 21,244 |
1 | static av_cold int libx265_encode_init(AVCodecContext *avctx) { libx265Context *ctx = avctx->priv_data; ctx->api = x265_api_get(av_pix_fmt_desc_get(avctx->pix_fmt)->comp[0].depth); if (!ctx->api) ctx->api = x265_api_get(0); ctx->params = ctx->api->param_alloc(); if (!ctx->params) { av_log(avctx, AV_LOG_ERROR, "Could no... | 21,245 |
1 | static void nbd_coroutine_end(BlockDriverState *bs, NBDRequest *request) { NBDClientSession *s = nbd_get_client_session(bs); int i = HANDLE_TO_INDEX(s, request->handle); s->recv_coroutine[i] = NULL; s->in_flight--; qemu_co_queue_next(&s->free_sema); /* Kick the read_reply_co to get the next reply. */ if (s->read_reply_... | 21,246 |
1 | static int dump_init(DumpState *s, int fd, bool has_format, DumpGuestMemoryFormat format, bool paging, bool has_filter, int64_t begin, int64_t length, Error **errp) { CPUState *cpu; int nr_cpus; Error *err = NULL; int ret; /* kdump-compressed is conflict with paging and filter */ if (has_format && format != DUMP_GUEST_... | 21,247 |
0 | static int64_t ff_read_timestamp(AVFormatContext *s, int stream_index, int64_t *ppos, int64_t pos_limit, int64_t (*read_timestamp)(struct AVFormatContext *, int , int64_t *, int64_t )) { return wrap_timestamp(s->streams[stream_index], read_timestamp(s, stream_index, ppos, pos_limit)); } | 21,248 |
1 | gboolean vnc_client_io(QIOChannel *ioc G_GNUC_UNUSED, GIOCondition condition, void *opaque) { VncState *vs = opaque; if (condition & G_IO_IN) { vnc_client_read(vs); } if (condition & G_IO_OUT) { vnc_client_write(vs); } return TRUE; } | 21,249 |
1 | float128 float128_scalbn( float128 a, int n STATUS_PARAM ) { flag aSign; int32 aExp; uint64_t aSig0, aSig1; aSig1 = extractFloat128Frac1( a ); aSig0 = extractFloat128Frac0( a ); aExp = extractFloat128Exp( a ); aSign = extractFloat128Sign( a ); if ( aExp == 0x7FFF ) { return a; } if ( aExp != 0 ) aSig0 |= LIT64( 0x00010... | 21,252 |
0 | static void process_synthesis_subpackets(QDM2Context *q, QDM2SubPNode *list) { QDM2SubPNode *nodes[4]; nodes[0] = qdm2_search_subpacket_type_in_list(list, 9); if (nodes[0] != NULL) process_subpacket_9(q, nodes[0]); nodes[1] = qdm2_search_subpacket_type_in_list(list, 10); if (nodes[1] != NULL) process_subpacket_10(q, no... | 21,253 |
0 | static int ffm_read_data(AVFormatContext *s, uint8_t *buf, int size, int header) { FFMContext *ffm = s->priv_data; AVIOContext *pb = s->pb; int len, fill_size, size1, frame_offset, id; int64_t last_pos = -1; size1 = size; while (size > 0) { redo: len = ffm->packet_end - ffm->packet_ptr; if (len < 0) return -1; if (len ... | 21,254 |
0 | static int udp_close(URLContext *h) { UDPContext *s = h->priv_data; int ret; if (s->is_multicast && (h->flags & AVIO_FLAG_READ)) udp_leave_multicast_group(s->udp_fd, (struct sockaddr *)&s->dest_addr); closesocket(s->udp_fd); av_fifo_free(s->fifo); #if HAVE_PTHREADS if (s->thread_started) { pthread_cancel(s->circular_bu... | 21,255 |
0 | static void gen_sse(CPUX86State *env, DisasContext *s, int b, target_ulong pc_start, int rex_r) { int b1, op1_offset, op2_offset, is_xmm, val; int modrm, mod, rm, reg; SSEFunc_0_epp sse_fn_epp; SSEFunc_0_eppi sse_fn_eppi; SSEFunc_0_ppi sse_fn_ppi; SSEFunc_0_eppt sse_fn_eppt; TCGMemOp ot; b &= 0xff; if (s->prefix & PREF... | 21,257 |
0 | void kvmppc_check_papr_resize_hpt(Error **errp) { if (!kvm_enabled()) { return; } /* TODO: Check for resize-capable KVM implementations */ error_setg(errp, "Hash page table resizing not available with this KVM version"); } | 21,258 |
0 | static void v9fs_walk(void *opaque) { int name_idx; V9fsQID *qids = NULL; int i, err = 0; V9fsPath dpath, path; uint16_t nwnames; struct stat stbuf; size_t offset = 7; int32_t fid, newfid; V9fsString *wnames = NULL; V9fsFidState *fidp; V9fsFidState *newfidp = NULL; V9fsPDU *pdu = opaque; V9fsState *s = pdu->s; offset +... | 21,259 |
0 | static int mmu_translate_pte(CPUS390XState *env, target_ulong vaddr, uint64_t asc, uint64_t pt_entry, target_ulong *raddr, int *flags, int rw, bool exc) { if (pt_entry & _PAGE_INVALID) { DPRINTF("%s: PTE=0x%" PRIx64 " invalid\n", __func__, pt_entry); trigger_page_fault(env, vaddr, PGM_PAGE_TRANS, asc, rw, exc); return ... | 21,260 |
0 | static void dbdma_cmdptr_load(DBDMA_channel *ch) { DBDMA_DPRINTF("dbdma_cmdptr_load 0x%08x\n", be32_to_cpu(ch->regs[DBDMA_CMDPTR_LO])); cpu_physical_memory_read(be32_to_cpu(ch->regs[DBDMA_CMDPTR_LO]), (uint8_t*)&ch->current, sizeof(dbdma_cmd)); } | 21,262 |
0 | static int img_check(int argc, char **argv) { int c, ret; const char *filename, *fmt; BlockDriverState *bs; BdrvCheckResult result; int fix = 0; int flags = BDRV_O_FLAGS; fmt = NULL; for(;;) { c = getopt(argc, argv, "f:hr:"); if (c == -1) { break; } switch(c) { case '?': case 'h': help(); break; case 'f': fmt = optarg;... | 21,263 |
0 | static void decode_profile_tier_level(GetBitContext *gb, AVCodecContext *avctx, PTLCommon *ptl) { int i; ptl->profile_space = get_bits(gb, 2); ptl->tier_flag = get_bits1(gb); ptl->profile_idc = get_bits(gb, 5); if (ptl->profile_idc == FF_PROFILE_HEVC_MAIN) av_log(avctx, AV_LOG_DEBUG, "Main profile bitstream\n"); else i... | 21,264 |
0 | xen_igd_passthrough_isa_bridge_create(XenPCIPassthroughState *s, XenHostPCIDevice *dev) { uint16_t gpu_dev_id; PCIDevice *d = &s->dev; gpu_dev_id = dev->device_id; igd_passthrough_isa_bridge_create(d->bus, gpu_dev_id); } | 21,265 |
0 | qemu_irq spapr_allocate_irq(uint32_t hint, uint32_t *irq_num, enum xics_irq_type type) { uint32_t irq; qemu_irq qirq; if (hint) { irq = hint; /* FIXME: we should probably check for collisions somehow */ } else { irq = spapr->next_irq++; } qirq = xics_assign_irq(spapr->icp, irq, type); if (!qirq) { return NULL; } if (ir... | 21,266 |
0 | static void omap_mcbsp_write(void *opaque, target_phys_addr_t addr, uint64_t value, unsigned size) { switch (size) { case 2: return omap_mcbsp_writeh(opaque, addr, value); case 4: return omap_mcbsp_writew(opaque, addr, value); default: return omap_badwidth_write16(opaque, addr, value); } } | 21,268 |
0 | vnc_display_setup_auth(VncDisplay *vs, bool password, bool sasl, bool tls, bool x509) { /* * We have a choice of 3 authentication options * * 1. none * 2. vnc * 3. sasl * * The channel can be run in 2 modes * * 1. clear * 2. tls * * And TLS can use 2 types of credentials * * 1. anon * 2. x509 * * We thus have 9 possibl... | 21,269 |
0 | void usb_info(Monitor *mon) { USBBus *bus; USBDevice *dev; USBPort *port; if (TAILQ_EMPTY(&busses)) { monitor_printf(mon, "USB support not enabled\n"); return; } TAILQ_FOREACH(bus, &busses, next) { TAILQ_FOREACH(port, &bus->used, next) { dev = port->dev; if (!dev) continue; monitor_printf(mon, " Device %d.%d, Speed %s ... | 21,270 |
0 | void tcg_gen_brcond_i64(TCGCond cond, TCGv_i64 arg1, TCGv_i64 arg2, int label) { if (cond == TCG_COND_ALWAYS) { tcg_gen_br(label); } else if (cond != TCG_COND_NEVER) { if (TCG_TARGET_REG_BITS == 32) { tcg_gen_op6ii_i32(INDEX_op_brcond2_i32, TCGV_LOW(arg1), TCGV_HIGH(arg1), TCGV_LOW(arg2), TCGV_HIGH(arg2), cond, label);... | 21,271 |
0 | static QList *channel_list_get(void) { return NULL; } | 21,272 |
0 | static int ssd0323_init(SSISlave *dev) { ssd0323_state *s = FROM_SSI_SLAVE(ssd0323_state, dev); s->col_end = 63; s->row_end = 79; s->con = graphic_console_init(ssd0323_update_display, ssd0323_invalidate_display, NULL, NULL, s); qemu_console_resize(s->con, 128 * MAGNIFY, 64 * MAGNIFY); qdev_init_gpio_in(&dev->qdev, ssd0... | 21,273 |
0 | static void ide_atapi_cmd_read_pio(IDEState *s, int lba, int nb_sectors, int sector_size) { s->lba = lba; s->packet_transfer_size = nb_sectors * sector_size; s->elementary_transfer_size = 0; s->io_buffer_index = sector_size; s->cd_sector_size = sector_size; s->status = READY_STAT; ide_atapi_cmd_reply_end(s); } | 21,274 |
0 | static void vc1_inv_trans_8x4_c(uint8_t *dest, int linesize, DCTELEM *block) { int i; register int t1,t2,t3,t4,t5,t6,t7,t8; DCTELEM *src, *dst; const uint8_t *cm = ff_cropTbl + MAX_NEG_CROP; src = block; dst = block; for(i = 0; i < 4; i++){ t1 = 12 * (src[0] + src[4]) + 4; t2 = 12 * (src[0] - src[4]) + 4; t3 = 16 * src... | 21,275 |
0 | static void platform_fixed_ioport_writew(void *opaque, uint32_t addr, uint32_t val) { PCIXenPlatformState *s = opaque; switch (addr) { case 0: { PCIDevice *pci_dev = PCI_DEVICE(s); /* Unplug devices. Value is a bitmask of which devices to unplug, with bit 0 the disk devices, bit 1 the network devices, and bit 2 the non... | 21,276 |
0 | static int xen_pt_msgctrl_reg_write(XenPCIPassthroughState *s, XenPTReg *cfg_entry, uint16_t *val, uint16_t dev_value, uint16_t valid_mask) { XenPTRegInfo *reg = cfg_entry->reg; XenPTMSI *msi = s->msi; uint16_t writable_mask = 0; uint16_t throughable_mask = get_throughable_mask(s, reg, valid_mask); /* Currently no supp... | 21,277 |
0 | static void qcow2_refresh_limits(BlockDriverState *bs, Error **errp) { BDRVQcow2State *s = bs->opaque; if (bs->encrypted) { /* Encryption works on a sector granularity */ bs->request_alignment = BDRV_SECTOR_SIZE; } bs->bl.pwrite_zeroes_alignment = s->cluster_size; } | 21,278 |
0 | static void set_string(Object *obj, Visitor *v, void *opaque, const char *name, Error **errp) { DeviceState *dev = DEVICE(obj); Property *prop = opaque; char **ptr = qdev_get_prop_ptr(dev, prop); Error *local_err = NULL; char *str; if (dev->realized) { qdev_prop_set_after_realize(dev, name, errp); return; } visit_type_... | 21,279 |
1 | void OPPROTO op_idivb_AL_T0(void) { int num, den, q, r; num = (int16_t)EAX; den = (int8_t)T0; if (den == 0) { raise_exception(EXCP00_DIVZ); } q = (num / den) & 0xff; r = (num % den) & 0xff; EAX = (EAX & ~0xffff) | (r << 8) | q; } | 21,283 |
1 | static int print_uint8(DeviceState *dev, Property *prop, char *dest, size_t len) { uint8_t *ptr = qdev_get_prop_ptr(dev, prop); return snprintf(dest, len, "%" PRIu8, *ptr); } | 21,285 |
1 | static int init_image(TiffContext *s, ThreadFrame *frame) { int ret; switch (s->planar * 1000 + s->bpp * 10 + s->bppcount) { case 11: if (!s->palette_is_set) { s->avctx->pix_fmt = AV_PIX_FMT_MONOBLACK; break; } case 21: case 41: case 81: s->avctx->pix_fmt = s->palette_is_set ? AV_PIX_FMT_PAL8 : AV_PIX_FMT_GRAY8; break;... | 21,286 |
1 | static int connect_to_sdog(const char *addr, const char *port) { char hbuf[NI_MAXHOST], sbuf[NI_MAXSERV]; int fd, ret; struct addrinfo hints, *res, *res0; if (!addr) { addr = SD_DEFAULT_ADDR; port = SD_DEFAULT_PORT; } memset(&hints, 0, sizeof(hints)); hints.ai_socktype = SOCK_STREAM; ret = getaddrinfo(addr, port, &hint... | 21,287 |
1 | int attribute_align_arg avcodec_decode_audio3(AVCodecContext *avctx, int16_t *samples, int *frame_size_ptr, AVPacket *avpkt) { AVFrame frame; int ret, got_frame = 0; if (avctx->get_buffer != avcodec_default_get_buffer) { av_log(avctx, AV_LOG_ERROR, "A custom get_buffer() cannot be used with " "avcodec_decode_audio3()\n... | 21,289 |
1 | static int qemu_chr_open_win_con(QemuOpts *opts, CharDriverState **chr) { return qemu_chr_open_win_file(GetStdHandle(STD_OUTPUT_HANDLE), chr); } | 21,291 |
1 | static void dca_exss_parse_header(DCAContext *s) { int asset_size[8]; int ss_index; int blownup; int num_audiop = 1; int num_assets = 1; int active_ss_mask[8]; int i, j; int start_posn; int hdrsize; uint32_t mkr; if (get_bits_left(&s->gb) < 52) return; start_posn = get_bits_count(&s->gb) - 32; skip_bits(&s->gb, 8); // ... | 21,292 |
1 | static int idcin_read_header(AVFormatContext *s) { AVIOContext *pb = s->pb; IdcinDemuxContext *idcin = s->priv_data; AVStream *st; unsigned int width, height; unsigned int sample_rate, bytes_per_sample, channels; /* get the 5 header parameters */ width = avio_rl32(pb); height = avio_rl32(pb); sample_rate = avio_rl32(pb... | 21,293 |
1 | static void xilinx_enet_init(Object *obj) { XilinxAXIEnet *s = XILINX_AXI_ENET(obj); SysBusDevice *sbd = SYS_BUS_DEVICE(obj); object_property_add_link(obj, "axistream-connected", TYPE_STREAM_SLAVE, (Object **) &s->tx_data_dev, &error_abort); object_property_add_link(obj, "axistream-control-connected", TYPE_STREAM_SLAVE... | 21,294 |
1 | static int update_size(AVCodecContext *ctx, int w, int h, enum AVPixelFormat fmt) { VP9Context *s = ctx->priv_data; uint8_t *p; int bytesperpixel = s->bytesperpixel; av_assert0(w > 0 && h > 0); if (s->intra_pred_data[0] && w == ctx->width && h == ctx->height && ctx->pix_fmt == fmt) return 0; ctx->width = w; ctx->height... | 21,295 |
1 | static TRBCCode xhci_reset_ep(XHCIState *xhci, unsigned int slotid, unsigned int epid) { XHCISlot *slot; XHCIEPContext *epctx; USBDevice *dev; trace_usb_xhci_ep_reset(slotid, epid); assert(slotid >= 1 && slotid <= xhci->numslots); if (epid < 1 || epid > 31) { fprintf(stderr, "xhci: bad ep %d\n", epid); return CC_TRB_ER... | 21,297 |
1 | static int64_t mmsh_seek(URLContext *h, int64_t pos, int whence) { MMSHContext *mmsh = h->priv_data; MMSContext *mms = &mmsh->mms; if(pos == 0 && whence == SEEK_CUR) return mms->asf_header_read_size + mms->remaining_in_len + mmsh->chunk_seq * mms->asf_packet_len; return AVERROR(ENOSYS); } | 21,298 |
1 | static void kmvc_decode_inter_8x8(KmvcContext * ctx, const uint8_t * src, int w, int h) { BitBuf bb; int res, val; int i, j; int bx, by; int l0x, l1x, l0y, l1y; int mx, my; kmvc_init_getbits(bb, src); for (by = 0; by < h; by += 8) for (bx = 0; bx < w; bx += 8) { kmvc_getbit(bb, src, res); if (!res) { kmvc_getbit(bb, sr... | 21,299 |
1 | static void tlb_flush_by_mmuidx_async_work(CPUState *cpu, run_on_cpu_data data) { CPUArchState *env = cpu->env_ptr; unsigned long mmu_idx_bitmask = data.host_int; int mmu_idx; assert_cpu_is_self(cpu); tb_lock(); tlb_debug("start: mmu_idx:0x%04lx\n", mmu_idx_bitmask); for (mmu_idx = 0; mmu_idx < NB_MMU_MODES; mmu_idx++)... | 21,300 |
1 | static int encode_hq_slice(AVCodecContext *avctx, void *arg) { SliceArgs *slice_dat = arg; VC2EncContext *s = slice_dat->ctx; PutBitContext *pb = &slice_dat->pb; const int slice_x = slice_dat->x; const int slice_y = slice_dat->y; const int quant_idx = slice_dat->quant_idx; const int slice_bytes_max = slice_dat->bytes; ... | 21,301 |
1 | int ff_rtsp_setup_output_streams(AVFormatContext *s, const char *addr) { RTSPState *rt = s->priv_data; RTSPMessageHeader reply1, *reply = &reply1; int i; char *sdp; AVFormatContext sdp_ctx, *ctx_array[1]; s->start_time_realtime = av_gettime(); /* Announce the stream */ sdp = av_mallocz(SDP_MAX_SIZE); if (sdp == NULL) r... | 21,303 |
0 | static int smjpeg_read_packet(AVFormatContext *s, AVPacket *pkt) { SMJPEGContext *sc = s->priv_data; uint32_t dtype, ret, size, timestamp; int64_t pos; if (s->pb->eof_reached) return AVERROR_EOF; pos = avio_tell(s->pb); dtype = avio_rl32(s->pb); switch (dtype) { case SMJPEG_SNDD: timestamp = avio_rb32(s->pb); size = av... | 21,304 |
0 | static void apic_mem_writeb(void *opaque, target_phys_addr_t addr, uint32_t val) { } | 21,305 |
0 | static void write_dt(void *ptr, unsigned long addr, unsigned long limit, int flags) { unsigned int e1, e2; uint32_t *p; e1 = (addr << 16) | (limit & 0xffff); e2 = ((addr >> 16) & 0xff) | (addr & 0xff000000) | (limit & 0x000f0000); e2 |= flags; p = ptr; p[0] = tswapl(e1); p[1] = tswapl(e2); } | 21,307 |
0 | static int vdi_co_write(BlockDriverState *bs, int64_t sector_num, const uint8_t *buf, int nb_sectors) { BDRVVdiState *s = bs->opaque; uint32_t bmap_entry; uint32_t block_index; uint32_t sector_in_block; uint32_t n_sectors; uint32_t bmap_first = VDI_UNALLOCATED; uint32_t bmap_last = VDI_UNALLOCATED; uint8_t *block = NUL... | 21,308 |
0 | static void vga_screen_dump(void *opaque, const char *filename, bool cswitch, Error **errp) { VGACommonState *s = opaque; DisplaySurface *surface = qemu_console_surface(s->con); if (cswitch) { vga_invalidate_display(s); } graphic_hw_update(s->con); ppm_save(filename, surface, errp); } | 21,309 |
0 | static uint64_t omap_tcmi_read(void *opaque, target_phys_addr_t addr, unsigned size) { struct omap_mpu_state_s *s = (struct omap_mpu_state_s *) opaque; uint32_t ret; if (size != 4) { return omap_badwidth_read32(opaque, addr); } switch (addr) { case 0x00: /* IMIF_PRIO */ case 0x04: /* EMIFS_PRIO */ case 0x08: /* EMIFF_P... | 21,310 |
0 | static int vc1_decode_p_mb(VC1Context *v) { MpegEncContext *s = &v->s; GetBitContext *gb = &s->gb; int i, j; int mb_pos = s->mb_x + s->mb_y * s->mb_stride; int cbp; /* cbp decoding stuff */ int mqdiff, mquant; /* MB quantization */ int ttmb = v->ttfrm; /* MB Transform type */ int mb_has_coeffs = 1; /* last_flag */ int ... | 21,312 |
0 | static void s390_pcihost_init_as(S390pciState *s) { int i; S390PCIBusDevice *pbdev; for (i = 0; i < PCI_SLOT_MAX; i++) { pbdev = &s->pbdev[i]; memory_region_init(&pbdev->mr, OBJECT(s), "iommu-root-s390", UINT64_MAX); address_space_init(&pbdev->as, &pbdev->mr, "iommu-pci"); } memory_region_init_io(&s->msix_notify_mr, OB... | 21,314 |
0 | static uint64_t tmu2_read(void *opaque, target_phys_addr_t addr, unsigned size) { MilkymistTMU2State *s = opaque; uint32_t r = 0; addr >>= 2; switch (addr) { case R_CTL: case R_HMESHLAST: case R_VMESHLAST: case R_BRIGHTNESS: case R_CHROMAKEY: case R_VERTICESADDR: case R_TEXFBUF: case R_TEXHRES: case R_TEXVRES: case R_T... | 21,315 |
0 | static void icount_adjust_vm(void *opaque) { timer_mod(icount_vm_timer, qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) + NANOSECONDS_PER_SECOND / 10); icount_adjust(); } | 21,316 |
0 | static int qcow_is_allocated(BlockDriverState *bs, int64_t sector_num, int nb_sectors, int *pnum) { BDRVQcowState *s = bs->opaque; int index_in_cluster, n; uint64_t cluster_offset; cluster_offset = get_cluster_offset(bs, sector_num << 9, 0, 0, 0, 0); index_in_cluster = sector_num & (s->cluster_sectors - 1); n = s->clus... | 21,317 |
0 | static uint64_t mv88w8618_eth_read(void *opaque, target_phys_addr_t offset, unsigned size) { mv88w8618_eth_state *s = opaque; switch (offset) { case MP_ETH_SMIR: if (s->smir & MP_ETH_SMIR_OPCODE) { switch (s->smir & MP_ETH_SMIR_ADDR) { case MP_ETH_PHY1_BMSR: return MP_PHY_BMSR_LINK | MP_PHY_BMSR_AUTONEG | MP_ETH_SMIR_R... | 21,318 |
0 | static void blockdev_backup_prepare(BlkActionState *common, Error **errp) { BlockdevBackupState *state = DO_UPCAST(BlockdevBackupState, common, common); BlockdevBackup *backup; BlockBackend *blk, *target; Error *local_err = NULL; assert(common->action->type == TRANSACTION_ACTION_KIND_BLOCKDEV_BACKUP); backup = common->... | 21,320 |
0 | static ExitStatus gen_call_pal(DisasContext *ctx, int palcode) { /* We're emulating OSF/1 PALcode. Many of these are trivial access to internal cpu registers. */ /* Unprivileged PAL call */ if (palcode >= 0x80 && palcode < 0xC0) { switch (palcode) { case 0x86: /* IMB */ /* No-op inside QEMU. */ break; case 0x9E: /* RDU... | 21,321 |
0 | static void tcg_out_ri32(TCGContext *s, int const_arg, TCGArg arg) { if (const_arg) { assert(const_arg == 1); tcg_out8(s, TCG_CONST); tcg_out32(s, arg); } else { tcg_out_r(s, arg); } } | 21,322 |
0 | static void hybrid6_cx(float (*in)[2], float (*out)[32][2], const float (*filter)[7][2], int len) { int i, j, ssb; int N = 8; float temp[8][2]; for (i = 0; i < len; i++, in++) { for (ssb = 0; ssb < N; ssb++) { float sum_re = filter[ssb][6][0] * in[6][0], sum_im = filter[ssb][6][0] * in[6][1]; for (j = 0; j < 6; j++) { ... | 21,323 |
0 | static int qsort_strcmp(const void *a, const void *b) { return strcmp(a, b); } | 21,325 |
0 | static uint32_t mb_add_cmdline(MultibootState *s, const char *cmdline) { target_phys_addr_t p = s->offset_cmdlines; char *b = (char *)s->mb_buf + p; get_opt_value(b, strlen(cmdline) + 1, cmdline); s->offset_cmdlines += strlen(b) + 1; return s->mb_buf_phys + p; } | 21,326 |
0 | static void RENAME(yuv2yuv1)(SwsContext *c, const int16_t *lumSrc, const int16_t *chrUSrc, const int16_t *chrVSrc, const int16_t *alpSrc, uint8_t *dest, uint8_t *uDest, uint8_t *vDest, uint8_t *aDest, int dstW, int chrDstW) { int p= 4; const int16_t *src[4]= { alpSrc + dstW, lumSrc + dstW, chrUSrc + chrDstW, chrVSrc + ... | 21,327 |
0 | static int vp3_decode_frame(AVCodecContext *avctx, void *data, int *data_size, const uint8_t *buf, int buf_size) { Vp3DecodeContext *s = avctx->priv_data; GetBitContext gb; static int counter = 0; int i; init_get_bits(&gb, buf, buf_size * 8); if (s->theora && get_bits1(&gb)) { av_log(avctx, AV_LOG_ERROR, "Header packet... | 21,328 |
0 | static char *ts_value_string (char *buf, int buf_size, int64_t ts) { if (ts == AV_NOPTS_VALUE) { snprintf(buf, buf_size, "N/A"); } else { snprintf(buf, buf_size, "%"PRId64, ts); } return buf; } | 21,329 |
1 | void pci_ne2000_init(PCIBus *bus, NICInfo *nd) { PCINE2000State *d; NE2000State *s; uint8_t *pci_conf; d = (PCINE2000State *)pci_register_device(bus, "NE2000", sizeof(PCINE2000State), -1, NULL, NULL); pci_conf = d->dev.config; pci_conf[0x00] = 0xec; // Realtek 8029 pci_conf[0x01] = 0x10; pci_conf[0x02] = 0x29; pci_conf... | 21,330 |
1 | static int decode_bdlt(uint8_t *frame, int width, int height, const uint8_t *src, const uint8_t *src_end) { const uint8_t *frame_end = frame + width * height; uint8_t *line_ptr; int count, lines, segments; count = bytestream_get_le16(&src); if (count >= height || width * count < 0) return -1; frame += width * count; li... | 21,331 |
1 | gdb_handlesig (CPUState *env, int sig) { GDBState *s; char buf[256]; int n; s = gdbserver_state; if (gdbserver_fd < 0 || s->fd < 0) return sig; /* disable single step if it was enabled */ cpu_single_step(env, 0); tb_flush(env); if (sig != 0) { snprintf(buf, sizeof(buf), "S%02x", target_signal_to_gdb (sig)); put_packet(... | 21,332 |
1 | int spapr_h_cas_compose_response(target_ulong addr, target_ulong size) { void *fdt, *fdt_skel; sPAPRDeviceTreeUpdateHeader hdr = { .version_id = 1 }; size -= sizeof(hdr); /* Create sceleton */ fdt_skel = g_malloc0(size); _FDT((fdt_create(fdt_skel, size))); _FDT((fdt_begin_node(fdt_skel, ""))); _FDT((fdt_end_node(fdt_sk... | 21,333 |
1 | int do_snapshot_blkdev(Monitor *mon, const QDict *qdict, QObject **ret_data) { const char *device = qdict_get_str(qdict, "device"); const char *filename = qdict_get_try_str(qdict, "snapshot_file"); const char *format = qdict_get_try_str(qdict, "format"); BlockDriverState *bs; BlockDriver *drv, *proto_drv; int ret = 0; ... | 21,336 |
1 | static int decode_sequence_header(AVCodecContext *avctx, GetBitContext *gb) { VC9Context *v = avctx->priv_data; v->profile = get_bits(gb, 2); av_log(avctx, AV_LOG_DEBUG, "Profile: %i\n", v->profile); #if HAS_ADVANCED_PROFILE if (v->profile > PROFILE_MAIN) { v->level = get_bits(gb, 3); v->chromaformat = get_bits(gb, 2);... | 21,337 |
1 | static void rdma_accept_incoming_migration(void *opaque) { RDMAContext *rdma = opaque; int ret; QEMUFile *f; Error *local_err = NULL, **errp = &local_err; DPRINTF("Accepting rdma connection...\n"); ret = qemu_rdma_accept(rdma); if (ret) { ERROR(errp, "RDMA Migration initialization failed!"); return; } DPRINTF("Accepted... | 21,338 |
1 | static int extract_header(AVCodecContext *const avctx, const AVPacket *const avpkt) { const uint8_t *buf; unsigned buf_size; IffContext *s = avctx->priv_data; int palette_size; if (avctx->extradata_size < 2) { av_log(avctx, AV_LOG_ERROR, "not enough extradata\n"); return AVERROR_INVALIDDATA; palette_size = avctx->extra... | 21,339 |
0 | static void handle_output(VirtIODevice *vdev, VirtQueue *vq) { VirtIOSerial *vser; VirtIOSerialPort *port; VirtIOSerialPortInfo *info; vser = DO_UPCAST(VirtIOSerial, vdev, vdev); port = find_port_by_vq(vser, vq); info = port ? DO_UPCAST(VirtIOSerialPortInfo, qdev, port->dev.info) : NULL; if (!port || !port->host_connec... | 21,340 |
0 | static abi_long do_getsockname(int fd, abi_ulong target_addr, abi_ulong target_addrlen_addr) { socklen_t addrlen; void *addr; abi_long ret; if (target_addr == 0) return get_errno(accept(fd, NULL, NULL)); if (get_user_u32(addrlen, target_addrlen_addr)) return -TARGET_EFAULT; if (addrlen < 0) return -TARGET_EINVAL; addr ... | 21,341 |
0 | static int pc_rec_cmp(const void *p1, const void *p2) { PCRecord *r1 = *(PCRecord **)p1; PCRecord *r2 = *(PCRecord **)p2; if (r1->count < r2->count) return 1; else if (r1->count == r2->count) return 0; else return -1; } | 21,342 |
0 | static int64_t coroutine_fn bdrv_co_get_block_status(BlockDriverState *bs, bool want_zero, int64_t sector_num, int nb_sectors, int *pnum, BlockDriverState **file) { int64_t total_sectors; int64_t n; int64_t ret, ret2; BlockDriverState *local_file = NULL; assert(pnum); *pnum = 0; total_sectors = bdrv_nb_sectors(bs); if ... | 21,343 |
0 | static void usbredir_bulk_packet(void *priv, uint32_t id, struct usb_redir_bulk_packet_header *bulk_packet, uint8_t *data, int data_len) { USBRedirDevice *dev = priv; uint8_t ep = bulk_packet->endpoint; int len = bulk_packet->length; AsyncURB *aurb; DPRINTF("bulk-in status %d ep %02X len %d id %u\n", bulk_packet->statu... | 21,344 |
0 | static inline void gen_op_eval_fbu(TCGv dst, TCGv src, unsigned int fcc_offset) { gen_mov_reg_FCC0(dst, src, fcc_offset); gen_mov_reg_FCC1(cpu_tmp0, src, fcc_offset); tcg_gen_and_tl(dst, dst, cpu_tmp0); } | 21,346 |
0 | static void virtio_pci_device_plugged(DeviceState *d) { VirtIOPCIProxy *proxy = VIRTIO_PCI(d); VirtioBusState *bus = &proxy->bus; uint8_t *config; uint32_t size; config = proxy->pci_dev.config; if (proxy->class_code) { pci_config_set_class(config, proxy->class_code); } pci_set_word(config + PCI_SUBSYSTEM_VENDOR_ID, pci... | 21,347 |
0 | void ff_xvmc_pack_pblocks(MpegEncContext *s, int cbp) { int i, j = 0; const int mb_block_count = 4 + (1 << s->chroma_format); cbp <<= 12-mb_block_count; for (i = 0; i < mb_block_count; i++) { if (cbp & (1 << 11)) s->pblocks[i] = &s->block[j++]; else s->pblocks[i] = NULL; cbp += cbp; } } | 21,349 |
0 | static void cpu_print_cc(FILE *f, int (*cpu_fprintf)(FILE *f, const char *fmt, ...), uint32_t cc) { cpu_fprintf(f, "%c%c%c%c", cc & PSR_NEG? 'N' : '-', cc & PSR_ZERO? 'Z' : '-', cc & PSR_OVF? 'V' : '-', cc & PSR_CARRY? 'C' : '-'); } | 21,350 |
0 | static int cpu_restore_state_from_tb(CPUState *cpu, TranslationBlock *tb, uintptr_t searched_pc) { CPUArchState *env = cpu->env_ptr; TCGContext *s = &tcg_ctx; int j; uintptr_t tc_ptr; #ifdef CONFIG_PROFILER int64_t ti; #endif #ifdef CONFIG_PROFILER ti = profile_getclock(); #endif tcg_func_start(s); gen_intermediate_cod... | 21,351 |
0 | static uint8_t virtio_scsi_do_command(QVirtIOSCSI *vs, const uint8_t *cdb, const uint8_t *data_in, size_t data_in_len, uint8_t *data_out, size_t data_out_len) { QVirtQueue *vq; QVirtIOSCSICmdReq req = { { 0 } }; QVirtIOSCSICmdResp resp = { .response = 0xff, .status = 0xff }; uint64_t req_addr, resp_addr, data_in_addr =... | 21,352 |
0 | static uint64_t pic_read(void *opaque, target_phys_addr_t addr, unsigned size) { HeathrowPICS *s = opaque; HeathrowPIC *pic; unsigned int n; uint32_t value; n = ((addr & 0xfff) - 0x10) >> 4; if (n >= 2) { value = 0; } else { pic = &s->pics[n]; switch(addr & 0xf) { case 0x0: value = pic->events; break; case 0x4: value =... | 21,353 |
0 | static void pc_dimm_realize(DeviceState *dev, Error **errp) { PCDIMMDevice *dimm = PC_DIMM(dev); if (!dimm->hostmem) { error_setg(errp, "'" PC_DIMM_MEMDEV_PROP "' property is not set"); return; } if (dimm->node >= nb_numa_nodes) { error_setg(errp, "'DIMM property " PC_DIMM_NODE_PROP " has value %" PRIu32 "' which excee... | 21,354 |
0 | static void vtd_reset_context_cache(IntelIOMMUState *s) { VTDAddressSpace **pvtd_as; VTDAddressSpace *vtd_as; uint32_t bus_it; uint32_t devfn_it; VTD_DPRINTF(CACHE, "global context_cache_gen=1"); for (bus_it = 0; bus_it < VTD_PCI_BUS_MAX; ++bus_it) { pvtd_as = s->address_spaces[bus_it]; if (!pvtd_as) { continue; } for ... | 21,355 |
0 | static void virtio_write_config(PCIDevice *pci_dev, uint32_t address, uint32_t val, int len) { VirtIOPCIProxy *proxy = DO_UPCAST(VirtIOPCIProxy, pci_dev, pci_dev); if (PCI_COMMAND == address) { if (!(val & PCI_COMMAND_MASTER)) { proxy->vdev->status &= !VIRTIO_CONFIG_S_DRIVER_OK; } } pci_default_write_config(pci_dev, ad... | 21,356 |
0 | void fpu_clear_exceptions(void) { struct __attribute__((packed)) { uint16_t fpuc; uint16_t dummy1; uint16_t fpus; uint16_t dummy2; uint16_t fptag; uint16_t dummy3; uint32_t ignored[4]; long double fpregs[8]; } float_env32; asm volatile ("fnstenv %0\n" : : "m" (float_env32)); float_env32.fpus &= ~0x7f; asm volatile ("fl... | 21,357 |
0 | static unsigned int dec_movs_r(DisasContext *dc) { TCGv t0; int size = memsize_z(dc); DIS(fprintf (logfile, "movs.%c $r%u, $r%u\n", memsize_char(size), dc->op1, dc->op2)); cris_cc_mask(dc, CC_MASK_NZ); t0 = tcg_temp_new(TCG_TYPE_TL); /* Size can only be qi or hi. */ t_gen_sext(t0, cpu_R[dc->op1], size); cris_alu(dc, CC... | 21,358 |
0 | void hpet_pit_disable(void) { PITChannelState *s; s = &pit_state.channels[0]; qemu_del_timer(s->irq_timer); } | 21,359 |
0 | void ff_h264_h_lpf_luma_inter_msa(uint8_t *data, int img_width, int alpha, int beta, int8_t *tc) { uint8_t bs0 = 1; uint8_t bs1 = 1; uint8_t bs2 = 1; uint8_t bs3 = 1; if (tc[0] < 0) bs0 = 0; if (tc[1] < 0) bs1 = 0; if (tc[2] < 0) bs2 = 0; if (tc[3] < 0) bs3 = 0; avc_loopfilter_luma_inter_edge_ver_msa(data, bs0, bs1, bs... | 21,360 |
0 | void bdrv_attach_aio_context(BlockDriverState *bs, AioContext *new_context) { BdrvAioNotifier *ban; if (!bs->drv) { return; } bs->aio_context = new_context; if (bs->backing) { bdrv_attach_aio_context(bs->backing->bs, new_context); } if (bs->file) { bdrv_attach_aio_context(bs->file->bs, new_context); } if (bs->drv->bdrv... | 21,361 |
0 | uint32_t HELPER(mvcp)(CPUS390XState *env, uint64_t l, uint64_t a1, uint64_t a2) { HELPER_LOG("%s: %16" PRIx64 " %16" PRIx64 " %16" PRIx64 "\n", __func__, l, a1, a2); return mvc_asc(env, l, a1, PSW_ASC_PRIMARY, a2, PSW_ASC_SECONDARY); } | 21,362 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.