Lines Matching defs:uint16_t
45 static uint16_t fetch_word_imm (struct x86emu *);
49 static uint16_t fetch_data_word (struct x86emu *, uint32_t offset);
50 static uint16_t fetch_word (struct x86emu *, uint32_t segment, uint32_t offset);
55 static void store_data_word (struct x86emu *, uint32_t offset, uint16_t val);
56 static void store_word (struct x86emu *, uint32_t segment, uint32_t offset, uint16_t val);
60 static uint16_t* decode_rl_word_register(struct x86emu *);
63 static uint16_t* decode_rh_word_register(struct x86emu *);
65 static uint16_t* decode_rh_seg_register(struct x86emu *);
69 static uint16_t decode_and_fetch_word(struct x86emu *);
73 static uint16_t decode_and_fetch_word_imm8(struct x86emu *, uint8_t *);
76 static uint16_t decode_and_fetch_word_disp(struct x86emu *, int16_t);
80 static void write_back_word(struct x86emu *, uint16_t);
83 static uint16_t aaa_word (struct x86emu *, uint16_t d);
84 static uint16_t aas_word (struct x86emu *, uint16_t d);
85 static uint16_t aad_word (struct x86emu *, uint16_t d);
86 static uint16_t aam_word (struct x86emu *, uint8_t d);
88 static uint16_t adc_word (struct x86emu *, uint16_t d, uint16_t s);
91 static uint16_t add_word (struct x86emu *, uint16_t d, uint16_t s);
94 static uint16_t and_word (struct x86emu *, uint16_t d, uint16_t s);
97 static uint16_t cmp_word (struct x86emu *, uint16_t d, uint16_t s);
100 static void cmp_word_no_return (struct x86emu *, uint16_t d, uint16_t s);
105 static uint16_t dec_word (struct x86emu *, uint16_t d);
108 static uint16_t inc_word (struct x86emu *, uint16_t d);
111 static uint16_t or_word (struct x86emu *, uint16_t d, uint16_t s);
114 static uint16_t neg_word (struct x86emu *, uint16_t s);
117 static uint16_t rcl_word (struct x86emu *, uint16_t d, uint8_t s);
120 static uint16_t rcr_word (struct x86emu *, uint16_t d, uint8_t s);
123 static uint16_t rol_word (struct x86emu *, uint16_t d, uint8_t s);
126 static uint16_t ror_word (struct x86emu *, uint16_t d, uint8_t s);
129 static uint16_t shl_word (struct x86emu *, uint16_t d, uint8_t s);
132 static uint16_t shr_word (struct x86emu *, uint16_t d, uint8_t s);
135 static uint16_t sar_word (struct x86emu *, uint16_t d, uint8_t s);
137 static uint16_t shld_word (struct x86emu *, uint16_t d, uint16_t fill, uint8_t s);
139 static uint16_t shrd_word (struct x86emu *, uint16_t d, uint16_t fill, uint8_t s);
142 static uint16_t sbb_word (struct x86emu *, uint16_t d, uint16_t s);
145 static uint16_t sub_word (struct x86emu *, uint16_t d, uint16_t s);
148 static void test_word (struct x86emu *, uint16_t d, uint16_t s);
151 static uint16_t xor_word (struct x86emu *, uint16_t d, uint16_t s);
154 static void imul_word (struct x86emu *, uint16_t s);
157 static void mul_word (struct x86emu *, uint16_t s);
160 static void idiv_word (struct x86emu *, uint16_t s);
163 static void div_word (struct x86emu *, uint16_t s);
167 static void push_word (struct x86emu *, uint16_t w);
169 static uint16_t pop_word (struct x86emu *);
182 push_word(emu, (uint16_t) emu->x86.R_FLG);
254 x86emu_exec_call(struct x86emu *emu, uint16_t seg, uint16_t off)
346 static uint16_t
349 uint16_t fetched;
458 static uint16_t
505 static uint16_t
556 store_data_word(struct x86emu *emu, uint32_t offset, uint16_t val)
607 store_word(struct x86emu *emu, uint32_t segment, uint32_t offset, uint16_t val)
688 static uint16_t *
713 static uint16_t *
719 static uint16_t *
786 static uint16_t *
935 uint16_t offset;
992 static uint16_t
1020 uint16_t
1045 static uint16_t
1081 write_back_word(struct x86emu *emu, uint16_t val)
1157 uint16_t (*binop)(struct x86emu *, uint16_t, uint16_t))
1160 uint16_t destval, *destreg, srcval;
1215 uint16_t (*binop16)(struct x86emu *, uint16_t, uint16_t),
1226 void (*binop)(struct x86emu *, uint16_t, uint16_t))
1229 uint16_t destval, srcval;
1263 void (*binop16)(struct x86emu *, uint16_t, uint16_t),
1292 uint16_t (*binop)(struct x86emu *, uint16_t, uint16_t))
1295 uint16_t *destreg, srcval;
1310 uint16_t (*binop16)(struct x86emu *, uint16_t, uint16_t),
1331 uint16_t (*binop16)(struct x86emu *, uint16_t, uint16_t),
1340 uint16_t srcval;
1402 uint16_t *destreg, srcval;
1428 *destreg = (uint16_t) res;
1444 uint16_t target;
1447 target = (uint16_t) (emu->x86.R_IP + (int16_t) offset);
1453 common_load_far_pointer(struct x86emu *emu, uint16_t *seg)
1455 uint16_t *dstreg;
1504 uint16_t srcval, *destreg;
1550 uint16_t srcval;
1584 uint16_t old_sp = emu->x86.R_SP;
1641 uint16_t imm;
1789 uint16_t(* const opc81_word_operation[])
1790 (struct x86emu *, uint16_t d, uint16_t s) =
1841 uint16_t destval, imm;
1903 uint16_t(* const opc83_word_operation[])
1904 (struct x86emu *, uint16_t s, uint16_t d) =
1950 uint16_t destval, imm;
2008 uint16_t *srcreg, destval, tmp;
2074 uint16_t *destreg, srcval;
2124 uint16_t *destreg;
2139 uint16_t *destreg, srcval;
2173 uint16_t *srcreg;
2176 *srcreg = (uint16_t) destoffset;
2187 uint16_t *destreg;
2225 uint16_t destval, *destreg;
2263 emu->x86.R_CX = (uint16_t) tmp;
2283 emu->x86.R_DX = (uint16_t) tmp;
2303 emu->x86.R_BX = (uint16_t) tmp;
2323 emu->x86.R_SP = (uint16_t) tmp;
2343 emu->x86.R_BP = (uint16_t) tmp;
2363 emu->x86.R_SI = (uint16_t) tmp;
2383 emu->x86.R_DI = (uint16_t) tmp;
2438 uint16_t farseg, faroff;
2467 push_word(emu, (uint16_t) flags);
2518 uint16_t offset;
2531 uint16_t offset;
2548 uint16_t offset;
2561 uint16_t offset;
2636 (uint16_t) val);
2729 cmp_word(emu, (uint16_t) val1, (uint16_t) val2);
2751 cmp_word(emu, (uint16_t) val1, (uint16_t) val2);
2768 cmp_word(emu, (uint16_t) val1, (uint16_t) val2);
2994 cmp_word(emu, emu->x86.R_AX, (uint16_t) val);
3013 cmp_word(emu, emu->x86.R_AX, (uint16_t) val);
3027 cmp_word(emu, emu->x86.R_AX, (uint16_t) val);
3173 uint16_t(* const opcD1_word_operation[])
3174 (struct x86emu *, uint16_t s, uint8_t d) =
3223 uint16_t destval;
3239 uint16_t imm;
3300 uint16_t imm, *destreg;
3333 uint16_t local, frame_pointer;
3350 emu->x86.R_SP = (uint16_t) (emu->x86.R_SP - local);
3371 uint16_t imm;
3466 uint16_t destval;
3507 uint16_t destval;
3546 /* fix: add base decoding aad_word(uint16_t val, int base a) */
3561 uint16_t addr;
3563 addr = (uint16_t) (emu->x86.R_BX + (uint8_t) emu->x86.R_AL);
3685 uint16_t target;
3690 target = (uint16_t) (emu->x86.R_IP + offset);
3788 emu->x86.R_IP = (uint16_t) ip;
3798 uint16_t cs, ip;
3813 uint16_t target;
3817 target = (uint16_t) (emu->x86.R_IP + offset);
3994 uint16_t destval, srcval;
4135 uint16_t *destreg;
4136 uint16_t destval;
4174 uint16_t destval, destval2;
5039 emu->x86.R_IP = (uint16_t) target;
5091 uint16_t srcval, *shiftreg, mask;
5142 uint16_t srcval, *dstreg;
5188 uint16_t destval, *shiftreg;
5406 uint16_t *destreg, srcval;
5420 *destreg = (uint16_t) res;
5489 uint16_t *destreg;
5557 uint16_t srcval, mask;
5637 uint16_t *destreg;
5984 static uint16_t
5985 aaa_word(struct x86emu *emu, uint16_t d)
5987 uint16_t res;
5997 res = (uint16_t) (d & 0xFF0F);
6008 static uint16_t
6009 aas_word(struct x86emu *emu, uint16_t d)
6011 uint16_t res;
6021 res = (uint16_t) (d & 0xFF0F);
6032 static uint16_t
6033 aad_word(struct x86emu *emu, uint16_t d)
6035 uint16_t l;
6040 l = (uint16_t) ((lb + 10 * hb) & 0xFF);
6055 static uint16_t
6058 uint16_t h, l;
6060 h = (uint16_t) (d / 10);
6061 l = (uint16_t) (d % 10);
6062 l |= (uint16_t) (h << 8);
6104 static uint16_t
6105 adc_word(struct x86emu *emu, uint16_t d, uint16_t s)
6124 return (uint16_t) res;
6187 static uint16_t
6188 add_word(struct x86emu *emu, uint16_t d, uint16_t s)
6203 return (uint16_t) res;
6260 static uint16_t
6261 and_word(struct x86emu *emu, uint16_t d, uint16_t s)
6263 uint16_t res; /* all operands in native machine order */
6332 static uint16_t
6333 cmp_word(struct x86emu *emu, uint16_t d, uint16_t s)
6352 cmp_word_no_return(struct x86emu *emu, uint16_t d, uint16_t s)
6457 static uint16_t
6458 dec_word(struct x86emu *emu, uint16_t d)
6474 return (uint16_t) res;
6527 static uint16_t
6528 inc_word(struct x86emu *emu, uint16_t d)
6542 return (uint16_t) res;
6590 static uint16_t
6591 or_word(struct x86emu *emu, uint16_t d, uint16_t s)
6593 uint16_t res; /* all operands in native machine order */
6657 static uint16_t
6658 neg_word(struct x86emu *emu, uint16_t s)
6660 uint16_t res;
6661 uint16_t bc;
6664 res = (uint16_t) - s;
6782 static uint16_t
6783 rcl_word(struct x86emu *emu, uint16_t d, uint8_t s)
6800 return (uint16_t) res;
6910 static uint16_t
6911 rcr_word(struct x86emu *emu, uint16_t d, uint8_t s)
6936 return (uint16_t) res;
7024 static uint16_t
7025 rol_word(struct x86emu *emu, uint16_t d, uint8_t s)
7043 return (uint16_t) res;
7120 static uint16_t
7121 ror_word(struct x86emu *emu, uint16_t d, uint8_t s)
7137 return (uint16_t) res;
7213 static uint16_t
7214 shl_word(struct x86emu *emu, uint16_t d, uint8_t s)
7228 res = (uint16_t) d;
7247 return (uint16_t) res;
7330 static uint16_t
7331 shr_word(struct x86emu *emu, uint16_t d, uint8_t s)
7361 return (uint16_t) res;
7446 static uint16_t
7447 sar_word(struct x86emu *emu, uint16_t d, uint8_t s)
7480 return (uint16_t) res;
7528 static uint16_t
7529 shld_word(struct x86emu *emu, uint16_t d, uint16_t fill, uint8_t s)
7559 return (uint16_t) res;
7604 static uint16_t
7605 shrd_word(struct x86emu *emu, uint16_t d, uint16_t fill, uint8_t s)
7635 return (uint16_t) res;
7705 static uint16_t
7706 sbb_word(struct x86emu *emu, uint16_t d, uint16_t s)
7724 return (uint16_t) res;
7780 static uint16_t
7781 sub_word(struct x86emu *emu, uint16_t d, uint16_t s)
7796 return (uint16_t) res;
7846 test_word(struct x86emu *emu, uint16_t d, uint16_t s)
7902 static uint16_t
7903 xor_word(struct x86emu *emu, uint16_t d, uint16_t s)
7905 uint16_t res; /* all operands in native machine order */
7961 imul_word(struct x86emu *emu, uint16_t s)
7965 emu->x86.R_AX = (uint16_t) res;
7966 emu->x86.R_DX = (uint16_t) (res >> 16);
8006 uint16_t res = (uint16_t) (emu->x86.R_AL * s);
8023 mul_word(struct x86emu *emu, uint16_t s)
8027 emu->x86.R_AX = (uint16_t) res;
8028 emu->x86.R_DX = (uint16_t) (res >> 16);
8088 idiv_word(struct x86emu *emu, uint16_t s)
8108 emu->x86.R_AX = (uint16_t) div;
8109 emu->x86.R_DX = (uint16_t) mod;
8171 div_word(struct x86emu *emu, uint16_t s)
8180 div = dvd / (uint16_t) s;
8181 mod = dvd % (uint16_t) s;
8191 emu->x86.R_AX = (uint16_t) div;
8192 emu->x86.R_DX = (uint16_t) mod;
8365 push_word(struct x86emu *emu, uint16_t w)
8390 static uint16_t
8393 uint16_t res;