diff options
| author | David Jones | 2007-03-01 19:49:29 +0000 |
|---|---|---|
| committer | David Jones | 2007-03-01 19:49:29 +0000 |
| commit | b44f32fa08581d6365bb318b43274cdea6ffa6bb (patch) | |
| tree | 0833de1eabc95cf71be749e277b2001a6ea16fc6 /mps/code | |
| parent | b884cc07c6f0e4e0eced6dfdbee2d1995e1d2d8b (diff) | |
| download | emacs-b44f32fa08581d6365bb318b43274cdea6ffa6bb.tar.gz emacs-b44f32fa08581d6365bb318b43274cdea6ffa6bb.zip | |
Mps: enabling reg scanner for mpsicv on mactel.
Copied from Perforce
Change: 161877
ServerID: perforce.ravenbrook.com
Diffstat (limited to 'mps/code')
| -rw-r--r-- | mps/code/mpsicv.c | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/mps/code/mpsicv.c b/mps/code/mpsicv.c index 0761d4427e4..dbc8c1484b1 100644 --- a/mps/code/mpsicv.c +++ b/mps/code/mpsicv.c | |||
| @@ -12,11 +12,9 @@ | |||
| 12 | #include "fmtdy.h" | 12 | #include "fmtdy.h" |
| 13 | #include "fmtdytst.h" | 13 | #include "fmtdytst.h" |
| 14 | #include "mps.h" | 14 | #include "mps.h" |
| 15 | #if !defined(CONFIG_PROD_EPCORE) | 15 | #include "mpstd.h" |
| 16 | # include "mpstd.h" | 16 | #ifdef MPS_OS_W3 |
| 17 | # ifdef MPS_OS_W3 | 17 | # include "mpsw3.h" |
| 18 | # include "mpsw3.h" | ||
| 19 | # endif | ||
| 20 | #endif | 18 | #endif |
| 21 | #include <stdlib.h> | 19 | #include <stdlib.h> |
| 22 | #include <stdarg.h> | 20 | #include <stdarg.h> |
| @@ -450,24 +448,12 @@ static void *test(void *arg, size_t s) | |||
| 450 | 448 | ||
| 451 | #define TEST_ARENA_SIZE ((size_t)16<<20) | 449 | #define TEST_ARENA_SIZE ((size_t)16<<20) |
| 452 | 450 | ||
| 453 | /* Hacky. Sorry. | ||
| 454 | * REG_ROOT is defined to 1 when we can use a register root. | ||
| 455 | * Otherwise it is defined to 0. | ||
| 456 | */ | ||
| 457 | #if !defined(CONFIG_PROD_EPCORE) && !defined(MPS_PF_XCI3GC) | ||
| 458 | #define REG_ROOT 1 | ||
| 459 | #else | ||
| 460 | #define REG_ROOT 0 | ||
| 461 | #endif | ||
| 462 | |||
| 463 | 451 | ||
| 464 | int main(int argc, char **argv) | 452 | int main(int argc, char **argv) |
| 465 | { | 453 | { |
| 466 | mps_arena_t arena; | 454 | mps_arena_t arena; |
| 467 | mps_thr_t thread; | 455 | mps_thr_t thread; |
| 468 | #if REG_ROOT | ||
| 469 | mps_root_t reg_root; | 456 | mps_root_t reg_root; |
| 470 | #endif | ||
| 471 | void *r; | 457 | void *r; |
| 472 | void *marker = ▮ | 458 | void *marker = ▮ |
| 473 | 459 | ||
| @@ -477,19 +463,15 @@ int main(int argc, char **argv) | |||
| 477 | "arena_create"); | 463 | "arena_create"); |
| 478 | die(mps_thread_reg(&thread, arena), "thread_reg"); | 464 | die(mps_thread_reg(&thread, arena), "thread_reg"); |
| 479 | 465 | ||
| 480 | #if REG_ROOT | ||
| 481 | die(mps_root_create_reg(®_root, arena, | 466 | die(mps_root_create_reg(®_root, arena, |
| 482 | MPS_RANK_AMBIG, (mps_rm_t)0, | 467 | MPS_RANK_AMBIG, (mps_rm_t)0, |
| 483 | thread, &mps_stack_scan_ambig, | 468 | thread, &mps_stack_scan_ambig, |
| 484 | marker, (size_t)0), | 469 | marker, (size_t)0), |
| 485 | "root_create_reg"); | 470 | "root_create_reg"); |
| 486 | #endif | ||
| 487 | 471 | ||
| 488 | (mps_tramp)(&r, test, arena, 0); /* non-inlined trampoline */ | 472 | (mps_tramp)(&r, test, arena, 0); /* non-inlined trampoline */ |
| 489 | mps_tramp(&r, test, arena, 0); | 473 | mps_tramp(&r, test, arena, 0); |
| 490 | #if REG_ROOT | ||
| 491 | mps_root_destroy(reg_root); | 474 | mps_root_destroy(reg_root); |
| 492 | #endif | ||
| 493 | mps_thread_dereg(thread); | 475 | mps_thread_dereg(thread); |
| 494 | mps_arena_destroy(arena); | 476 | mps_arena_destroy(arena); |
| 495 | 477 | ||