text
stringlengths
9
39.2M
dir
stringlengths
25
226
lang
stringclasses
163 values
created_date
timestamp[s]
updated_date
timestamp[s]
repo_name
stringclasses
751 values
repo_full_name
stringclasses
752 values
star
int64
1.01k
183k
len_tokens
int64
1
18.5M
```objective-c #define cmp_FPU(name, optype, a_size, load_var, rw, use_var, is_nan, cycle_postfix) \ static int sf_FCOM##name##_a##a_size(uint32_t fetchdat) \ { ...
/content/code_sandbox/src/cpu/x87_ops_sf_compare.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
5,462
```objective-c static int sf_FXCH_sti(uint32_t fetchdat) { const floatx80 floatx80_default_nan = packFloatx80(0, floatx80_default_nan_exp, floatx80_default_nan_fraction); floatx80 st0_reg; floatx80 sti_reg; int st0_tag; int sti_tag; FP_ENTER(); FPU_check_pe...
/content/code_sandbox/src/cpu/x87_ops_sf_misc.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
1,376
```objective-c /* A fast way to find out whether x is one of RC_DOWN or RC_CHOP (and not one of RC_RND or RC_UP). */ #define DOWN_OR_CHOP() (fpu_state.cwd & FPU_CW_RC & FPU_RC_DOWN) static int sf_FLDL2T(uint32_t fetchdat) { FP_ENTER(); FPU_check_pending_exceptions(); cpu_state.pc++; clear_C1(); ...
/content/code_sandbox/src/cpu/x87_ops_sf_const.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
1,301
```c /* * 86Box A hypervisor and IBM PC system emulator that specializes in * running old operating systems and software designed for IBM * PC systems and compatibles from 1981 through fairly recent * system designs based on the PCI bus. * * This file is part of the 86Box di...
/content/code_sandbox/src/cpu/x86seg_2386.c
c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
141
```objective-c #include "codegen_ops.h" /*Instruction has input dependency on register in REG field*/ #define SRCDEP_REG (1ULL << 0) /*Instruction has input dependency on register in R/M field*/ #define SRCDEP_RM (1ULL << 1) /*Instruction modifies register in REG field*/ #define DSTDEP_REG (1ULL << 2) /*Instruction mo...
/content/code_sandbox/src/cpu/codegen_timing_common.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
2,050
```objective-c static int opMOV_w_seg_a16(uint32_t fetchdat) { fetch_ea_16(fetchdat); if (cpu_mod != 3) SEG_CHECK_WRITE(cpu_state.ea_seg); switch (rmdat & 0x38) { case 0x00: /*ES*/ seteaw(ES); break; case 0x08: /*CS*/ seteaw(CS); break...
/content/code_sandbox/src/cpu/x86_ops_mov_seg.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
4,980
```c /* * 86Box A hypervisor and IBM PC system emulator that specializes in * running old operating systems and software designed for IBM * PC systems and compatibles from 1981 through fairly recent * system designs based on the PCI bus. * * This file is part of the 86Box di...
/content/code_sandbox/src/cpu/cpu.c
c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
49,284
```c /* * 86Box A hypervisor and IBM PC system emulator that specializes in * running old operating systems and software designed for IBM * PC systems and compatibles from 1981 through fairly recent * system designs based on the PCI bus. * * This file is part of the 86Box di...
/content/code_sandbox/src/cpu/cpu_table.c
c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
76,922
```objective-c static int opPAND_a16(uint32_t fetchdat) { MMX_REG src; MMX_REG *dst; MMX_ENTER(); fetch_ea_16(fetchdat); dst = MMX_GETREGP(cpu_reg); MMX_GETSRC(); dst->q &= src.q; MMX_SETEXP(cpu_reg); return 0; } static int opPAND_a32(uint32_t fetchdat) { MMX_REG src; ...
/content/code_sandbox/src/cpu/x86_ops_mmx_logic.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
675
```objective-c #define REP_OPS(size, CNT_REG, SRC_REG, DEST_REG) \ static int opREP_INSB_##size(uint32_t fetchdat) \ { ...
/content/code_sandbox/src/cpu/x86_ops_rep.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
10,190
```c /*Basic P6 timing model by plant/nerd73. Based on the K6 timing model*/ /*Some cycle timings come from path_to_url #include <stdio.h> #include <stdint.h> #include <string.h> #include <wchar.h> #include <86box/86box.h> #include "cpu.h" #include <86box/mem.h> #include <86box/machine.h> #include <86box/plat_unused.h>...
/content/code_sandbox/src/cpu/codegen_timing_p6.c
c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
26,124
```objective-c /*Cyrix-only instructions*/ /*System Management Mode*/ static void opSVDC_common(uint32_t fetchdat) { switch (rmdat & 0x38) { case 0x00: /*ES*/ cyrix_write_seg_descriptor(easeg + cpu_state.eaaddr, &cpu_state.seg_es); writememw(0, easeg + cpu_state.eaaddr + 8, ES); ...
/content/code_sandbox/src/cpu/x86_ops_cyrix.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
1,887
```objective-c /* * 86Box A hypervisor and IBM PC system emulator that specializes in * running old operating systems and software designed for IBM * PC systems and compatibles from 1981 through fairly recent * system designs based on the PCI bus. * * This file is part of th...
/content/code_sandbox/src/cpu/x87_sf.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
244
```objective-c static int opXCHG_b_a16(uint32_t fetchdat) { uint8_t temp; fetch_ea_16(fetchdat); if (cpu_mod != 3) SEG_CHECK_WRITE(cpu_state.ea_seg); temp = geteab(); if (cpu_state.abrt) return 1; seteab(getr8(cpu_reg)); if (cpu_state.abrt) return 1; setr8(cpu_re...
/content/code_sandbox/src/cpu/x86_ops_xchg.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
2,505
```objective-c see COPYING for more details */ static int opESCAPE_d8_a16(uint32_t fetchdat) { //pclog("D8 A16: fetchdat=%02x.\n", (fetchdat >> 3) & 0x1f); return x86_opcodes_d8_a16[(fetchdat >> 3) & 0x1f](fetchdat); } static int opESCAPE_d8_a32(uint32_t fetchdat) { return x86_opcodes_d8_a32[(fetchdat >>...
/content/code_sandbox/src/cpu/x86_ops_fpu.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
974
```c #include <stdarg.h> #include <stdio.h> #include <stdint.h> #include <string.h> #include <wchar.h> #include <math.h> #ifndef INFINITY # define INFINITY (__builtin_inff()) #endif #include <86box/86box.h> #include "cpu.h" #include <86box/timer.h> #include "x86.h" #include "x86_ops.h" #include "x86seg_common.h" #i...
/content/code_sandbox/src/cpu/386_dynarec_ops.c
c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
798
```objective-c static int opIN_AL_imm(uint32_t fetchdat) { uint16_t port = (uint16_t) getbytef(); check_io_perm(port, 1); AL = inb(port); CLOCK_CYCLES(12); PREFETCH_RUN(12, 2, -1, 1, 0, 0, 0, 0); if (nmi && nmi_enable && nmi_mask) return 1; return 0; } static int opIN_AX_imm(uint32_t...
/content/code_sandbox/src/cpu/x86_ops_io.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
1,214
```objective-c #define op_seg(name, seg, opcode_table, normal_opcode_table) \ static int op##name##_w_a16(uint32_t fetchdat) \ { \ int legal; ...
/content/code_sandbox/src/cpu/x86_ops_prefix_2386.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
3,297
```c #include <stdio.h> #include <stdint.h> #include <string.h> #include <wchar.h> #include <86box/86box.h> #include "cpu.h" #include <86box/mem.h> #include <86box/plat_unused.h> #include "x86.h" #include "x86_ops.h" #include "x87_sf.h" #include "x87.h" #include "codegen.h" #include "codegen_ops.h" #include "codegen_t...
/content/code_sandbox/src/cpu/codegen_timing_486.c
c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
10,735
```objective-c /* * 86Box A hypervisor and IBM PC system emulator that specializes in * running old operating systems and software designed for IBM * PC systems and compatibles from 1981 through fairly recent * system designs based on the PCI bus. * * This file is part of th...
/content/code_sandbox/src/cpu/x87_ops.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
152,434
```objective-c static int opMOV_r_CRx_a16(uint32_t fetchdat) { if ((CPL || (cpu_state.eflags & VM_FLAG)) && (cr0 & 1)) { x86gpf(NULL, 0); return 1; } fetch_ea_16(fetchdat); switch (cpu_reg) { case 0: cpu_state.regs[cpu_rm].l = cr0; if (is486 || isibm486) ...
/content/code_sandbox/src/cpu/x86_ops_mov_ctrl.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
4,258
```objective-c static int opCMC(uint32_t fetchdat) { flags_rebuild(); cpu_state.flags ^= C_FLAG; CLOCK_CYCLES(2); PREFETCH_RUN(2, 1, -1, 0, 0, 0, 0, 0); return 0; } static int opCLC(uint32_t fetchdat) { flags_rebuild(); cpu_state.flags &= ~C_FLAG; CLOCK_CYCLES(2); PREFETCH_RUN(2, 1,...
/content/code_sandbox/src/cpu/x86_ops_flag_2386.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
2,729
```c /*Since IDT/Centaur didn't document cycle timings in the WinChip datasheets, and I don't currently own a WinChip 2 to test against, most of the timing here is a guess. This code makes the current (probably wrong) assumptions : - FPU uses same timings as a Pentium, except for FXCH (which doesn't pair) - 3DN...
/content/code_sandbox/src/cpu/codegen_timing_winchip2.c
c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
15,543
```objective-c #define opFPU(name, optype, a_size, load_var, get, use_var, cycle_postfix) \ static int opFADD##name##_a##a_size(uint32_t fetchdat) \ { ...
/content/code_sandbox/src/cpu/x87_ops_arith.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
6,559
```c #include <stdarg.h> #include <stdint.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #include <wchar.h> #include <math.h> #ifndef INFINITY # define INFINITY (__builtin_inff()) #endif #define HAVE_STDARG_H #include <86box/86box.h> #include "cpu.h" #include "x86.h" #include "x86_ops.h" #include "x8...
/content/code_sandbox/src/cpu/386.c
c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
3,101
```objective-c static int opBT_w_r_a16(uint32_t fetchdat) { uint16_t temp; fetch_ea_16(fetchdat); SEG_CHECK_READ(cpu_state.ea_seg); cpu_state.eaaddr += ((cpu_state.regs[cpu_reg].w / 16) * 2); eal_r = 0; temp = geteaw(); if (cpu_state.abrt) return 1; flags_rebuild(); if (tem...
/content/code_sandbox/src/cpu/x86_ops_bit.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
3,686
```objective-c static int opPUNPCKLDQ_a16(uint32_t fetchdat) { uint32_t usrc; MMX_REG src; MMX_REG *dst; MMX_ENTER(); fetch_ea_16(fetchdat); src = MMX_GETREG(cpu_rm); dst = MMX_GETREGP(cpu_reg); if (cpu_mod == 3) { dst->l[1] = src.l[0]; CLOCK_CYCLES(1); } else { ...
/content/code_sandbox/src/cpu/x86_ops_mmx_pack.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
3,013
```objective-c #define INC_DEC_OP(name, reg, inc, setflags) \ static int op##name(uint32_t fetchdat) \ { \ setflags(reg, 1); \ reg += inc; \ CLOCK_CYCLES...
/content/code_sandbox/src/cpu/x86_ops_inc_dec.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
1,155
```objective-c static int opMOVD_l_mm_a16(uint32_t fetchdat) { uint32_t dst; MMX_REG *op; MMX_ENTER(); fetch_ea_16(fetchdat); op = MMX_GETREGP(cpu_reg); if (cpu_mod == 3) { op->l[0] = cpu_state.regs[cpu_rm].l; op->l[1] = 0; CLOCK_CYCLES(1); } else { SEG_CHE...
/content/code_sandbox/src/cpu/x86_ops_mmx_mov.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
1,861
```objective-c #define X87_TAG_VALID 0 #define X87_TAG_ZERO 1 #define X87_TAG_INVALID 2 #define X87_TAG_EMPTY 3 extern uint32_t x87_pc_off; extern uint32_t x87_op_off; extern uint16_t x87_pc_seg; extern uint16_t x87_op_seg; static __inline void x87_set_mmx(void) { uint64_t *p; if (fpu_softfloat) { ...
/content/code_sandbox/src/cpu/x87.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
2,350
```c #include <stdarg.h> #include <stdint.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #include <wchar.h> #include <math.h> #ifndef INFINITY # define INFINITY (__builtin_inff()) #endif #define HAVE_STDARG_H #include <86box/86box.h> #include "cpu.h" #include <86box/timer.h> #include "x86.h" #include ...
/content/code_sandbox/src/cpu/386_common.c
c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
29,149
```objective-c extern int tempc; enum { FLAGS_UNKNOWN, FLAGS_ZN8, FLAGS_ZN16, FLAGS_ZN32, FLAGS_ADD8, FLAGS_ADD16, FLAGS_ADD32, FLAGS_SUB8, FLAGS_SUB16, FLAGS_SUB32, FLAGS_SHL8, FLAGS_SHL16, FLAGS_SHL32, FLAGS_SHR8, FLAGS_SHR16, FLAGS_SHR32, FLA...
/content/code_sandbox/src/cpu/x86_flags.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
6,530
```objective-c #define opSET(condition) \ static int opSET##condition##_a16(uint32_t fetchdat) \ { \ fetch_ea_16(fetchdat); \ if (cpu_mod != 3) \ ...
/content/code_sandbox/src/cpu/x86_ops_set.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
283
```objective-c /* * 86Box A hypervisor and IBM PC system emulator that specializes in * running old operating systems and software designed for IBM * PC systems and compatibles from 1981 through fairly recent * system designs based on the PCI bus. * * This file is part of th...
/content/code_sandbox/src/cpu/x86seg_common.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
412
```objective-c static int opMOVSB_a16(uint32_t fetchdat) { uint8_t temp; addr64 = addr64_2 = 0x00000000; SEG_CHECK_READ(cpu_state.ea_seg); SEG_CHECK_WRITE(&cpu_state.seg_es); CHECK_READ(cpu_state.ea_seg, SI, SI); CHECK_WRITE(&cpu_state.seg_es, DI, DI); high_page = 0; do_mmut_rb(cpu_sta...
/content/code_sandbox/src/cpu/x86_ops_string_2386.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
9,148
```c /* * 86Box A hypervisor and IBM PC system emulator that specializes in * running old operating systems and software designed for IBM * PC systems and compatibles from 1981 through fairly recent * system designs based on the PCI bus. * * This file is part of the 86Box di...
/content/code_sandbox/src/cpu/x86seg.c
c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
23,760
```c #include <stdarg.h> #include <stdint.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #if defined(__APPLE__) && defined(__aarch64__) # include <pthread.h> #endif #include <wchar.h> #include <math.h> #ifndef INFINITY # define INFINITY (__builtin_inff()) #endif #define HAVE_STDARG_H #include <86b...
/content/code_sandbox/src/cpu/386_dynarec.c
c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
8,311
```c /*Elements taken into account : - X/Y pairing - FPU/FXCH pairing - Prefix decode delay - AGI stalls Elements not taken into account : - Branch prediction (beyond most simplistic approximation) - FPU queue - Out of order execution (beyond most simplistic app...
/content/code_sandbox/src/cpu/codegen_timing_686.c
c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
19,606
```objective-c #ifdef USE_NEW_DYNAREC # define CPU_SET_OXPC #else # define CPU_SET_OXPC oxpc = cpu_state.pc; #endif #define RETF_a16(stack_offset) \ if ((msw & 1) && !(cpu_state.eflags & VM_FLAG)) { \ op_pmoderetf(0, stack_offset); \ return 1; ...
/content/code_sandbox/src/cpu/x86_ops_ret.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
2,626
```objective-c #define MMX_GETSHIFT() \ if (cpu_mod == 3) { \ shift = (MMX_GETREG(cpu_rm)).b[0]; \ CLOCK_CYCLES(1); \ } else { \ SEG_CHECK_READ(cpu_state.ea_seg)...
/content/code_sandbox/src/cpu/x86_ops_mmx_shift.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
2,900
```objective-c #define REP_OPS(size, CNT_REG, SRC_REG, DEST_REG) \ static int opREP_INSB_##size(uint32_t fetchdat) \ { ...
/content/code_sandbox/src/cpu/x86_ops_rep_dyn.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
8,710
```objective-c static int opMOV_r_CRx_a16(uint32_t fetchdat) { if ((CPL || (cpu_state.eflags & VM_FLAG)) && (cr0 & 1)) { x86gpf(NULL, 0); return 1; } fetch_ea_16(fetchdat); switch (cpu_reg) { case 0: cpu_state.regs[cpu_rm].l = cr0; if (is486 || isibm486) ...
/content/code_sandbox/src/cpu/x86_ops_mov_ctrl_2386.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
4,199
```objective-c #define OP_ARITH(name, operation, setflags, flagops, gettempc) \ static int op##name##_b_rmw_a16(uint32_t fetchdat) \ { ...
/content/code_sandbox/src/cpu/x86_ops_arith.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
11,074
```objective-c #ifdef USE_NEW_DYNAREC # define OP_SHIFT_b(c, ea32) \ { \ uint8_t ...
/content/code_sandbox/src/cpu/x86_ops_shift.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
12,829
```objective-c static int opCMPXCHG_b_a16(uint32_t fetchdat) { uint8_t temp; uint8_t temp2 = AL; fetch_ea_16(fetchdat); SEG_CHECK_WRITE(cpu_state.ea_seg); temp = geteab(); if (cpu_state.abrt) return 1; if (AL == temp) seteab(getr8(cpu_reg)); else AL = temp; i...
/content/code_sandbox/src/cpu/x86_ops_atomic.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
2,349
```c /* * 86Box A hypervisor and IBM PC system emulator that specializes in * running old operating systems and software designed for IBM * PC systems and compatibles from 1981 through fairly recent * system designs based on the PCI bus. * * This file is part of the 86Box di...
/content/code_sandbox/src/cpu/808x.c
c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
26,001
```objective-c #define PUSH_W_OP(reg) \ static int opPUSH_##reg(uint32_t fetchdat) \ { \ PUSH_W(reg); \ CLOCK_CYCLES((is486) ? 1 : 2); \ PREFETCH_RUN(2, 1, -1, 0, 0, 1, 0, 0); \ ret...
/content/code_sandbox/src/cpu/x86_ops_stack.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
5,895
```c #include <stdio.h> #include <stdint.h> #include <string.h> #include <wchar.h> #include <86box/86box.h> #include "cpu.h" #include <86box/mem.h> #include "codegen_timing_common.h" uint64_t opcode_deps[256] = { // clang-format off /* ADD ADD ...
/content/code_sandbox/src/cpu/codegen_timing_common.c
c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
15,717
```objective-c #define REP_OPS(size, CNT_REG, SRC_REG, DEST_REG) \ static int opREP_INSB_##size(uint32_t fetchdat) \ { ...
/content/code_sandbox/src/cpu/x86_ops_rep_2386.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
9,988
```objective-c static int sf_F2XM1(uint32_t fetchdat) { floatx80 result; struct softfloat_status_t status; FP_ENTER(); FPU_check_pending_exceptions(); cpu_state.pc++; clear_C1(); if (IS_TAG_EMPTY(0)) { FPU_stack_underflow(fetchdat, 0, 0); goto next_ins; ...
/content/code_sandbox/src/cpu/x87_ops_sf_trans.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
4,132
```objective-c /* * 86Box A hypervisor and IBM PC system emulator that specializes in * running old operating systems and software designed for IBM * PC systems and compatibles from 1981 through fairly recent * system designs based on the PCI bus. * * This file is part of th...
/content/code_sandbox/src/cpu/x86.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
819
```objective-c static int opINT3(uint32_t fetchdat) { int cycles_old = cycles; UN_USED(cycles_old); #ifdef USE_GDBSTUB if (gdbstub_int3()) return 1; #endif if ((cr0 & 1) && (cpu_state.eflags & VM_FLAG) && (IOPL != 3)) { x86gpf(NULL, 0); return 1; } x86_int_sw(3); CLOC...
/content/code_sandbox/src/cpu/x86_ops_int.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
798
```objective-c /* * 86Box A hypervisor and IBM PC system emulator that specializes in * running old operating systems and software designed for IBM * PC systems and compatibles from 1981 through fairly recent * system designs based on the PCI bus. * * This file is part of th...
/content/code_sandbox/src/cpu/x86_ops_amd.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
319
```objective-c static int opCMC(uint32_t fetchdat) { flags_rebuild(); cpu_state.flags ^= C_FLAG; CLOCK_CYCLES(2); PREFETCH_RUN(2, 1, -1, 0, 0, 0, 0, 0); return 0; } static int opCLC(uint32_t fetchdat) { flags_rebuild(); cpu_state.flags &= ~C_FLAG; CLOCK_CYCLES(2); PREFETCH_RUN(2, 1,...
/content/code_sandbox/src/cpu/x86_ops_flag.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
2,765
```objective-c #define op_seg(name, seg, opcode_table, normal_opcode_table) \ static int op##name##_w_a16(uint32_t fetchdat) \ { \ fetchdat = fastreadl(cs + cpu_state.pc); ...
/content/code_sandbox/src/cpu/x86_ops_prefix.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
2,136
```c /* * 86Box A hypervisor and IBM PC system emulator that specializes in * running old operating systems and software designed for IBM * PC systems and compatibles from 1981 through fairly recent * system designs based on the PCI bus. * * This file is part of the 86Box di...
/content/code_sandbox/src/cpu/x86seg_common.c
c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
795
```objective-c /* * 86Box A hypervisor and IBM PC system emulator that specializes in * running old operating systems and software designed for IBM * PC systems and compatibles from 1981 through fairly recent * system designs based on the PCI bus. * * This file is part of th...
/content/code_sandbox/src/cpu/x86_ops_i686.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
5,195
```objective-c /* * 86Box A hypervisor and IBM PC system emulator that specializes in * running old operating systems and software designed for IBM * PC systems and compatibles from 1981 through fairly recent * system designs based on the PCI bus. * * This file is part of th...
/content/code_sandbox/src/cpu/x86_ops.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
5,909
```objective-c /* * 86Box A hypervisor and IBM PC system emulator that specializes in * running old operating systems and software designed for IBM * PC systems and compatibles from 1981 through fairly recent * system designs based on the PCI bus. * * This file is part of th...
/content/code_sandbox/src/cpu/x86seg.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
937
```objective-c typedef struct { int f2xm1; int fabs; int fadd, fadd_32, fadd_64; int fbld; int fbstp; int fchs; int fclex; int fcom, fcom_32, fcom_64; int fcos; int fincdecstp; int fdisi_eni; int fdiv, fdiv_32, fdiv_64; int ffree; int fadd_i16, fadd_i32; int f...
/content/code_sandbox/src/cpu/x87_timings.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
496
```c /*Most of the vector instructions here are a total guess. Some of the timings are based on path_to_url #include <stdio.h> #include <stdint.h> #include <string.h> #include <wchar.h> #include <86box/86box.h> #include <86box/mem.h> #include "cpu.h" #include <86box/machine.h> #include "x86.h" #include "x86_ops.h" #...
/content/code_sandbox/src/cpu/codegen_timing_k6.c
c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
30,257
```objective-c see COPYING for more details */ static int opESCAPE_d8_a16(uint32_t fetchdat) { return x86_2386_opcodes_d8_a16[(fetchdat >> 3) & 0x1f](fetchdat); } static int opESCAPE_d8_a32(uint32_t fetchdat) { return x86_2386_opcodes_d8_a32[(fetchdat >> 3) & 0x1f](fetchdat); } static int opESCAPE_d9_a16(ui...
/content/code_sandbox/src/cpu/x86_ops_fpu_2386.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
814
```objective-c static int opIMUL_w_iw_a16(uint32_t fetchdat) { int32_t templ; int16_t tempw; int16_t tempw2; fetch_ea_16(fetchdat); if (cpu_mod != 3) SEG_CHECK_READ(cpu_state.ea_seg); tempw = geteaw(); if (cpu_state.abrt) return 1; tempw2 = getword(); if (cpu_state....
/content/code_sandbox/src/cpu/x86_ops_mul.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
2,945
```objective-c /* * 86Box A hypervisor and IBM PC system emulator that specializes in * running old operating systems and software designed for IBM * PC systems and compatibles from 1981 through fairly recent * system designs based on the PCI bus. * * This file is part of th...
/content/code_sandbox/src/cpu/codegen_public.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
385
```c /*Most of the vector instructions here are a total guess. Some of the timings are based on path_to_url #include <stdio.h> #include <stdint.h> #include <string.h> #include <wchar.h> #include <86box/86box.h> #include <86box/mem.h> #include "cpu.h" #include <86box/machine.h> #include "x86.h" #include "x86_ops.h" #...
/content/code_sandbox/src/cpu/codegen_timing_k5.c
c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
30,257
```objective-c static int opMOVZX_w_b_a16(uint32_t fetchdat) { uint8_t temp; fetch_ea_16(fetchdat); if (cpu_mod != 3) SEG_CHECK_READ(cpu_state.ea_seg); temp = geteab(); if (cpu_state.abrt) return 1; cpu_state.regs[cpu_reg].w = (uint16_t) temp; CLOCK_CYCLES(3); PREFETCH_...
/content/code_sandbox/src/cpu/x86_ops_movx.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
2,145
```objective-c static int opPADDB_a16(uint32_t fetchdat) { MMX_REG src; MMX_REG *dst; MMX_ENTER(); fetch_ea_16(fetchdat); dst = MMX_GETREGP(cpu_reg); MMX_GETSRC(); dst->b[0] += src.b[0]; dst->b[1] += src.b[1]; dst->b[2] += src.b[2]; dst->b[3] += src.b[3]; dst->b[4] += sr...
/content/code_sandbox/src/cpu/x86_ops_mmx_arith.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
6,701
```objective-c /* * 86Box A hypervisor and IBM PC system emulator that specializes in * running old operating systems and software designed for IBM * PC systems and compatibles from 1981 through fairly recent * system designs based on the PCI bus. * * This file is part of th...
/content/code_sandbox/src/cpu/x87_ops_loadstore.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
7,191
```objective-c static int opPCMPEQB_a16(uint32_t fetchdat) { MMX_REG src; MMX_REG *dst; MMX_ENTER(); fetch_ea_16(fetchdat); dst = MMX_GETREGP(cpu_reg); MMX_GETSRC(); dst->b[0] = (dst->b[0] == src.b[0]) ? 0xff : 0; dst->b[1] = (dst->b[1] == src.b[1]) ? 0xff : 0; dst->b[2] = (dst-...
/content/code_sandbox/src/cpu/x86_ops_mmx_cmp.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
2,547
```objective-c #define sf_FPU(name, optype, a_size, load_var, rw, use_var, is_nan, cycle_postfix) \ static int sf_FADD##name##_a##a_size(uint32_t fetchdat) \ { ...
/content/code_sandbox/src/cpu/x87_ops_sf_arith.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
8,547
```c /*============================================================================ This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic Package, Release 3e, by John R. Hauser. California. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are...
/content/code_sandbox/src/cpu/softfloat3e/f16_getMant.c
c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
947
```c++ /*============================================================================ This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic Package, Release 3e, by John R. Hauser. California. All rights reserved. Redistribution and use in source and binary forms, with or without modification, ...
/content/code_sandbox/src/cpu/softfloat3e/s_normRoundPackToF128.cc
c++
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
682
```c++ /*============================================================================ This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic Package, Release 3e, by John R. Hauser. University of California. All rights reserved. Redistribution and use in source and binary forms, with or without m...
/content/code_sandbox/src/cpu/softfloat3e/extF80_to_ui32.cc
c++
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
734
```c++ /*============================================================================ This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic Package, Release 3e, by John R. Hauser. California. All rights reserved. Redistribution and use in source and binary forms, with or without modification, a...
/content/code_sandbox/src/cpu/softfloat3e/s_shortShiftRight128.cc
c++
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
418
```c /*============================================================================ This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic Package, Release 3e, by John R. Hauser. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted pr...
/content/code_sandbox/src/cpu/softfloat3e/f32_mulAdd.c
c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
2,249
```c /*============================================================================ This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic Package, Release 3e, by John R. Hauser. California. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are...
/content/code_sandbox/src/cpu/softfloat3e/f32_to_i64_r_minMag.c
c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
780
```c++ /*============================================================================ This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic Package, Release 3e, by John R. Hauser. California. All rights reserved. Redistribution and use in source and binary forms, with or without modification, a...
/content/code_sandbox/src/cpu/softfloat3e/s_propagateNaNExtF80UI.cc
c++
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
1,012
```c++ /*============================================================================ This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic Package, Release 3e, by John R. Hauser. California. All rights reserved. Redistribution and use in source and binary forms, with or without modification, a...
/content/code_sandbox/src/cpu/softfloat3e/extF80_roundToInt.cc
c++
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
1,180
```c++ /*============================================================================ This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic Package, Release 3e, by John R. Hauser. University of California. All rights reserved. Redistribution and use in source and binary forms, with or without m...
/content/code_sandbox/src/cpu/softfloat3e/extF80_rem.cc
c++
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
2,073
```objective-c #ifndef EMU_SF_CONFIG_H #define EMU_SF_CONFIG_H /*your_sha256_hash------------ | The `LIT64' macro takes as its argument a textual integer literal and | if necessary ``marks'' the literal as having a 64-bit integer type. | For example, the GNU C Compiler (`gcc') requires that 64-bit literals be | append...
/content/code_sandbox/src/cpu/softfloat3e/config.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
161
```c /*============================================================================ This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic Package, Release 3e, by John R. Hauser. California. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are...
/content/code_sandbox/src/cpu/softfloat3e/f16_sqrt.c
c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
1,208
```c /*============================================================================ This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic Package, Release 3e, by John R. Hauser. University of California. All rights reserved. Redistribution and use in source and binary forms, with or without mod...
/content/code_sandbox/src/cpu/softfloat3e/f32_to_i32.c
c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
701
```c /*============================================================================ This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic Package, Release 3e, by John R. Hauser. California. All rights reserved. Redistribution and use in source and binary forms, with or without modification, ar...
/content/code_sandbox/src/cpu/softfloat3e/f64_to_ui32_r_minMag.c
c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
703
```c++ /*============================================================================ This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic Package, Release 3e, by John R. Hauser. California. All rights reserved. Redistribution and use in source and binary forms, with or without modification, a...
/content/code_sandbox/src/cpu/softfloat3e/i32_to_extF80.cc
c++
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
529
```c++ /*============================================================================ This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic Package, Release 3e, by John R. Hauser. California. All Rights Reserved. Redistribution and use in source and binary forms, with or without modification, a...
/content/code_sandbox/src/cpu/softfloat3e/ui64_to_extF80.cc
c++
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
459
```c++ /*============================================================================ This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic Package, Release 3e, by John R. Hauser. California. All rights reserved. Redistribution and use in source and binary forms, with or without modification, a...
/content/code_sandbox/src/cpu/softfloat3e/i64_to_extF80.cc
c++
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
523
```c++ /*============================================================================ This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic Package, Release 3e, by John R. Hauser. California. All rights reserved. Redistribution and use in source and binary forms, with or without modification, a...
/content/code_sandbox/src/cpu/softfloat3e/f128_to_i64_r_minMag.cc
c++
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
972
```c /*============================================================================ This C source fragment is part of the SoftFloat IEC/IEEE Floating-point Arithmetic Package, Release 2b. Written by John R. Hauser. This work was made possible in part by the International Computer Science Institute, located at Suite 6...
/content/code_sandbox/src/cpu/softfloat3e/softfloat-specialize.c
c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
1,102
```c /*============================================================================ This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic Package, Release 3e, by John R. Hauser. California. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are...
/content/code_sandbox/src/cpu/softfloat3e/s_shortShiftRightJam64.c
c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
392
```c /*============================================================================ This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic Package, Release 3e, by John R. Hauser. California. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are...
/content/code_sandbox/src/cpu/softfloat3e/s_normRoundPackToF16.c
c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
472
```objective-c /*============================================================================ This source file is an extension to the SoftFloat IEC/IEEE Floating-point Arithmetic Package, Release 2b, written for Bochs (x86 achitecture simulator) floating point emulation. THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. ...
/content/code_sandbox/src/cpu/softfloat3e/fpu_constant.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
804
```c++ /*============================================================================ This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic Package, Release 3e, by John R. Hauser. California. All rights reserved. Redistribution and use in source and binary forms, with or without modification, a...
/content/code_sandbox/src/cpu/softfloat3e/extF80_to_i64_r_minMag.cc
c++
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
811
```c /*============================================================================ This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic Package, Release 3e, by John R. Hauser. California. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are...
/content/code_sandbox/src/cpu/softfloat3e/s_roundPackToF32.c
c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
1,037
```c /*============================================================================ This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic Package, Release 3e, by John R. Hauser. All Rights Reserved. Redistribution and use in source and binary forms, with or without modification, are permitted pr...
/content/code_sandbox/src/cpu/softfloat3e/ui32_to_f32.c
c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
446
```objective-c /*============================================================================ This C header file is part of the SoftFloat IEEE Floating-Point Arithmetic Package, Release 3e, by John R. Hauser. University of California. All rights reserved. Redistribution and use in source and binary forms, with or w...
/content/code_sandbox/src/cpu/softfloat3e/specialize.h
objective-c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
3,216
```c /*============================================================================ This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic Package, Release 3e, by John R. Hauser. California. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are...
/content/code_sandbox/src/cpu/softfloat3e/f64_scalef.c
c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
1,413
```c++ /*============================================================================ This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic Package, Release 3e, by John R. Hauser. California. All Rights Reserved. Redistribution and use in source and binary forms, with or without modification, a...
/content/code_sandbox/src/cpu/softfloat3e/ui32_to_f128.cc
c++
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
473
```c /*============================================================================ This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic Package, Release 3e, by John R. Hauser. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted pr...
/content/code_sandbox/src/cpu/softfloat3e/s_commonNaNToF64UI.c
c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
615
```c /*============================================================================ This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic Package, Release 3e, by John R. Hauser. California. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are...
/content/code_sandbox/src/cpu/softfloat3e/s_shiftRightJam32.c
c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
401
```c /*============================================================================ This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic Package, Release 3e, by John R. Hauser. California. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are...
/content/code_sandbox/src/cpu/softfloat3e/f32_to_ui64_r_minMag.c
c
2016-06-25T22:29:10
2024-08-16T19:09:21
86Box
86Box/86Box
2,616
730