Changeset 59310 in vbox
- Timestamp:
- Jan 12, 2016 12:55:58 AM (9 years ago)
- Location:
- trunk/include/iprt
- Files:
-
- 4 edited
-
asm-amd64-x86-watcom-16.h (modified) (39 diffs)
-
asm-amd64-x86.h (modified) (3 diffs)
-
cdefs.h (modified) (1 diff)
-
types.h (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/asm-amd64-x86-watcom-16.h
r58749 r59310 48 48 #undef ASMGetIDTR 49 49 #pragma aux ASMGetIDTR = \ 50 ".286p" \ 50 51 "sidt fword ptr es:[bx]" \ 51 52 parm [es bx] \ … … 54 55 #undef ASMGetIdtrLimit 55 56 #pragma aux ASMGetIdtrLimit = \ 57 ".286p" \ 56 58 "sub sp, 8" \ 57 59 "mov bx, sp" \ … … 65 67 #undef ASMSetIDTR 66 68 #pragma aux ASMSetIDTR = \ 69 ".286p" \ 67 70 "lidt fword ptr es:[bx]" \ 68 71 parm [es bx] nomemory \ … … 71 74 #undef ASMGetGDTR 72 75 #pragma aux ASMGetGDTR = \ 76 ".286p" \ 73 77 "sgdt fword ptr es:[bx]" \ 74 78 parm [es bx] \ … … 77 81 #undef ASMSetGDTR 78 82 #pragma aux ASMSetGDTR = \ 83 ".286p" \ 79 84 "lgdt fword ptr es:[bx]" \ 80 85 parm [es bx] nomemory \ … … 104 109 #undef ASMGetFS 105 110 #pragma aux ASMGetFS = \ 111 ".386" \ 106 112 "mov ax, fs" \ 107 113 parm [] nomemory \ … … 111 117 #undef ASMGetGS 112 118 #pragma aux ASMGetGS = \ 119 ".386" \ 113 120 "mov ax, gs" \ 114 121 parm [] nomemory \ … … 125 132 #undef ASMGetTR 126 133 #pragma aux ASMGetTR = \ 134 ".286" \ 127 135 "str ax" \ 128 136 parm [] nomemory \ … … 132 140 #undef ASMGetLDTR 133 141 #pragma aux ASMGetLDTR = \ 142 ".286" \ 134 143 "sldt ax" \ 135 144 parm [] nomemory \ … … 226 235 #undef ASMGetCR0 227 236 #pragma aux ASMGetCR0 = \ 237 ".386" \ 228 238 "mov eax, cr0" \ 229 239 "mov edx, eax" \ … … 235 245 #undef ASMSetCR0 236 246 #pragma aux ASMSetCR0 = \ 247 ".386" \ 237 248 "shl edx, 16" \ 238 249 "mov dx, ax" \ … … 243 254 #undef ASMGetCR2 244 255 #pragma aux ASMGetCR2 = \ 256 ".386" \ 245 257 "mov eax, cr2" \ 246 258 "mov edx, eax" \ … … 252 264 #undef ASMSetCR2 253 265 #pragma aux ASMSetCR2 = \ 266 ".386" \ 254 267 "shl edx, 16" \ 255 268 "mov dx, ax" \ … … 260 273 #undef ASMGetCR3 261 274 #pragma aux ASMGetCR3 = \ 275 ".386" \ 262 276 "mov eax, cr3" \ 263 277 "mov edx, eax" \ … … 269 283 #undef ASMSetCR3 270 284 #pragma aux ASMSetCR3 = \ 285 ".386" \ 271 286 "shl edx, 16" \ 272 287 "mov dx, ax" \ … … 277 292 #undef ASMReloadCR3 278 293 #pragma aux ASMReloadCR3 = \ 294 ".386" \ 279 295 "mov eax, cr3" \ 280 296 "mov cr3, eax" \ … … 284 300 #undef ASMGetCR4 285 301 #pragma aux ASMGetCR4 = \ 302 ".386" \ 286 303 "mov eax, cr4" \ 287 304 "mov edx, eax" \ … … 293 310 #undef ASMSetCR4 294 311 #pragma aux ASMSetCR4 = \ 312 ".386" \ 295 313 "shl edx, 16" \ 296 314 "mov dx, ax" \ … … 375 393 #undef ASMGetDR0 376 394 #pragma aux ASMGetDR0 = \ 395 ".386" \ 377 396 "mov eax, dr0" \ 378 397 "mov edx, eax" \ … … 384 403 #undef ASMGetDR1 385 404 #pragma aux ASMGetDR1 = \ 405 ".386" \ 386 406 "mov eax, dr1" \ 387 407 "mov edx, eax" \ … … 393 413 #undef ASMGetDR2 394 414 #pragma aux ASMGetDR2 = \ 415 ".386" \ 395 416 "mov eax, dr2" \ 396 417 "mov edx, eax" \ … … 402 423 #undef ASMGetDR3 403 424 #pragma aux ASMGetDR3 = \ 425 ".386" \ 404 426 "mov eax, dr3" \ 405 427 "mov edx, eax" \ … … 411 433 #undef ASMGetDR6 412 434 #pragma aux ASMGetDR6 = \ 435 ".386" \ 413 436 "mov eax, dr6" \ 414 437 "mov edx, eax" \ … … 420 443 #undef ASMGetAndClearDR6 421 444 #pragma aux ASMGetAndClearDR6 = \ 445 ".386" \ 422 446 "mov edx, 0ffff0ff0h" \ 423 447 "mov eax, dr6" \ … … 431 455 #undef ASMGetDR7 432 456 #pragma aux ASMGetDR7 = \ 457 ".386" \ 433 458 "mov eax, dr7" \ 434 459 "mov edx, eax" \ … … 440 465 #undef ASMSetDR0 441 466 #pragma aux ASMSetDR0 = \ 467 ".386" \ 442 468 "shl edx, 16" \ 443 469 "mov dx, ax" \ … … 448 474 #undef ASMSetDR1 449 475 #pragma aux ASMSetDR1 = \ 476 ".386" \ 450 477 "shl edx, 16" \ 451 478 "mov dx, ax" \ … … 456 483 #undef ASMSetDR2 457 484 #pragma aux ASMSetDR2 = \ 485 ".386" \ 458 486 "shl edx, 16" \ 459 487 "mov dx, ax" \ … … 464 492 #undef ASMSetDR3 465 493 #pragma aux ASMSetDR3 = \ 494 ".386" \ 466 495 "shl edx, 16" \ 467 496 "mov dx, ax" \ … … 472 501 #undef ASMSetDR6 473 502 #pragma aux ASMSetDR6 = \ 503 ".386" \ 474 504 "shl edx, 16" \ 475 505 "mov dx, ax" \ … … 480 510 #undef ASMSetDR7 481 511 #pragma aux ASMSetDR7 = \ 512 ".386" \ 482 513 "shl edx, 16" \ 483 514 "mov dx, ax" \ … … 516 547 #undef ASMOutU32 517 548 #pragma aux ASMOutU32 = \ 549 ".386" \ 518 550 "shl ecx, 16" \ 519 551 "mov cx, ax" \ … … 525 557 #undef ASMInU32 526 558 #pragma aux ASMInU32 = \ 559 ".386" \ 527 560 "in eax, dx" \ 528 561 "mov ecx, eax" \ … … 534 567 #undef ASMOutStrU8 535 568 #pragma aux ASMOutStrU8 = \ 569 ".186" \ 536 570 "mov ds, bx" \ 537 571 "rep outsb" \ … … 541 575 #undef ASMInStrU8 542 576 #pragma aux ASMInStrU8 = \ 577 ".186" \ 543 578 "rep insb" \ 544 579 parm [dx] [es di] [cx] \ … … 547 582 #undef ASMOutStrU16 548 583 #pragma aux ASMOutStrU16 = \ 584 ".186" \ 549 585 "mov ds, bx" \ 550 586 "rep outsw" \ … … 554 590 #undef ASMInStrU16 555 591 #pragma aux ASMInStrU16 = \ 592 ".186" \ 556 593 "rep insw" \ 557 594 parm [dx] [es di] [cx] \ … … 560 597 #undef ASMOutStrU32 561 598 #pragma aux ASMOutStrU32 = \ 599 ".386" \ 562 600 "mov ds, bx" \ 563 601 "rep outsd" \ … … 567 605 #undef ASMInStrU32 568 606 #pragma aux ASMInStrU32 = \ 607 ".386" \ 569 608 "rep insd" \ 570 609 parm [dx] [es di] [cx] \ -
trunk/include/iprt/asm-amd64-x86.h
r58749 r59310 1270 1270 * @returns true if CPUID is supported. 1271 1271 */ 1272 #ifdef __WATCOMC__ 1273 DECLASM(bool) ASMHasCpuId(void); 1274 #else 1272 1275 DECLINLINE(bool) ASMHasCpuId(void) 1273 1276 { 1274 # ifdef RT_ARCH_AMD641277 # ifdef RT_ARCH_AMD64 1275 1278 return true; /* ASSUME that all amd64 compatible CPUs have cpuid. */ 1276 # else /* !RT_ARCH_AMD64 */1279 # else /* !RT_ARCH_AMD64 */ 1277 1280 bool fRet = false; 1278 # if RT_INLINE_ASM_GNU_STYLE1281 # if RT_INLINE_ASM_GNU_STYLE 1279 1282 uint32_t u1; 1280 1283 uint32_t u2; … … 1292 1295 "popf\n\t" 1293 1296 : "=m" (fRet), "=r" (u1), "=r" (u2)); 1294 # else1297 # else 1295 1298 __asm 1296 1299 { … … 1308 1311 popfd 1309 1312 } 1310 # endif1313 # endif 1311 1314 return fRet; 1312 #endif /* !RT_ARCH_AMD64 */ 1313 } 1315 # endif /* !RT_ARCH_AMD64 */ 1316 } 1317 #endif 1314 1318 1315 1319 -
trunk/include/iprt/cdefs.h
r59002 r59310 411 411 # elif defined(_WIN32) || defined(_WIN64) 412 412 # define RT_OPSYS RT_OPSYS_WINDOWS 413 # elif defined(MSDOS) || defined(_MSDOS) || defined(DOS16RM) /* OW+MSC || MSC || DMC */ 414 # define RT_OPSYS RT_OPSYS_DOS 413 415 # else 414 416 # error "Port Me" -
trunk/include/iprt/types.h
r58704 r59310 764 764 765 765 /** Signed integer which can contain both GC and HC pointers. */ 766 #if (HC_ARCH_BITS == 32 && GC_ARCH_BITS == 32) 766 #if (HC_ARCH_BITS == 32 && GC_ARCH_BITS == 32) || (HC_ARCH_BITS == 16 || GC_ARCH_BITS == 16) 767 767 typedef int32_t RTINTPTR; 768 768 #elif (HC_ARCH_BITS == 64 || GC_ARCH_BITS == 64) … … 776 776 typedef const RTINTPTR *PCRTINTPTR; 777 777 /** The maximum value the RTINTPTR type can hold. */ 778 #if (HC_ARCH_BITS == 32 && GC_ARCH_BITS == 32) 778 #if (HC_ARCH_BITS == 32 && GC_ARCH_BITS == 32) || (HC_ARCH_BITS == 16 || GC_ARCH_BITS == 16) 779 779 # define RTINTPTR_MAX INT32_MAX 780 780 #elif (HC_ARCH_BITS == 64 || GC_ARCH_BITS == 64) … … 784 784 #endif 785 785 /** The minimum value the RTINTPTR type can hold. */ 786 #if (HC_ARCH_BITS == 32 && GC_ARCH_BITS == 32) 786 #if (HC_ARCH_BITS == 32 && GC_ARCH_BITS == 32) || (HC_ARCH_BITS == 16 || GC_ARCH_BITS == 16) 787 787 # define RTINTPTR_MIN INT32_MIN 788 788 #elif (HC_ARCH_BITS == 64 || GC_ARCH_BITS == 64) … … 793 793 794 794 /** Unsigned integer which can contain both GC and HC pointers. */ 795 #if (HC_ARCH_BITS == 32 && GC_ARCH_BITS == 32) 795 #if (HC_ARCH_BITS == 32 && GC_ARCH_BITS == 32) || (HC_ARCH_BITS == 16 || GC_ARCH_BITS == 16) 796 796 typedef uint32_t RTUINTPTR; 797 797 #elif (HC_ARCH_BITS == 64 || GC_ARCH_BITS == 64) … … 805 805 typedef const RTUINTPTR *PCRTUINTPTR; 806 806 /** The maximum value the RTUINTPTR type can hold. */ 807 #if (HC_ARCH_BITS == 32 && GC_ARCH_BITS == 32) 807 #if (HC_ARCH_BITS == 32 && GC_ARCH_BITS == 32) || (HC_ARCH_BITS == 16 || GC_ARCH_BITS == 16) 808 808 # define RTUINTPTR_MAX UINT32_MAX 809 809 #elif (HC_ARCH_BITS == 64 || GC_ARCH_BITS == 64)
Note:
See TracChangeset
for help on using the changeset viewer.

