label int64 0 1 | func1 stringlengths 23 97k | id int64 0 27.3k |
|---|---|---|
1 | static void qtest_irq_handler(void *opaque, int n, int level) { qemu_irq old_irq = *(qemu_irq *)opaque; qemu_set_irq(old_irq, level); if (irq_levels[n] != level) { CharDriverState *chr = qtest_chr; irq_levels[n] = level; qtest_send_prefix(chr); qtest_send(chr, "IRQ %s %d\n", level ? "raise" : "lower", n); } } | 16,056 |
0 | void gmc1_altivec(uint8_t *dst /* align 8 */, uint8_t *src /* align1 */, int stride, int h, int x16, int y16, int rounder) { POWERPC_TBL_DECLARE(altivec_gmc1_num, GMC1_PERF_COND); #ifdef ALTIVEC_USE_REFERENCE_C_CODE const int A=(16-x16)*(16-y16); const int B=( x16)*(16-y16); const int C=(16-x16)*( y16); const int D=( x... | 16,058 |
0 | void ff_put_h264_qpel4_mc12_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride) { avc_luma_midh_qrt_4w_msa(src - (2 * stride) - 2, stride, dst, stride, 4, 0); } | 16,059 |
0 | enum AVCodecID avpriv_fmt_v4l2codec(uint32_t v4l2_fmt) { int i; for (i = 0; avpriv_fmt_conversion_table[i].codec_id != AV_CODEC_ID_NONE; i++) { if (avpriv_fmt_conversion_table[i].v4l2_fmt == v4l2_fmt) { return avpriv_fmt_conversion_table[i].codec_id; } } return AV_CODEC_ID_NONE; } | 16,060 |
0 | static int read_sbr_channel_pair_element(AACContext *ac, SpectralBandReplication *sbr, GetBitContext *gb) { if (get_bits1(gb)) // bs_data_extra skip_bits(gb, 8); // bs_reserved if ((sbr->bs_coupling = get_bits1(gb))) { if (read_sbr_grid(ac, sbr, gb, &sbr->data[0])) return -1; copy_sbr_grid(&sbr->data[1], &sbr->data[0])... | 16,061 |
0 | static av_cold int alac_encode_close(AVCodecContext *avctx) { AlacEncodeContext *s = avctx->priv_data; ff_lpc_end(&s->lpc_ctx); av_freep(&avctx->extradata); avctx->extradata_size = 0; av_freep(&avctx->coded_frame); return 0; } | 16,062 |
0 | av_cold int ff_mpv_encode_init(AVCodecContext *avctx) { MpegEncContext *s = avctx->priv_data; AVCPBProperties *cpb_props; int i, ret, format_supported; mpv_encode_defaults(s); switch (avctx->codec_id) { case AV_CODEC_ID_MPEG2VIDEO: if (avctx->pix_fmt != AV_PIX_FMT_YUV420P && avctx->pix_fmt != AV_PIX_FMT_YUV422P) { av_l... | 16,064 |
0 | static inline void gen_op_eval_fbg(TCGv dst, TCGv src, unsigned int fcc_offset) { gen_mov_reg_FCC0(dst, src, fcc_offset); tcg_gen_xori_tl(dst, dst, 0x1); gen_mov_reg_FCC1(cpu_tmp0, src, fcc_offset); tcg_gen_and_tl(dst, dst, cpu_tmp0); } | 16,065 |
0 | static void disas_simd_across_lanes(DisasContext *s, uint32_t insn) { unsupported_encoding(s, insn); } | 16,066 |
0 | static int readv_f(int argc, char **argv) { struct timeval t1, t2; int Cflag = 0, qflag = 0, vflag = 0; int c, cnt; char *buf; int64_t offset; /* Some compilers get confused and warn if this is not initialized. */ int total = 0; int nr_iov; QEMUIOVector qiov; int pattern = 0; int Pflag = 0; while ((c = getopt(argc, arg... | 16,067 |
0 | void nbd_client_put(NBDClient *client) { if (--client->refcount == 0) { /* The last reference should be dropped by client->close, * which is called by nbd_client_close. */ assert(client->closing); nbd_unset_handlers(client); close(client->sock); client->sock = -1; if (client->exp) { QTAILQ_REMOVE(&client->exp->clients,... | 16,069 |
0 | static void arm11mpcore_initfn(Object *obj) { ARMCPU *cpu = ARM_CPU(obj); set_feature(&cpu->env, ARM_FEATURE_V6K); set_feature(&cpu->env, ARM_FEATURE_VFP); set_feature(&cpu->env, ARM_FEATURE_VAPA); cpu->midr = ARM_CPUID_ARM11MPCORE; cpu->reset_fpsid = 0x410120b4; cpu->mvfr0 = 0x11111111; cpu->mvfr1 = 0x00000000; cpu->c... | 16,070 |
0 | void pci_device_hot_add(Monitor *mon, const QDict *qdict) { PCIDevice *dev = NULL; const char *pci_addr = qdict_get_str(qdict, "pci_addr"); const char *type = qdict_get_str(qdict, "type"); const char *opts = qdict_get_try_str(qdict, "opts"); /* strip legacy tag */ if (!strncmp(pci_addr, "pci_addr=", 9)) { pci_addr += 9... | 16,071 |
0 | float32 helper_fsqrts(CPUSPARCState *env, float32 src) { float32 ret; clear_float_exceptions(env); ret = float32_sqrt(src, &env->fp_status); check_ieee_exceptions(env); return ret; } | 16,072 |
0 | ser_read(void *opaque, target_phys_addr_t addr, unsigned int size) { struct etrax_serial *s = opaque; D(CPUCRISState *env = s->env); uint32_t r = 0; addr >>= 2; switch (addr) { case R_STAT_DIN: r = s->rx_fifo[(s->rx_fifo_pos - s->rx_fifo_len) & 15]; if (s->rx_fifo_len) { r |= 1 << STAT_DAV; } r |= 1 << STAT_TR_RDY; r |... | 16,073 |
0 | static void vfio_probe_nvidia_bar0_88000_quirk(VFIODevice *vdev, int nr) { PCIDevice *pdev = &vdev->pdev; VFIOQuirk *quirk; if (!vdev->has_vga || nr != 0 || pci_get_word(pdev->config + PCI_VENDOR_ID) != PCI_VENDOR_ID_NVIDIA) { return; } quirk = g_malloc0(sizeof(*quirk)); quirk->vdev = vdev; quirk->data.flags = quirk->d... | 16,075 |
0 | static subpage_t *subpage_init(target_phys_addr_t base) { subpage_t *mmio; mmio = g_malloc0(sizeof(subpage_t)); mmio->base = base; memory_region_init_io(&mmio->iomem, &subpage_ops, mmio, "subpage", TARGET_PAGE_SIZE); mmio->iomem.subpage = true; #if defined(DEBUG_SUBPAGE) printf("%s: %p base " TARGET_FMT_plx " len %08x ... | 16,077 |
0 | static abi_long do_bind(int sockfd, abi_ulong target_addr, socklen_t addrlen) { void *addr; abi_long ret; if (addrlen < 0) return -TARGET_EINVAL; addr = alloca(addrlen+1); ret = target_to_host_sockaddr(addr, target_addr, addrlen); if (ret) return ret; return get_errno(bind(sockfd, addr, addrlen)); } | 16,078 |
0 | int net_client_init(Monitor *mon, const char *device, const char *p) { static const char * const fd_params[] = { "vlan", "name", "fd", NULL }; char buf[1024]; int vlan_id, ret; VLANState *vlan; char *name = NULL; vlan_id = 0; if (get_param_value(buf, sizeof(buf), "vlan", p)) { vlan_id = strtol(buf, NULL, 0); } vlan = q... | 16,079 |
0 | void tcg_target_qemu_prologue (TCGContext *s) { int i, frame_size; frame_size = 0 + 8 /* back chain */ + 8 /* CR */ + 8 /* LR */ + 8 /* compiler doubleword */ + 8 /* link editor doubleword */ + 8 /* TOC save area */ + TCG_STATIC_CALL_ARGS_SIZE + ARRAY_SIZE (tcg_target_callee_save_regs) * 8 ; frame_size = (frame_size + ... | 16,080 |
0 | static void pxa2xx_pm_write(void *opaque, hwaddr addr, uint64_t value, unsigned size) { PXA2xxState *s = (PXA2xxState *) opaque; switch (addr) { case PMCR: /* Clear the write-one-to-clear bits... */ s->pm_regs[addr >> 2] &= ~(value & 0x2a); /* ...and set the plain r/w bits */ s->pm_regs[addr >> 2] &= ~0x15; s->pm_regs[... | 16,081 |
0 | static unsigned int dec_rfe_etc(DisasContext *dc) { cris_cc_mask(dc, 0); if (dc->op2 == 15) /* ignore halt. */ return 2; switch (dc->op2 & 7) { case 2: /* rfe. */ DIS(fprintf(logfile, "rfe\n")); cris_evaluate_flags(dc); tcg_gen_helper_0_0(helper_rfe); dc->is_jmp = DISAS_UPDATE; break; case 5: /* rfn. */ DIS(fprintf(log... | 16,082 |
0 | ram_addr_t get_current_ram_size(void) { MemoryDeviceInfoList *info_list = NULL; MemoryDeviceInfoList **prev = &info_list; MemoryDeviceInfoList *info; ram_addr_t size = ram_size; qmp_pc_dimm_device_list(qdev_get_machine(), &prev); for (info = info_list; info; info = info->next) { MemoryDeviceInfo *value = info->value; i... | 16,084 |
0 | static int ipvideo_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; IpvideoContext *s = avctx->priv_data; AVFrame *frame = data; int ret; int send_buffer; int frame_format; int video_data_size; if (av_packet_get_side_data(av... | 16,085 |
0 | static ssize_t fd_put_buffer(void *opaque, const void *data, size_t size) { FdMigrationState *s = opaque; ssize_t ret; do { ret = write(s->fd, data, size); } while (ret == -1 && errno == EINTR); if (ret == -1) ret = -errno; if (ret == -EAGAIN) qemu_set_fd_handler2(s->fd, NULL, NULL, fd_put_notify, s); return ret; } | 16,087 |
0 | static void tap_send(void *opaque) { TAPState *s = opaque; int size; int packets = 0; while (qemu_can_send_packet(&s->nc)) { uint8_t *buf = s->buf; size = tap_read_packet(s->fd, s->buf, sizeof(s->buf)); if (size <= 0) { break; } if (s->host_vnet_hdr_len && !s->using_vnet_hdr) { buf += s->host_vnet_hdr_len; size -= s->h... | 16,088 |
0 | pflash_t *pflash_cfi01_register(target_phys_addr_t base, ram_addr_t off, BlockDriverState *bs, uint32_t sector_len, int nb_blocs, int width, uint16_t id0, uint16_t id1, uint16_t id2, uint16_t id3) { pflash_t *pfl; target_phys_addr_t total_len; total_len = sector_len * nb_blocs; /* XXX: to be fixed */ #if 0 if (total_le... | 16,091 |
0 | static void sigp_set_prefix(CPUState *cs, run_on_cpu_data arg) { S390CPU *cpu = S390_CPU(cs); SigpInfo *si = arg.host_ptr; uint32_t addr = si->param & 0x7fffe000u; cpu_synchronize_state(cs); if (!address_space_access_valid(&address_space_memory, addr, sizeof(struct LowCore), false)) { set_sigp_status(si, SIGP_STAT_INVA... | 16,092 |
1 | static void memory_map_init(void) { system_memory = qemu_malloc(sizeof(*system_memory)); memory_region_init(system_memory, "system", UINT64_MAX); set_system_memory_map(system_memory); } | 16,094 |
1 | static void qxl_realize_primary(PCIDevice *dev, Error **errp) { PCIQXLDevice *qxl = PCI_QXL(dev); VGACommonState *vga = &qxl->vga; Error *local_err = NULL; qxl->id = 0; qxl_init_ramsize(qxl); vga->vbe_size = qxl->vgamem_size; vga->vram_size_mb = qxl->vga.vram_size >> 20; vga_common_init(vga, OBJECT(dev), true); vga_ini... | 16,095 |
1 | const char *path(const char *name) { /* Only do absolute paths: quick and dirty, but should mostly be OK. Could do relative by tracking cwd. */ if (!base || name[0] != '/') return name; return follow_path(base, name) ?: name; } | 16,096 |
1 | static int aac_decode_er_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, GetBitContext *gb) { AACContext *ac = avctx->priv_data; const MPEG4AudioConfig *const m4ac = &ac->oc[1].m4ac; ChannelElement *che; int err, i; int samples = m4ac->frame_length_short ? 960 : 1024; int chan_config = m4ac->chan_config; i... | 16,097 |
1 | static void versatile_init(MachineState *machine, int board_id) { ObjectClass *cpu_oc; Object *cpuobj; ARMCPU *cpu; MemoryRegion *sysmem = get_system_memory(); MemoryRegion *ram = g_new(MemoryRegion, 1); qemu_irq pic[32]; qemu_irq sic[32]; DeviceState *dev, *sysctl; SysBusDevice *busdev; DeviceState *pl041; PCIBus *pci... | 16,098 |
1 | int css_do_ssch(SubchDev *sch, ORB *orb) { SCSW *s = &sch->curr_status.scsw; PMCW *p = &sch->curr_status.pmcw; int ret; if (~(p->flags) & (PMCW_FLAGS_MASK_DNV | PMCW_FLAGS_MASK_ENA)) { ret = -ENODEV; goto out; } if (s->ctrl & SCSW_STCTL_STATUS_PEND) { ret = -EINPROGRESS; goto out; } if (s->ctrl & (SCSW_FCTL_START_FUNC ... | 16,099 |
1 | static int mxf_edit_unit_absolute_offset(MXFContext *mxf, MXFIndexTable *index_table, int64_t edit_unit, int64_t *edit_unit_out, int64_t *offset_out, int nag) { int i; int offset_temp = 0; for (i = 0; i < index_table->nb_segments; i++) { MXFIndexTableSegment *s = index_table->segments[i]; edit_unit = FFMAX(edit_unit, s... | 16,100 |
1 | QEMUPutLEDEntry *qemu_add_led_event_handler(QEMUPutLEDEvent *func, void *opaque) { QEMUPutLEDEntry *s; s = g_malloc0(sizeof(QEMUPutLEDEntry)); s->put_led = func; s->opaque = opaque; QTAILQ_INSERT_TAIL(&led_handlers, s, next); return s; } | 16,101 |
1 | static int mp3_read_probe(AVProbeData *p) { int max_frames, first_frames; int fsize, frames, sample_rate; uint32_t header; uint8_t *buf, *buf2, *end; AVCodecContext avctx; if(id3v2_match(p->buf)) return AVPROBE_SCORE_MAX/2+1; // this must be less than mpeg-ps because some retards put id3v2 tags before mpeg-ps files max... | 16,102 |
1 | static ImageInfoSpecific *qcow2_get_specific_info(BlockDriverState *bs) { BDRVQcow2State *s = bs->opaque; ImageInfoSpecific *spec_info = g_new(ImageInfoSpecific, 1); *spec_info = (ImageInfoSpecific){ .type = IMAGE_INFO_SPECIFIC_KIND_QCOW2, .u.qcow2.data = g_new(ImageInfoSpecificQCow2, 1), }; if (s->qcow_version == 2) {... | 16,103 |
1 | static int gif_video_probe(AVProbeData * pd) { const uint8_t *p, *p_end; int bits_per_pixel, has_global_palette, ext_code, ext_len; int gce_flags, gce_disposal; if (pd->buf_size < 24 || memcmp(pd->buf, gif89a_sig, 6) != 0) return 0; p_end = pd->buf + pd->buf_size; p = pd->buf + 6; bits_per_pixel = (p[4] & 0x07) + 1; ha... | 16,104 |
0 | static int vcr2_init_sequence(AVCodecContext *avctx) { Mpeg1Context *s1 = avctx->priv_data; MpegEncContext *s = &s1->mpeg_enc_ctx; int i, v, ret; /* start new MPEG-1 context decoding */ s->out_format = FMT_MPEG1; if (s1->mpeg_enc_ctx_allocated) { ff_mpv_common_end(s); } s->width = avctx->coded_width; s->height = avctx-... | 16,105 |
0 | static void writer_print_time(WriterContext *wctx, const char *key, int64_t ts, const AVRational *time_base, int is_duration) { char buf[128]; if ((!is_duration && ts == AV_NOPTS_VALUE) || (is_duration && ts == 0)) { writer_print_string(wctx, key, "N/A", 1); } else { double d = ts * av_q2d(*time_base); struct unit_valu... | 16,106 |
1 | static void fill_yuv_image(AVFrame *pict, int frame_index, int width, int height) { int x, y, i, ret; /* when we pass a frame to the encoder, it may keep a reference to it * internally; * make sure we do not overwrite it here */ ret = av_frame_make_writable(pict); if (ret < 0) exit(1); i = frame_index; /* Y */ for (y =... | 16,107 |
1 | static int get_int32(QEMUFile *f, void *pv, size_t size) { int32_t *v = pv; qemu_get_sbe32s(f, v); return 0; } | 16,108 |
1 | static long do_rt_sigreturn_v1(CPUARMState *env) { abi_ulong frame_addr; struct rt_sigframe_v1 *frame = NULL; sigset_t host_set; /* * Since we stacked the signal on a 64-bit boundary, * then 'sp' should be word aligned here. If it's * not, then the user is trying to mess with us. */ frame_addr = env->regs[13]; trace_us... | 16,110 |
1 | static int decode_q_branch(SnowContext *s, int level, int x, int y){ const int w= s->b_width << s->block_max_depth; const int rem_depth= s->block_max_depth - level; const int index= (x + y*w) << rem_depth; int trx= (x+1)<<rem_depth; const BlockNode *left = x ? &s->block[index-1] : &null_block; const BlockNode *top = y ... | 16,111 |
1 | cl_program av_opencl_compile(const char *program_name, const char *build_opts) { int i; cl_int status, build_status; int kernel_code_idx = 0; const char *kernel_source; size_t kernel_code_len; char* ptr = NULL; cl_program program = NULL; size_t log_size; char *log = NULL; LOCK_OPENCL; for (i = 0; i < opencl_ctx.kernel_... | 16,113 |
1 | static void output_segment_list(OutputStream *os, AVIOContext *out, DASHContext *c) { int i, start_index = 0, start_number = 1; if (c->window_size) { start_index = FFMAX(os->nb_segments - c->window_size, 0); start_number = FFMAX(os->segment_index - c->window_size, 1); } if (c->use_template) { int timescale = c->use_tim... | 16,114 |
1 | int av_cold ff_ivi_init_tiles(IVIPlaneDesc *planes, int tile_width, int tile_height) { int p, b, x, y, x_tiles, y_tiles, t_width, t_height; IVIBandDesc *band; IVITile *tile, *ref_tile; for (p = 0; p < 3; p++) { t_width = !p ? tile_width : (tile_width + 3) >> 2; t_height = !p ? tile_height : (tile_height + 3) >> 2; if (... | 16,115 |
1 | int spapr_h_cas_compose_response(sPAPRMachineState *spapr, target_ulong addr, target_ulong size, bool cpu_update) { void *fdt, *fdt_skel; sPAPRDeviceTreeUpdateHeader hdr = { .version_id = 1 }; sPAPRMachineClass *smc = SPAPR_MACHINE_GET_CLASS(qdev_get_machine()); size -= sizeof(hdr); /* Create sceleton */ fdt_skel = g_m... | 16,116 |
1 | int do_store_msr (CPUPPCState *env, target_ulong value) { int enter_pm; value &= env->msr_mask; if (((value >> MSR_IR) & 1) != msr_ir || ((value >> MSR_DR) & 1) != msr_dr) { /* Flush all tlb when changing translation mode */ tlb_flush(env, 1); env->interrupt_request |= CPU_INTERRUPT_EXITTB; } #if !defined (CONFIG_USER_... | 16,117 |
1 | static int filter_frame(AVFilterLink *inlink, AVFrame *insamplesref) { AResampleContext *aresample = inlink->dst->priv; const int n_in = insamplesref->nb_samples; int64_t delay; int n_out = n_in * aresample->ratio + 32; AVFilterLink *const outlink = inlink->dst->outputs[0]; AVFrame *outsamplesref; int ret; delay = swr_... | 16,118 |
1 | static void mem_add(MemoryListener *listener, MemoryRegionSection *section) { AddressSpaceDispatch *d = container_of(listener, AddressSpaceDispatch, listener); MemoryRegionSection now = *section, remain = *section; if ((now.offset_within_address_space & ~TARGET_PAGE_MASK) || (now.size < TARGET_PAGE_SIZE)) { now.size = ... | 16,119 |
1 | static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) { AnsiContext *s = avctx->priv_data; uint8_t *buf = avpkt->data; int buf_size = avpkt->size; const uint8_t *buf_end = buf+buf_size; int ret, i, count; if ((ret = ff_reget_buffer(avctx, s->frame)) < 0) return ret; if (!avctx->fra... | 16,120 |
1 | static void load_symbols(struct elfhdr *hdr, int fd) { unsigned int i, nsyms; struct elf_shdr sechdr, symtab, strtab; char *strings; struct syminfo *s; struct elf_sym *syms; lseek(fd, hdr->e_shoff, SEEK_SET); for (i = 0; i < hdr->e_shnum; i++) { if (read(fd, &sechdr, sizeof(sechdr)) != sizeof(sechdr)) return; #ifdef BS... | 16,121 |
1 | av_cold int ff_snow_common_init(AVCodecContext *avctx){ SnowContext *s = avctx->priv_data; int width, height; int i, j; s->avctx= avctx; s->max_ref_frames=1; //just make sure it's not an invalid value in case of no initial keyframe ff_me_cmp_init(&s->mecc, avctx); ff_hpeldsp_init(&s->hdsp, avctx->flags); ff_videodsp_in... | 16,123 |
1 | static int hdev_open(BlockDriverState *bs, const char *filename, int flags) { BDRVRawState *s = bs->opaque; #if defined(__APPLE__) && defined(__MACH__) if (strstart(filename, "/dev/cdrom", NULL)) { kern_return_t kernResult; io_iterator_t mediaIterator; char bsdPath[ MAXPATHLEN ]; int fd; kernResult = FindEjectableCDMed... | 16,125 |
1 | void kvm_inject_x86_mce(CPUState *cenv, int bank, uint64_t status, uint64_t mcg_status, uint64_t addr, uint64_t misc) { #ifdef KVM_CAP_MCE struct kvm_x86_mce mce = { .bank = bank, .status = status, .mcg_status = mcg_status, .addr = addr, .misc = misc, }; struct kvm_x86_mce_data data = { .env = cenv, .mce = &mce, }; run... | 16,127 |
1 | static int asf_read_marker(AVFormatContext *s, int64_t size) { AVIOContext *pb = s->pb; ASFContext *asf = s->priv_data; int i, count, name_len, ret; char name[1024]; avio_rl64(pb); // reserved 16 bytes avio_rl64(pb); // ... count = avio_rl32(pb); // markers count avio_rl16(pb); // reserved 2 bytes name_len = avio_rl16(... | 16,128 |
1 | static void xhci_events_update(XHCIState *xhci, int v) { XHCIInterrupter *intr = &xhci->intr[v]; dma_addr_t erdp; unsigned int dp_idx; bool do_irq = 0; if (xhci->usbsts & USBSTS_HCH) { return; } erdp = xhci_addr64(intr->erdp_low, intr->erdp_high); if (erdp < intr->er_start || erdp >= (intr->er_start + TRB_SIZE*intr->er... | 16,129 |
1 | static int process_line(URLContext *h, char *line, int line_count, int *new_location) { HTTPContext *s = h->priv_data; char *tag, *p, *end; /* end of header */ if (line[0] == '\0') return 0; p = line; if (line_count == 0) { while (!isspace(*p) && *p != '\0') p++; while (isspace(*p)) p++; s->http_code = strtol(p, &end, ... | 16,130 |
1 | static void decode_p_block(FourXContext *f, uint16_t *dst, uint16_t *src, int log2w, int log2h, int stride) { const int index = size2index[log2h][log2w]; const int h = 1 << log2h; int code = get_vlc2(&f->gb, block_type_vlc[1 - (f->version > 1)][index].table, BLOCK_TYPE_VLC_BITS, 1); uint16_t *start = (uint16_t *)f->las... | 16,131 |
1 | void ff_snow_vertical_compose97i_sse2(IDWTELEM *b0, IDWTELEM *b1, IDWTELEM *b2, IDWTELEM *b3, IDWTELEM *b4, IDWTELEM *b5, int width){ long i = width; while(i & 0x1F) { i--; b4[i] -= (W_DM*(b3[i] + b5[i])+W_DO)>>W_DS; b3[i] -= (W_CM*(b2[i] + b4[i])+W_CO)>>W_CS; b2[i] += (W_BM*(b1[i] + b3[i])+4*b2[i]+W_BO)>>W_BS; b1[i] +... | 16,133 |
1 | static int kvm_has_msr_star(CPUState *env) { static int has_msr_star; int ret; /* first time */ if (has_msr_star == 0) { struct kvm_msr_list msr_list, *kvm_msr_list; has_msr_star = -1; /* Obtain MSR list from KVM. These are the MSRs that we must * save/restore */ msr_list.nmsrs = 0; ret = kvm_ioctl(env->kvm_state, KVM_... | 16,134 |
1 | static CharDriverState *qemu_chr_open_stdio(ChardevStdio *opts) { CharDriverState *chr; if (is_daemonized()) { error_report("cannot use stdio with -daemonize"); return NULL; } old_fd0_flags = fcntl(0, F_GETFL); tcgetattr (0, &oldtty); qemu_set_nonblock(0); atexit(term_exit); chr = qemu_chr_open_fd(0, 1); chr->chr_close... | 16,136 |
0 | void helper_vmexit(CPUX86State *env, uint32_t exit_code, uint64_t exit_info_1) { CPUState *cs = CPU(x86_env_get_cpu(env)); uint32_t int_ctl; qemu_log_mask(CPU_LOG_TB_IN_ASM, "vmexit(%08x, %016" PRIx64 ", %016" PRIx64 ", " TARGET_FMT_lx ")!\n", exit_code, exit_info_1, ldq_phys(cs->as, env->vm_vmcb + offsetof(struct vmcb... | 16,137 |
0 | static void eval_coefs(int *coefs, const int *refl) { int buffer[10]; int *b1 = buffer; int *b2 = coefs; int x, y; for (x=0; x < 10; x++) { b1[x] = refl[x] << 4; for (y=0; y < x; y++) b1[y] = ((refl[x] * b2[x-y-1]) >> 12) + b2[y]; FFSWAP(int *, b1, b2); } for (x=0; x < 10; x++) coefs[x] >>= 4; } | 16,139 |
0 | void kvmppc_hash64_free_pteg(uint64_t token) { struct kvm_get_htab_buf *htab_buf; htab_buf = container_of((void *)(uintptr_t) token, struct kvm_get_htab_buf, hpte); g_free(htab_buf); return; } | 16,141 |
0 | static void kvm_s390_flic_realize(DeviceState *dev, Error **errp) { S390FLICState *fs = S390_FLIC_COMMON(dev); KVMS390FLICState *flic_state = KVM_S390_FLIC(dev); struct kvm_create_device cd = {0}; struct kvm_device_attr test_attr = {0}; int ret; Error *errp_local = NULL; KVM_S390_FLIC_GET_CLASS(dev)->parent_realize(dev... | 16,142 |
0 | static void ide_cd_change_cb(void *opaque, bool load) { IDEState *s = opaque; uint64_t nb_sectors; s->tray_open = !load; bdrv_get_geometry(s->bs, &nb_sectors); s->nb_sectors = nb_sectors; /* * First indicate to the guest that a CD has been removed. That's * done on the next command the guest sends us. * * Then we set U... | 16,143 |
0 | static int conditional_wait(DBDMA_channel *ch) { dbdma_cmd *current = &ch->current; uint16_t wait; uint16_t sel_mask, sel_value; uint32_t status; int cond; DBDMA_DPRINTF("conditional_wait\n"); wait = le16_to_cpu(current->command) & WAIT_MASK; switch(wait) { case WAIT_NEVER: /* don't wait */ return 0; case WAIT_ALWAYS: ... | 16,144 |
0 | static void ide_atapi_cmd_read_dma_cb(void *opaque, int ret) { IDEState *s = opaque; int data_offset, n; if (ret < 0) { ide_atapi_io_error(s, ret); goto eot; } if (s->io_buffer_size > 0) { /* * For a cdrom read sector command (s->lba != -1), * adjust the lba for the next s->io_buffer_size chunk * and dma the current ch... | 16,145 |
0 | static int nbd_open(BlockDriverState *bs, QDict *options, int flags, Error **errp) { BDRVNBDState *s = bs->opaque; char *export = NULL; int result, sock; /* Pop the config into our state object. Exit if invalid. */ result = nbd_config(s, options, &export); if (result != 0) { return result; } /* establish TCP connection... | 16,146 |
0 | static int pl061_load(QEMUFile *f, void *opaque, int version_id) { pl061_state *s = (pl061_state *)opaque; if (version_id != 1) return -EINVAL; s->locked = qemu_get_be32(f); s->data = qemu_get_be32(f); s->old_data = qemu_get_be32(f); s->dir = qemu_get_be32(f); s->isense = qemu_get_be32(f); s->ibe = qemu_get_be32(f); s-... | 16,148 |
0 | void pcie_host_mmcfg_map(PCIExpressHost *e, hwaddr addr, uint32_t size) { assert(!(size & (size - 1))); /* power of 2 */ assert(size >= PCIE_MMCFG_SIZE_MIN); assert(size <= PCIE_MMCFG_SIZE_MAX); e->size = size; memory_region_init_io(&e->mmio, OBJECT(e), &pcie_mmcfg_ops, e, "pcie-mmcfg", e->size); e->base_addr = addr; m... | 16,149 |
0 | const char *small_strptime(const char *p, const char *fmt, struct tm *dt) { int c, val; for(;;) { c = *fmt++; if (c == '\0') { return p; } else if (c == '%') { c = *fmt++; switch(c) { case 'H': val = date_get_num(&p, 0, 23, 2); if (val == -1) return NULL; dt->tm_hour = val; break; case 'M': val = date_get_num(&p, 0, 59... | 16,150 |
0 | void ppc_set_irq (CPUState *env, int n_IRQ, int level) { if (level) { env->pending_interrupts |= 1 << n_IRQ; cpu_interrupt(env, CPU_INTERRUPT_HARD); } else { env->pending_interrupts &= ~(1 << n_IRQ); if (env->pending_interrupts == 0) cpu_reset_interrupt(env, CPU_INTERRUPT_HARD); } #if defined(PPC_DEBUG_IRQ) if (logleve... | 16,151 |
0 | static void fd_put_buffer(void *opaque, const uint8_t *buf, int64_t pos, int size) { QEMUFileFD *s = opaque; ssize_t len; do { len = write(s->fd, buf, size); } while (len == -1 && errno == EINTR); if (len == -1) len = -errno; /* When the fd becomes writable again, register a callback to do * a put notify */ if (len == ... | 16,152 |
0 | void laio_io_unplug(BlockDriverState *bs, void *aio_ctx, bool unplug) { struct qemu_laio_state *s = aio_ctx; assert(s->io_q.plugged > 0 || !unplug); if (unplug && --s->io_q.plugged > 0) { return; } if (!s->io_q.blocked && !QSIMPLEQ_EMPTY(&s->io_q.pending)) { ioq_submit(s); } } | 16,153 |
0 | void acpi_pm1_cnt_init(ACPIREGS *ar, MemoryRegion *parent, uint8_t s4_val) { ar->pm1.cnt.s4_val = s4_val; ar->wakeup.notify = acpi_notify_wakeup; qemu_register_wakeup_notifier(&ar->wakeup); memory_region_init_io(&ar->pm1.cnt.io, memory_region_owner(parent), &acpi_pm_cnt_ops, ar, "acpi-cnt", 2); memory_region_add_subreg... | 16,154 |
0 | static void spapr_nmi(NMIState *n, int cpu_index, Error **errp) { CPUState *cs; CPU_FOREACH(cs) { async_run_on_cpu(cs, ppc_cpu_do_nmi_on_cpu, RUN_ON_CPU_NULL); } } | 16,156 |
0 | static void do_test_validate_qmp_introspect(TestInputVisitorData *data, const char *schema_json) { SchemaInfoList *schema = NULL; Visitor *v; v = validate_test_init_raw(data, schema_json); visit_type_SchemaInfoList(v, NULL, &schema, &error_abort); g_assert(schema); qapi_free_SchemaInfoList(schema); } | 16,157 |
0 | static int64_t coroutine_fn qcow_co_get_block_status(BlockDriverState *bs, int64_t sector_num, int nb_sectors, int *pnum, BlockDriverState **file) { BDRVQcowState *s = bs->opaque; int index_in_cluster, n; uint64_t cluster_offset; qemu_co_mutex_lock(&s->lock); cluster_offset = get_cluster_offset(bs, sector_num << 9, 0, ... | 16,158 |
0 | int v9fs_co_symlink(V9fsState *s, V9fsFidState *fidp, const char *oldpath, const char *newpath, gid_t gid) { int err; FsCred cred; cred_init(&cred); cred.fc_uid = fidp->uid; cred.fc_gid = gid; cred.fc_mode = 0777; v9fs_co_run_in_worker( { err = s->ops->symlink(&s->ctx, oldpath, newpath, &cred); if (err < 0) { err = -er... | 16,159 |
0 | static void cpu_x86_fill_host(x86_def_t *x86_cpu_def) { uint32_t eax = 0, ebx = 0, ecx = 0, edx = 0; x86_cpu_def->name = "host"; host_cpuid(0x0, 0, &eax, &ebx, &ecx, &edx); x86_cpu_def->level = eax; x86_cpu_def->vendor1 = ebx; x86_cpu_def->vendor2 = edx; x86_cpu_def->vendor3 = ecx; host_cpuid(0x1, 0, &eax, &ebx, &ecx, ... | 16,160 |
0 | static inline void mix_3f_2r_to_stereo(AC3DecodeContext *ctx) { int i; float (*output)[256] = ctx->audio_block.block_output; for (i = 0; i < 256; i++) { output[1][i] += (output[2][i] + output[4][i]); output[2][i] += (output[3][i] + output[5][i]); } memset(output[3], 0, sizeof(output[3])); memset(output[4], 0, sizeof(ou... | 16,161 |
0 | static int vmdk_open_desc_file(BlockDriverState *bs, int flags, char *buf, Error **errp) { int ret; char ct[128]; BDRVVmdkState *s = bs->opaque; if (vmdk_parse_description(buf, "createType", ct, sizeof(ct))) { error_setg(errp, "invalid VMDK image descriptor"); ret = -EINVAL; goto exit; } if (strcmp(ct, "monolithicFlat"... | 16,162 |
0 | static void tcg_out_qemu_ld (TCGContext *s, const TCGArg *args, int opc) { int addr_reg, data_reg, data_reg2, r0, r1, rbase, mem_index, s_bits, bswap; #ifdef CONFIG_SOFTMMU int r2; void *label1_ptr, *label2_ptr; #endif #if TARGET_LONG_BITS == 64 int addr_reg2; #endif data_reg = *args++; if (opc == 3) data_reg2 = *args+... | 16,165 |
0 | int32_t helper_fstoi(CPUSPARCState *env, float32 src) { int32_t ret; clear_float_exceptions(env); ret = float32_to_int32_round_to_zero(src, &env->fp_status); check_ieee_exceptions(env); return ret; } | 16,166 |
0 | static void version(void) { printf("qemu-" TARGET_ARCH " version " QEMU_VERSION QEMU_PKGVERSION ", Copyright (c) 2003-2008 Fabrice Bellard\n"); } | 16,167 |
0 | static void raw_aio_flush_io_queue(BlockDriverState *bs) { #ifdef CONFIG_LINUX_AIO BDRVRawState *s = bs->opaque; if (s->use_aio) { laio_io_unplug(bs, s->aio_ctx, false); } #endif } | 16,169 |
1 | static inline void RENAME(bgr24ToUV)(uint8_t *dstU, uint8_t *dstV, uint8_t *src1, uint8_t *src2, long width) { #ifdef HAVE_MMX asm volatile( "mov %3, %%"REG_a" \n\t" "movq "MANGLE(w1111)", %%mm5 \n\t" "movq "MANGLE(bgr2UCoeff)", %%mm6 \n\t" "pxor %%mm7, %%mm7 \n\t" "lea (%%"REG_a", %%"REG_a", 2), %%"REG_d" \n\t" "add %... | 16,170 |
1 | static void test_ivshmem_server(void) { IVState state1, state2, *s1, *s2; ServerThread thread; IvshmemServer server; int ret, vm1, vm2; int nvectors = 2; guint64 end_time = g_get_monotonic_time() + 5 * G_TIME_SPAN_SECOND; memset(tmpshmem, 0x42, TMPSHMSIZE); ret = ivshmem_server_init(&server, tmpserver, tmpshm, TMPSHMSI... | 16,171 |
1 | static int escape124_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) { int buf_size = avpkt->size; Escape124Context *s = avctx->priv_data; AVFrame *frame = data; GetBitContext gb; unsigned frame_flags, frame_size; unsigned i; unsigned superblock_index, cb_index = 1, superblock_col_index... | 16,172 |
1 | DeviceState *qdev_create(BusState *bus, const char *name) { DeviceState *dev; dev = qdev_try_create(bus, name); if (!dev) { hw_error("Unknown device '%s' for bus '%s'\n", name, bus->info->name); } return dev; } | 16,173 |
1 | static void quantize_and_encode_band_cost_SQUAD_mips(struct AACEncContext *s, PutBitContext *pb, const float *in, float *out, const float *scaled, int size, int scale_idx, int cb, const float lambda, const float uplim, int *bits, const float ROUNDING) { const float Q34 = ff_aac_pow34sf_tab[POW_SF2_ZERO - scale_idx + SC... | 16,174 |
1 | static void vhost_begin(MemoryListener *listener) { } | 16,175 |
1 | void ff_tls_deinit(void) { #if CONFIG_TLS_OPENSSL_PROTOCOL ff_openssl_deinit(); #endif #if CONFIG_TLS_GNUTLS_PROTOCOL ff_gnutls_deinit(); #endif } | 16,176 |
1 | static void xbr2x(AVFrame * input, AVFrame * output, const uint32_t * r2y) { int x,y; int next_line = output->linesize[0]>>2; for (y = 0; y < input->height; y++) { uint32_t pprev; uint32_t pprev2; uint32_t * E = (uint32_t *)(output->data[0] + y * output->linesize[0] * 2); /* middle. Offset of -8 is given */ uint32_t * ... | 16,178 |
1 | static inline int32_t mipsdsp_sat_add_i32(int32_t a, int32_t b, CPUMIPSState *env) { int32_t tempI; tempI = a + b; if (MIPSDSP_OVERFLOW(a, b, tempI, 0x80000000)) { if (a > 0) { tempI = 0x7FFFFFFF; } else { tempI = 0x80000000; } set_DSPControl_overflow_flag(1, 20, env); } return tempI; } | 16,179 |
1 | CharDriverState *uart_hci_init(qemu_irq wakeup) { struct csrhci_s *s = (struct csrhci_s *) g_malloc0(sizeof(struct csrhci_s)); s->chr.opaque = s; s->chr.chr_write = csrhci_write; s->chr.chr_ioctl = csrhci_ioctl; s->hci = qemu_next_hci(); s->hci->opaque = s; s->hci->evt_recv = csrhci_out_hci_packet_event; s->hci->acl_re... | 16,180 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.