Changeset 13440
- Timestamp:
- 10/21/08 15:18:34 (3 months ago)
- Files:
-
- trunk/src/recompiler_new/cpu-exec.c (modified) (1 diff)
- trunk/src/recompiler_new/exec.c (modified) (2 diffs)
- trunk/src/recompiler_new/target-i386/exec.h (modified) (2 diffs)
- trunk/src/recompiler_new/target-i386/helper.c (modified) (3 diffs)
- trunk/src/recompiler_new/target-i386/ops_sse.h (modified) (13 diffs)
- trunk/src/recompiler_new/target-i386/translate.c (modified) (61 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/recompiler_new/cpu-exec.c
r13382 r13440 345 345 { 346 346 interrupt_request = env->interrupt_request; 347 #ifndef VBOX 347 348 if (__builtin_expect(interrupt_request, 0)) 349 #else 350 if (RT_UNLIKELY(interrupt_request != 0)) 351 #endif 348 352 { 349 353 /** @todo: reconscille with what QEMU really does */ trunk/src/recompiler_new/exec.c
r13382 r13440 297 297 qemu_host_page_size = TARGET_PAGE_SIZE; 298 298 qemu_host_page_bits = 0; 299 #ifndef VBOX 299 300 while ((1 << qemu_host_page_bits) < qemu_host_page_size) 301 #else 302 while ((1 << qemu_host_page_bits) < (int)qemu_host_page_size) 303 #endif 300 304 qemu_host_page_bits++; 301 305 qemu_host_page_mask = ~(qemu_host_page_size - 1); … … 1333 1337 1334 1338 if (nb_tbs >= code_gen_max_blocks || 1339 #ifndef VBOX 1335 1340 (code_gen_ptr - code_gen_buffer) >= code_gen_buffer_max_size) 1341 #else 1342 (code_gen_ptr - code_gen_buffer) >= (int)code_gen_buffer_max_size) 1343 #endif 1336 1344 return NULL; 1337 1345 tb = &tbs[nb_tbs++]; trunk/src/recompiler_new/target-i386/exec.h
r13382 r13440 236 236 #undef ldexp 237 237 #endif /* !VBOX */ 238 #if !defined(VBOX) || !defined(_MSC_VER) 238 239 #define sin sinl 239 240 #define cos cosl … … 246 247 #define ceil ceill 247 248 #define ldexp ldexpl 249 #endif 248 250 #else 249 251 #define floatx_to_int32 float64_to_int32 trunk/src/recompiler_new/target-i386/helper.c
r13437 r13440 31 31 #include <stdio.h> 32 32 #include <string.h> 33 #ifndef VBOX 33 34 #include <inttypes.h> 34 #ifndef VBOX35 35 #include <signal.h> 36 36 #include <assert.h> … … 147 147 } x86_def_t; 148 148 149 #ifndef VBOX 149 150 #define I486_FEATURES (CPUID_FP87 | CPUID_VME | CPUID_PSE) 150 151 #define PENTIUM_FEATURES (I486_FEATURES | CPUID_DE | CPUID_TSC | \ … … 413 414 (*cpu_fprintf)(f, "x86 %16s\n", x86_defs[i].name); 414 415 } 416 #endif /* !VBOX */ 415 417 416 418 static int cpu_x86_register (CPUX86State *env, const char *cpu_model) trunk/src/recompiler_new/target-i386/ops_sse.h
r13337 r13440 30 30 #if SHIFT == 0 31 31 #define Reg MMXReg 32 #ifndef VBOX 32 33 #define XMM_ONLY(x...) 34 #else 35 #define XMM_ONLY(x) 36 #endif 33 37 #define B(n) MMX_B(n) 34 38 #define W(n) MMX_W(n) … … 38 42 #else 39 43 #define Reg XMMReg 44 #ifndef VBOX 40 45 #define XMM_ONLY(x...) x 46 #else 47 #define XMM_ONLY(x) x 48 #endif 41 49 #define B(n) XMM_B(n) 42 50 #define W(n) XMM_W(n) … … 303 311 304 312 #if SHIFT == 0 313 #ifndef VBOX 305 314 static inline int satub(int x) 315 #else /* VBOX */ 316 DECLINLINE(int) satub(int x) 317 #endif /* VBOX */ 306 318 { 307 319 if (x < 0) … … 313 325 } 314 326 327 #ifndef VBOX 315 328 static inline int satuw(int x) 329 #else /* VBOX */ 330 DECLINLINE(int) satuw(int x) 331 #endif /* VBOX */ 316 332 { 317 333 if (x < 0) … … 323 339 } 324 340 341 #ifndef VBOX 325 342 static inline int satsb(int x) 343 #else /* VBOX */ 344 DECLINLINE(int) satsb(int x) 345 #endif /* VBOX */ 326 346 { 327 347 if (x < -128) … … 333 353 } 334 354 355 #ifndef VBOX 335 356 static inline int satsw(int x) 357 #else /* VBOX */ 358 DECLINLINE(int) satsw(int x) 359 #endif /* VBOX */ 336 360 { 337 361 if (x < -32768) … … 446 470 447 471 #if SHIFT == 0 472 #ifndef VBOX 448 473 static inline int abs1(int a) 474 #else /* VBOX */ 475 DECLINLINE(int) abs1(int a) 476 #endif /* VBOX */ 449 477 { 450 478 if (a < 0) … … 1802 1830 SSE_HELPER_Q(helper_pcmpgtq, FCMPGTQ) 1803 1831 1832 #ifndef VBOX 1804 1833 static inline int pcmp_elen(int reg, uint32_t ctrl) 1834 #else /* VBOX */ 1835 DECLINLINE(int) pcmp_elen(int reg, uint32_t ctrl) 1836 #endif /* VBOX */ 1805 1837 { 1806 1838 int val; … … 1822 1854 } 1823 1855 1856 #ifndef VBOX 1824 1857 static inline int pcmp_ilen(Reg *r, uint8_t ctrl) 1858 #else /* VBOX */ 1859 DECLINLINE(int) pcmp_ilen(Reg *r, uint8_t ctrl) 1860 #endif /* VBOX */ 1825 1861 { 1826 1862 int val = 0; … … 1836 1872 } 1837 1873 1874 #ifndef VBOX 1838 1875 static inline int pcmp_val(Reg *r, uint8_t ctrl, int i) 1876 #else /* VBOX */ 1877 DECLINLINE(int) pcmp_val(Reg *r, uint8_t ctrl, int i) 1878 #endif /* VBOX */ 1839 1879 { 1840 1880 switch ((ctrl >> 0) & 3) { … … 1851 1891 } 1852 1892 1893 #ifndef VBOX 1853 1894 static inline unsigned pcmpxstrx(Reg *d, Reg *s, 1895 #else /* VBOX */ 1896 DECLINLINE(unsigned) pcmpxstrx(Reg *d, Reg *s, 1897 #endif /* VBOX */ 1854 1898 int8_t ctrl, int valids, int validd) 1855 1899 { … … 1918 1962 } 1919 1963 1964 #ifndef VBOX 1920 1965 static inline int rffs1(unsigned int val) 1966 #else /* VBOX */ 1967 DECLINLINE(int) rffs1(unsigned int val) 1968 #endif /* VBOX */ 1921 1969 { 1922 1970 int ret = 1, hi; … … 1931 1979 } 1932 1980 1981 #ifndef VBOX 1933 1982 static inline int ffs1(unsigned int val) 1983 #else /* VBOX */ 1984 DECLINLINE(int) ffs1(unsigned int val) 1985 #endif /* VBOX */ 1934 1986 { 1935 1987 int ret = 1, hi; trunk/src/recompiler_new/target-i386/translate.c
r13357 r13440 31 31 #include <stdio.h> 32 32 #include <string.h> 33 #ifndef VBOX 33 34 #include <inttypes.h> 34 #ifndef VBOX35 35 #include <signal.h> 36 36 #include <assert.h> … … 51 51 #ifdef TARGET_X86_64 52 52 #define X86_64_ONLY(x) x 53 #ifndef VBOX 53 54 #define X86_64_DEF(x...) x 55 #else 56 #define X86_64_DEF(x...) x 57 #endif 54 58 #define CODE64(s) ((s)->code64) 55 59 #define REX_X(s) ((s)->rex_x) … … 61 65 #else 62 66 #define X86_64_ONLY(x) NULL 67 #ifndef VBOX 63 68 #define X86_64_DEF(x...) 69 #else 70 #define X86_64_DEF(x) 71 #endif 64 72 #define CODE64(s) 0 65 73 #define REX_X(s) 0 … … 222 230 }; 223 231 232 #ifndef VBOX 224 233 static inline void gen_op_movl_T0_0(void) 234 #else /* VBOX */ 235 DECLINLINE(void) gen_op_movl_T0_0(void) 236 #endif /* VBOX */ 225 237 { 226 238 tcg_gen_movi_tl(cpu_T[0], 0); 227 239 } 228 240 241 #ifndef VBOX 229 242 static inline void gen_op_movl_T0_im(int32_t val) 243 #else /* VBOX */ 244 DECLINLINE(void) gen_op_movl_T0_im(int32_t val) 245 #endif /* VBOX */ 230 246 { 231 247 tcg_gen_movi_tl(cpu_T[0], val); 232 248 } 233 249 250 #ifndef VBOX 234 251 static inline void gen_op_movl_T0_imu(uint32_t val) 252 #else /* VBOX */ 253 DECLINLINE(void) gen_op_movl_T0_imu(uint32_t val) 254 #endif /* VBOX */ 235 255 { 236 256 tcg_gen_movi_tl(cpu_T[0], val); 237 257 } 238 258 259 #ifndef VBOX 239 260 static inline void gen_op_movl_T1_im(int32_t val) 261 #else /* VBOX */ 262 DECLINLINE(void) gen_op_movl_T1_im(int32_t val) 263 #endif /* VBOX */ 240 264 { 241 265 tcg_gen_movi_tl(cpu_T[1], val); 242 266 } 243 267 268 #ifndef VBOX 244 269 static inline void gen_op_movl_T1_imu(uint32_t val) 270 #else /* VBOX */ 271 DECLINLINE(void) gen_op_movl_T1_imu(uint32_t val) 272 #endif /* VBOX */ 245 273 { 246 274 tcg_gen_movi_tl(cpu_T[1], val); 247 275 } 248 276 277 #ifndef VBOX 249 278 static inline void gen_op_movl_A0_im(uint32_t val) 279 #else /* VBOX */ 280 DECLINLINE(void) gen_op_movl_A0_im(uint32_t val) 281 #endif /* VBOX */ 250 282 { 251 283 tcg_gen_movi_tl(cpu_A0, val); … … 253 285 254 286 #ifdef TARGET_X86_64 287 #ifndef VBOX 255 288 static inline void gen_op_movq_A0_im(int64_t val) 289 #else /* VBOX */ 290 DECLINLINE(void) gen_op_movq_A0_im(int64_t val) 291 #endif /* VBOX */ 256 292 { 257 293 tcg_gen_movi_tl(cpu_A0, val); … … 259 295 #endif 260 296 297 #ifndef VBOX 261 298 static inline void gen_movtl_T0_im(target_ulong val) 299 #else /* VBOX */ 300 DECLINLINE(void) gen_movtl_T0_im(target_ulong val) 301 #endif /* VBOX */ 262 302 { 263 303 tcg_gen_movi_tl(cpu_T[0], val); 264 304 } 265 305 306 #ifndef VBOX 266 307 static inline void gen_movtl_T1_im(target_ulong val) 308 #else /* VBOX */ 309 DECLINLINE(void) gen_movtl_T1_im(target_ulong val) 310 #endif /* VBOX */ 267 311 { 268 312 tcg_gen_movi_tl(cpu_T[1], val); 269 313 } 270 314 315 #ifndef VBOX 271 316 static inline void gen_op_andl_T0_ffff(void) 317 #else /* VBOX */ 318 DECLINLINE(void) gen_op_andl_T0_ffff(void) 319 #endif /* VBOX */ 272 320 { 273 321 tcg_gen_andi_tl(cpu_T[0], cpu_T[0], 0xffff); 274 322 } 275 323 324 #ifndef VBOX 276 325 static inline void gen_op_andl_T0_im(uint32_t val) 326 #else /* VBOX */ 327 DECLINLINE(void) gen_op_andl_T0_im(uint32_t val) 328 #endif /* VBOX */ 277 329 { 278 330 tcg_gen_andi_tl(cpu_T[0], cpu_T[0], val); 279 331 } 280 332 333 #ifndef VBOX 281 334 static inline void gen_op_movl_T0_T1(void) 335 #else /* VBOX */ 336 DECLINLINE(void) gen_op_movl_T0_T1(void) 337 #endif /* VBOX */ 282 338 { 283 339 tcg_gen_mov_tl(cpu_T[0], cpu_T[1]); 284 340 } 285 341 342 #ifndef VBOX 286 343 static inline void gen_op_andl_A0_ffff(void) 344 #else /* VBOX */ 345 DECLINLINE(void) gen_op_andl_A0_ffff(void) 346 #endif /* VBOX */ 287 347 { 288 348 tcg_gen_andi_tl(cpu_A0, cpu_A0, 0xffff); … … 313 373 #endif 314 374 375 #ifndef VBOX 315 376 static inline void gen_op_mov_reg_v(int ot, int reg, TCGv t0) 377 #else /* VBOX */ 378 DECLINLINE(void) gen_op_mov_reg_v(int ot, int reg, TCGv t0) 379 #endif /* VBOX */ 316 380 { 317 381 switch(ot) { … … 346 410 } 347 411 412 #ifndef VBOX 348 413 static inline void gen_op_mov_reg_T0(int ot, int reg) 414 #else /* VBOX */ 415 DECLINLINE(void) gen_op_mov_reg_T0(int ot, int reg) 416 #endif /* VBOX */ 349 417 { 350 418 gen_op_mov_reg_v(ot, reg, cpu_T[0]); 351 419 } 352 420 421 #ifndef VBOX 353 422 static inline void gen_op_mov_reg_T1(int ot, int reg) 423 #else /* VBOX */ 424 DECLINLINE(void) gen_op_mov_reg_T1(int ot, int reg) 425 #endif /* VBOX */ 354 426 { 355 427 gen_op_mov_reg_v(ot, reg, cpu_T[1]); 356 428 } 357 429 430 #ifndef VBOX 358 431 static inline void gen_op_mov_reg_A0(int size, int reg) 432 #else /* VBOX */ 433 DECLINLINE(void) gen_op_mov_reg_A0(int size, int reg) 434 #endif /* VBOX */ 359 435 { 360 436 switch(size) { … … 382 458 } 383 459 460 #ifndef VBOX 384 461 static inline void gen_op_mov_v_reg(int ot, TCGv t0, int reg) 462 #else /* VBOX */ 463 DECLINLINE(void) gen_op_mov_v_reg(int ot, TCGv t0, int reg) 464 #endif /* VBOX */ 385 465 { 386 466 switch(ot) { … … 399 479 } 400 480 481 #ifndef VBOX 401 482 static inline void gen_op_mov_TN_reg(int ot, int t_index, int reg) 483 #else /* VBOX */ 484 DECLINLINE(void) gen_op_mov_TN_reg(int ot, int t_index, int reg) 485 #endif /* VBOX */ 402 486 { 403 487 gen_op_mov_v_reg(ot, cpu_T[t_index], reg); 404 488 } 405 489 490 #ifndef VBOX 406 491 static inline void gen_op_movl_A0_reg(int reg) 492 #else /* VBOX */ 493 DECLINLINE(void) gen_op_movl_A0_reg(int reg) 494 #endif /* VBOX */ 407 495 { 408 496 tcg_gen_ld32u_tl(cpu_A0, cpu_env, offsetof(CPUState, regs[reg]) + REG_L_OFFSET); 409 497 } 410 498 499 #ifndef VBOX 411 500 static inline void gen_op_addl_A0_im(int32_t val) 501 #else /* VBOX */ 502 DECLINLINE(void) gen_op_addl_A0_im(int32_t val) 503 #endif /* VBOX */ 412 504 { 413 505 tcg_gen_addi_tl(cpu_A0, cpu_A0, val); … … 418 510 419 511 #ifdef TARGET_X86_64 512 #ifndef VBOX 420 513 static inline void gen_op_addq_A0_im(int64_t val) 514 #else /* VBOX */ 515 DECLINLINE(void) gen_op_addq_A0_im(int64_t val) 516 #endif /* VBOX */ 421 517 { 422 518 tcg_gen_addi_tl(cpu_A0, cpu_A0, val); … … 434 530 } 435 531 532 #ifndef VBOX 436 533 static inline void gen_op_addl_T0_T1(void) 534 #else /* VBOX */ 535 DECLINLINE(void) gen_op_addl_T0_T1(void) 536 #endif /* VBOX */ 437 537 { 438 538 tcg_gen_add_tl(cpu_T[0], cpu_T[0], cpu_T[1]); 439 539 } 440 540 541 #ifndef VBOX 441 542 static inline void gen_op_jmp_T0(void) 543 #else /* VBOX */ 544 DECLINLINE(void) gen_op_jmp_T0(void) 545 #endif /* VBOX */ 442 546 { 443 547 tcg_gen_st_tl(cpu_T[0], cpu_env, offsetof(CPUState, eip)); 444 548 } 445 549 550 #ifndef VBOX 446 551 static inline void gen_op_add_reg_im(int size, int reg, int32_t val) 552 #else /* VBOX */ 553 DECLINLINE(void) gen_op_add_reg_im(int size, int reg, int32_t val) 554 #endif /* VBOX */ 447 555 { 448 556 switch(size) { … … 470 578 } 471 579 580 #ifndef VBOX 472 581 static inline void gen_op_add_reg_T0(int size, int reg) 582 #else /* VBOX */ 583 DECLINLINE(void) gen_op_add_reg_T0(int size, int reg) 584 #endif /* VBOX */ 473 585 { 474 586 switch(size) { … … 496 608 } 497 609 610 #ifndef VBOX 498 611 static inline void gen_op_set_cc_op(int32_t val) 612 #else /* VBOX */ 613 DECLINLINE(void) gen_op_set_cc_op(int32_t val) 614 #endif /* VBOX */ 499 615 { 500 616 tcg_gen_movi_i32(cpu_cc_op, val); 501 617 } 502 618 619 #ifndef VBOX 503 620 static inline void gen_op_addl_A0_reg_sN(int shift, int reg) 621 #else /* VBOX */ 622 DECLINLINE(void) gen_op_addl_A0_reg_sN(int shift, int reg) 623 #endif /* VBOX */ 504 624 { 505 625 tcg_gen_ld_tl(cpu_tmp0, cpu_env, offsetof(CPUState, regs[reg])); … … 512 632 } 513 633 634 #ifndef VBOX 514 635 static inline void gen_op_movl_A0_seg(int reg) 636 #else /* VBOX */ 637 DECLINLINE(void) gen_op_movl_A0_seg(int reg) 638 #endif /* VBOX */ 515 639 { 516 640 tcg_gen_ld32u_tl(cpu_A0, cpu_env, offsetof(CPUState, segs[reg].base) + REG_L_OFFSET); 517 641 } 518 642 643 #ifndef VBOX 519 644 static inline void gen_op_addl_A0_seg(int reg) 645 #else /* VBOX */ 646 DECLINLINE(void) gen_op_addl_A0_seg(int reg) 647 #endif /* VBOX */ 520 648 { 521 649 tcg_gen_ld_tl(cpu_tmp0, cpu_env, offsetof(CPUState, segs[reg].base)); … … 527 655 528 656 #ifdef TARGET_X86_64 657 #ifndef VBOX 529 658 static inline void gen_op_movq_A0_seg(int reg) 659 #else /* VBOX */ 660 DECLINLINE(void) gen_op_movq_A0_seg(int reg) 661 #endif /* VBOX */ 530 662 { 531 663 tcg_gen_ld_tl(cpu_A0, cpu_env, offsetof(CPUState, segs[reg].base)); 532 664 } 533 665 666 #ifndef VBOX 534 667 static inline void gen_op_addq_A0_seg(int reg) 668 #else /* VBOX */ 669 DECLINLINE(void) gen_op_addq_A0_seg(int reg) 670 #endif /* VBOX */ 535 671 { 536 672 tcg_gen_ld_tl(cpu_tmp0, cpu_env, offsetof(CPUState, segs[reg].base)); … … 538 674 } 539 675 676 #ifndef VBOX 540 677 static inline void gen_op_movq_A0_reg(int reg) 678 #else /* VBOX */ 679 DECLINLINE(void) gen_op_movq_A0_reg(int reg) 680 #endif /* VBOX */ 541 681 { 542 682 tcg_gen_ld_tl(cpu_A0, cpu_env, offsetof(CPUState, regs[reg])); 543 683 } 544 684 685 #ifndef VBOX 545 686 static inline void gen_op_addq_A0_reg_sN(int shift, int reg) 687 #else /* VBOX */ 688 DECLINLINE(void) gen_op_addq_A0_reg_sN(int shift, int reg) 689 #endif /* VBOX */ 546 690 { 547 691 tcg_gen_ld_tl(cpu_tmp0, cpu_env, offsetof(CPUState, regs[reg])); … … 552 696 #endif 553 697 698 #ifndef VBOX 554 699 static inline void gen_op_lds_T0_A0(int idx) 700 #else /* VBOX */ 701 DECLINLINE(void) gen_op_lds_T0_A0(int idx) 702 #endif /* VBOX */ 555 703 { 556 704 int mem_index = (idx >> 2) - 1; … … 569 717 } 570 718 719 #ifndef VBOX 571 720 static inline void gen_op_ld_v(int idx, TCGv t0, TCGv a0) 721 #else /* VBOX */ 722 DECLINLINE(void) gen_op_ld_v(int idx, TCGv t0, TCGv a0) 723 #endif /* VBOX */ 572 724 { 573 725 int mem_index = (idx >> 2) - 1; … … 590 742 591 743 /* XXX: always use ldu or lds */ 744 #ifndef VBOX 592 745 static inline void gen_op_ld_T0_A0(int idx) 746 #else /* VBOX */ 747 DECLINLINE(void) gen_op_ld_T0_A0(int idx) 748 #endif /* VBOX */ 593 749 { 594 750 gen_op_ld_v(idx, cpu_T[0], cpu_A0); 595 751 } 596 752 753 #ifndef VBOX 597 754 static inline void gen_op_ldu_T0_A0(int idx) 755 #else /* VBOX */ 756 DECLINLINE(void) gen_op_ldu_T0_A0(int idx) 757 #endif /* VBOX */ 598 758 { 599 759 gen_op_ld_v(idx, cpu_T[0], cpu_A0); 600 760 } 601 761 762 #ifndef VBOX 602 763 static inline void gen_op_ld_T1_A0(int idx) 764 #else /* VBOX */ 765 DECLINLINE(void) gen_op_ld_T1_A0(int idx) 766 #endif /* VBOX */ 603 767 { 604 768 gen_op_ld_v(idx, cpu_T[1], cpu_A0); 605 769 } 606 770 771 #ifndef VBOX 607 772 static inline void gen_op_st_v(int idx, TCGv t0, TCGv a0) 773 #else /* VBOX */ 774 DECLINLINE(void) gen_op_st_v(int idx, TCGv t0, TCGv a0) 775 #endif /* VBOX */ 608 776 { 609 777 int mem_index = (idx >> 2) - 1; … … 625 793 } 626 794 795 #ifndef VBOX 627 796 static inline void gen_op_st_T0_A0(int idx) 797 #else /* VBOX */ 798 DECLINLINE(void) gen_op_st_T0_A0(int idx) 799 #endif /* VBOX */ 628 800 { 629 801 gen_op_st_v(idx, cpu_T[0], cpu_A0); 630 802 } 631 803 804 #ifndef VBOX 632 805 static inline void gen_op_st_T1_A0(int idx) 806 #else /* VBOX */ 807 DECLINLINE(void) gen_op_st_T1_A0(int idx) 808 #endif /* VBOX */ 633 809 { 634 810 gen_op_st_v(idx, cpu_T[1], cpu_A0); 635 811 } 636 812 813 #ifndef VBOX 637 814 static inline void gen_jmp_im(target_ulong pc) 815 #else /* VBOX */ 816 DECLINLINE(void) gen_jmp_im(target_ulong pc) 817 #endif /* VBOX */ 638 818 { 639 819 #ifdef VBOX … … 652 832 } 653 833 834 #ifndef VBOX 654 835 static inline void gen_update_eip(target_ulong pc) 836 #else /* VBOX */ 837 DECLINLINE(void) gen_update_eip(target_ulong pc) 838 #endif /* VBOX */ 655 839 { 656 840 gen_jmp_im(pc); … … 659 843 #endif 660 844 845 #ifndef VBOX 661 846 static inline void gen_string_movl_A0_ESI(DisasContext *s) 847 #else /* VBOX */ 848 DECLINLINE(void) gen_string_movl_A0_ESI(DisasContext *s) 849 #endif /* VBOX */ 662 850 { 663 851 int override; … … 694 882 } 695 883 884 #ifndef VBOX 696 885 static inline void gen_string_movl_A0_EDI(DisasContext *s) 886 #else /* VBOX */ 887 DECLINLINE(void) gen_string_movl_A0_EDI(DisasContext *s) 888 #endif /* VBOX */ 697 889 { 698 890 #ifdef TARGET_X86_64 … … 715 907 } 716 908 909 #ifndef VBOX 717 910 static inline void gen_op_movl_T0_Dshift(int ot) 911 #else /* VBOX */ 912 DECLINLINE(void) gen_op_movl_T0_Dshift(int ot) 913 #endif /* VBOX */ 718 914 { 719 915 tcg_gen_ld32s_tl(cpu_T[0], cpu_env, offsetof(CPUState, df)); … … 755 951 } 756 952 953 #ifndef VBOX 757 954 static inline void gen_op_jnz_ecx(int size, int label1) 955 #else /* VBOX */ 956 DECLINLINE(void) gen_op_jnz_ecx(int size, int label1) 957 #endif /* VBOX */ 758 958 { 759 959 tcg_gen_ld_tl(cpu_tmp0, cpu_env, offsetof(CPUState, regs[R_ECX])); … … 762 962 } 763 963 964 #ifndef VBOX 764 965 static inline void gen_op_jz_ecx(int size, int label1) 966 #else /* VBOX */ 967 DECLINLINE(void) gen_op_jz_ecx(int size, int label1) 968 #endif /* VBOX */ 765 969 { 766 970 tcg_gen_ld_tl(cpu_tmp0, cpu_env, offsetof(CPUState, regs[R_ECX])); … … 820 1024 } 821 1025 1026 #ifndef VBOX 822 1027 static inline void gen_movs(DisasContext *s, int ot) 1028 #else /* VBOX */ 1029 DECLINLINE(void) gen_movs(DisasContext *s, int ot) 1030 #endif /* VBOX */ 823 1031 { 824 1032 gen_string_movl_A0_ESI(s); … … 831 1039 } 832 1040 1041 #ifndef VBOX 833 1042 static inline void gen_update_cc_op(DisasContext *s) 1043 #else /* VBOX */ 1044 DECLINLINE(void) gen_update_cc_op(DisasContext *s) 1045 #endif /* VBOX */ 834 1046 { 835 1047 if (s->cc_op != CC_OP_DYNAMIC) { … … 851 1063 } 852 1064 1065 #ifndef VBOX 853 1066 static inline void gen_op_cmpl_T0_T1_cc(void) 1067 #else /* VBOX */ 1068 DECLINLINE(void) gen_op_cmpl_T0_T1_cc(void) 1069 #endif /* VBOX */ 854 1070 { 855 1071 tcg_gen_mov_tl(cpu_cc_src, cpu_T[1]); … … 857 1073 } 858 1074 1075 #ifndef VBOX 859 1076 static inline void gen_op_testl_T0_T1_cc(void) 1077 #else /* VBOX */ 1078 DECLINLINE(void) gen_op_testl_T0_T1_cc(void) 1079 #endif /* VBOX */ 860 1080 { 861 1081 tcg_gen_discard_tl(cpu_cc_src); … … 913 1133 } 914 1134 1135 #ifndef VBOX 915 1136 static inline void gen_setcc_slow_T0(DisasContext *s, int jcc_op) 1137 #else /* VBOX */ 1138 DECLINLINE(void) gen_setcc_slow_T0(DisasContext *s, int jcc_op) 1139 #endif /* VBOX */ 916 1140 { 917 1141 if (s->cc_op != CC_OP_DYNAMIC) … … 1020 1244 /* generate a conditional jump to label 'l1' according to jump opcode 1021 1245 value 'b'. In the fast case, T0 is guaranted not to be used. */ 1246 #ifndef VBOX 1022 1247 static inline void gen_jcc1(DisasContext *s, int cc_op, int b, int l1) 1248 #else /* VBOX */ 1249 DECLINLINE(void) gen_jcc1(DisasContext *s, int cc_op, int b, int l1) 1250 #endif /* VBOX */ 1023 1251 { 1024 1252 int inv, jcc_op, size, cond; … … 1231 1459 } 1232 1460 1461 #ifndef VBOX 1233 1462 static inline void gen_stos(DisasContext *s, int ot) 1463 #else /* VBOX */ 1464 DECLINLINE(void) gen_stos(DisasContext *s, int ot) 1465 #endif /* VBOX */ 1234 1466 { 1235 1467 gen_op_mov_TN_reg(OT_LONG, 0, R_EAX); … … 1240 1472 } 1241 1473 1474 #ifndef VBOX 1242 1475 static inline void gen_lods(DisasContext *s, int ot) 1476 #else /* VBOX */ 1477 DECLINLINE(void) gen_lods(DisasContext *s, int ot) 1478 #endif /* VBOX */ 1243 1479 { 1244 1480 gen_string_movl_A0_ESI(s); … … 1249 1485 } 1250 1486 1487 #ifndef VBOX 1251 1488 static inline void gen_scas(DisasContext *s, int ot) 1489 #else /* VBOX */ 1490 DECLINLINE(void) gen_scas(DisasContext *s, int ot) 1491 #endif /* VBOX */ 1252 1492 { 1253 1493 gen_op_mov_TN_reg(OT_LONG, 0, R_EAX); … … 1259 1499 } 1260 1500 1501 #ifndef VBOX 1261 1502 static inline void gen_cmps(DisasContext *s, int ot) 1503 #else /* VBOX */ 1504 DECLINLINE(void) gen_cmps(DisasContext *s, int ot) 1505 #endif /* VBOX */ 1262 1506 { 1263 1507 gen_string_movl_A0_ESI(s); … … 1271 1515 } 1272 1516 1517 #ifndef VBOX 1273 1518 static inline void gen_ins(DisasContext *s, int ot) 1519 #else /* VBOX */ 1520 DECLINLINE(void) gen_ins(DisasContext *s, int ot) 1521 #endif /* VBOX */ 1274 1522 { 1275 1523 if (use_icount) … … 1291 1539 } 1292 1540 1541 #ifndef VBOX 1293 1542 static inline void gen_outs(DisasContext *s, int ot) 1543 #else /* VBOX */ 1544 DECLINLINE(void) gen_outs(DisasContext *s, int ot) 1545 #endif /* VBOX */ 1294 1546 { 1295 1547 if (use_icount) … … 1312 1564 /* same method as Valgrind : we generate jumps to current or next 1313 1565 instruction */ 1566 #ifndef VBOX 1314 1567 #define GEN_REPZ(op) \ 1315 1568 static inline void gen_repz_ ## op(DisasContext *s, int ot, \ 1316 1569 target_ulong cur_eip, target_ulong next_eip) \ 1317 1570 { \ 1318 int l2; \1571 int l2; \ 1319 1572 gen_update_cc_op(s); \ 1320 1573 l2 = gen_jz_ecx_string(s, next_eip); \ … … 1327 1580 gen_jmp(s, cur_eip); \ 1328 1581 } 1329 1582 #else /* VBOX */ 1583 #define GEN_REPZ(op) \ 1584 DECLINLINE(void) gen_repz_ ## op(DisasContext *s, int ot, \ 1585 target_ulong cur_eip, target_ulong next_eip) \ 1586 { \ 1587 int l2; \ 1588 gen_update_cc_op(s); \ 1589 l2 = gen_jz_ecx_string(s, next_eip); \ 1590 gen_ ## op(s, ot); \ 1591 gen_op_add_reg_im(s->aflag, R_ECX, -1); \ 1592 /* a loop would cause two single step exceptions if ECX = 1 \ 1593 before rep string_insn */ \ 1594 if (!s->jmp_opt) \ 1595 gen_op_jz_ecx(s->aflag, l2); \ 1596 gen_jmp(s, cur_eip); \ 1597 } 1598 #endif /* VBOX */ 1599 1600 #ifndef VBOX 1330 1601 #define GEN_REPZ2(op) \ 1331 1602 static inline void gen_repz_ ## op(DisasContext *s, int ot, \ 1603 target_ulong cur_eip, \ 1604 target_ulong next_eip, \ 1605 int nz) \ 1606 { \ 1607 int l2; \ 1608 gen_update_cc_op(s); \ 1609 l2 = gen_jz_ecx_string(s, next_eip); \ 1610 gen_ ## op(s, ot); \ 1611 gen_op_add_reg_im(s->aflag, R_ECX, -1); \ 1612 gen_op_set_cc_op(CC_OP_SUBB + ot); \ 1613 gen_jcc1(s, CC_OP_SUBB + ot, (JCC_Z << 1) | (nz ^ 1), l2); \ 1614 if (!s->jmp_opt) \ 1615 gen_op_jz_ecx(s->aflag, l2); \ 1616 gen_jmp(s, cur_eip); \ 1617 } 1618 #else /* VBOX */ 1619 #define GEN_REPZ2(op) \ 1620 DECLINLINE(void) gen_repz_ ## op(DisasContext *s, int ot, \ 1332 1621 target_ulong cur_eip, \ 1333 1622 target_ulong next_eip, \ … … 1345 1634 gen_jmp(s, cur_eip); \ 1346 1635 } 1636 #endif /* VBOX */ 1347 1637 1348 1638 GEN_REPZ(movs) … … 1619 1909 } 1620 1910 1911 #ifndef VBOX 1621 1912 static inline void tcg_gen_lshift(TCGv ret, TCGv arg1, target_long arg2) 1913 #else /* VBOX */ 1914 DECLINLINE(void) tcg_gen_lshift(TCGv ret, TCGv arg1, target_long arg2) 1915 #endif /* VBOX */ 1622 1916 { 1623 1917 if (arg2 >= 0) … … 2240 2534 } 2241 2535 2536 #ifndef VBOX 2242 2537 static inline uint32_t insn_get(DisasContext *s, int ot) 2538 #else /* VBOX */ 2539 DECLINLINE(uint32_t) insn_get(DisasContext *s, int ot) 2540 #endif /* VBOX */ 2243 2541 { 2244 2542 uint32_t ret; … … 2262 2560 } 2263 2561 2562 #ifndef VBOX 2264 2563 static inline int insn_const_size(unsigned int ot) 2564 #else /* VBOX */ 2565 DECLINLINE(int) insn_const_size(unsigned int ot) 2566 #endif /* VBOX */ 2265 2567 { 2266 2568 if (ot <= OT_LONG) … … 2270 2572 } 2271 2573 2574 #ifndef VBOX 2272 2575 static inline void gen_goto_tb(DisasContext *s, int tb_num, target_ulong eip) 2576 #else /* VBOX */ 2577 DECLINLINE(void) gen_goto_tb(DisasContext *s, int tb_num, target_ulong eip) 2578 #endif /* VBOX */ 2273 2579 { 2274 2580 TranslationBlock *tb; … … 2291 2597 } 2292 2598 2599 #ifndef VBOX 2293 2600 static inline void gen_jcc(DisasContext *s, int b, 2601 #else /* VBOX */ 2602 DECLINLINE(void) gen_jcc(DisasContext *s, int b, 2603 #endif /* VBOX */ 2294 2604 target_ulong val, target_ulong next_eip) 2295 2605 { … … 2358 2668 } 2359 2669 2670 #ifndef VBOX 2360 2671 static inline void gen_op_movl_T0_seg(int seg_reg) 2672 #else /* VBOX */ 2673 DECLINLINE(void) gen_op_movl_T0_seg(int seg_reg) 2674 #endif /* VBOX */ 2361 2675 { 2362 2676 tcg_gen_ld32u_tl(cpu_T[0], cpu_env, … … 2364 2678 } 2365 2679 2680 #ifndef VBOX 2366 2681 static inline void gen_op_movl_seg_T0_vm(int seg_reg) 2682 #else /* VBOX */ 2683 DECLINLINE(void) gen_op_movl_seg_T0_vm(int seg_reg) 2684 #endif /* VBOX */ 2367 2685 { 2368 2686 tcg_gen_andi_tl(cpu_T[0], cpu_T[0], 0xffff); … … 2398 2716 } 2399 2717 2718 #ifndef VBOX 2400 2719 static inline int svm_is_rep(int prefixes) 2720 #else /* VBOX */ 2721 DECLINLINE(int) svm_is_rep(int prefixes) 2722 #endif /* VBOX */ 2401 2723 { 2402 2724 return ((prefixes & (PREFIX_REPZ | PREFIX_REPNZ)) ? 8 : 0); 2403 2725 } 2404 2726 2727 #ifndef VBOX 2405 2728 static inline void 2729 #else /* VBOX */ 2730 DECLINLINE(void) 2731 #endif /* VBOX */ 2406 2732 gen_svm_check_intercept_param(DisasContext *s, target_ulong pc_start, 2407 2733 uint32_t type, uint64_t param) … … 2417 2743 } 2418 2744 2745 #ifndef VBOX 2419 2746 static inline void 2747 #else /* VBOX */ 2748 DECLINLINE(void) 2749 #endif 2420 2750 gen_svm_check_intercept(DisasContext *s, target_ulong pc_start, uint64_t type) 2421 2751 { … … 2423 2753 } 2424 2754 2755 #ifndef VBOX 2425 2756 static inline void gen_stack_update(DisasContext *s, int addend) 2757 #else /* VBOX */ 2758 DECLINLINE(void) gen_stack_update(DisasContext *s, int addend) 2759 #endif /* VBOX */ 2426 2760 { 2427 2761 #ifdef TARGET_X86_64 … … 2734 3068 } 2735 3069 3070 #ifndef VBOX 2736 3071 static inline void gen_ldq_env_A0(int idx, int offset) 3072 #else /* VBOX */ 3073 DECLINLINE(void) gen_ldq_env_A0(int idx, int offset) 3074 #endif /* VBOX */ 2737 3075 { 2738 3076 int mem_index = (idx >> 2) - 1; … … 2741 3079 } 2742 3080 3081 #ifndef VBOX 2743 3082 static inline void gen_stq_env_A0(int idx, int offset) 3083 #else /* VBOX */ 3084 DECLINLINE(void) gen_stq_env_A0(int idx, int offset) 3085 #endif /* VBOX */ 2744 3086 { 2745 3087 int mem_index = (idx >> 2) - 1; … … 2748 3090 } 2749 3091 3092 #ifndef VBOX 2750 3093 static inline void gen_ldo_env_A0(int idx, int offset) 3094 #else /* VBOX */ 3095 DECLINLINE(void) gen_ldo_env_A0(int idx, int offset) 3096 #endif /* VBOX */ 2751 3097 { 2752 3098 int mem_index = (idx >> 2) - 1; … … 2758 3104 } 2759 3105 3106 #ifndef VBOX 2760

