static int omapfb_query_plane(struct fb_info *fbi, struct omapfb_plane_info *pi) { struct omapfb_info *ofbi = FB2OFB(fbi); if (ofbi->num_overlays != 1) { memset(pi, 0, sizeof(*pi)); } else { struct omap_overlay *ovl; struct omap_overlay_info *ovli; ovl = ofbi->overlays[0]; ovli = &ovl->info; pi->pos_x = ovli->pos_x; pi->pos_y = ovli->pos_y; pi->enabled = ovli->enabled; pi->channel_out = 0; /* xxx */ pi->mirror = 0; pi->mem_idx = get_mem_idx(ofbi); pi->out_width = ovli->out_width; pi->out_height = ovli->out_height; } return 0; }
void ft_lldi(t_vm *vm, t_process *proc) { int val; int arg[3]; arg[2] = proc->ir.args[2]; if (proc->ir.code_args[0] == T_IND) arg[0] = get_mem_idx(vm, proc->pc, proc->ir.args[0]); else if (proc->ir.code_args[0] == T_REG) arg[0] = proc->reg[proc->ir.args[0]]; else arg[0] = proc->ir.args[0]; if (proc->ir.code_args[1] == T_REG) arg[1] = proc->reg[proc->ir.args[1]]; else arg[1] = proc->ir.args[1]; val = get_memlong(vm, proc->pc + arg[0] + arg[1]); proc->reg[proc->ir.args[2]] = val; if (vm->verbose & 4) { ft_print_operations(proc, arg); ft_putchar('\n'); } proc->carry = !val; }
void ft_ldi(t_vm *vm, t_process *proc) { int val; int arg[3]; arg[2] = proc->ir.args[2]; if (proc->ir.code_args[0] == T_IND) arg[0] = get_mem_idx(vm, proc->pc, proc->ir.args[0]); else if (proc->ir.code_args[0] == T_REG) arg[0] = proc->reg[proc->ir.args[0]]; else arg[0] = proc->ir.args[0]; if (proc->ir.code_args[1] == T_REG) arg[1] = proc->reg[proc->ir.args[1]]; else arg[1] = proc->ir.args[1]; val = get_mem(vm, proc->pc, arg[0] + arg[1]); proc->reg[proc->ir.args[2]] = val; if (vm->verbose & 4) { proc->ir.code_args[0] = T_IND; proc->ir.code_args[1] = T_IND; ft_print_operations(proc, arg); ft_printf("\n | -> load from %d + %d = %d (with pc and mod %d)\n", arg[0], arg[1], arg[0] + arg[1], (((arg[0] + arg[1]) % IDX_MOD) + proc->pc)); } }
void ft_lldi(t_vm *vm, t_process *proc) { int val; int arg[3]; arg[2] = proc->ir.args[2]; if (proc->ir.code_args[0] == T_IND) arg[0] = get_mem_idx(vm, proc->pc, proc->ir.args[0]); // lldi avec un int plus grand que max short int ? zaz else if (proc->ir.code_args[0] == T_REG) arg[0] = proc->reg[proc->ir.args[0]]; else arg[0] = proc->ir.args[0]; if (proc->ir.code_args[1] == T_REG) arg[1] = proc->reg[proc->ir.args[1]]; else arg[1] = proc->ir.args[1]; val = get_memlong(vm, proc->pc + arg[0] + arg[1]); proc->reg[proc->ir.args[2]] = val; if (vm->verbose & 4) ft_print_operations(proc, arg); proc->carry = !val; }