filename | src/main.c |
changeset | 1184:0a306d645e2c |
prev | 1179:af1c5d7d5a5a |
next | 1201:5502572ce192 |
author | Nathan Keynes <nkeynes@lxdream.org> |
date | Fri Dec 16 10:08:45 2011 +1000 (12 years ago) |
permissions | -rw-r--r-- |
last change | Add volatile qualifier to return-address frobbing - works around optimizer bug in GCC versions after 4.2 |
file | annotate | diff | log | raw |
1.1 --- a/src/main.c Sun Sep 18 08:24:27 2011 +10001.2 +++ b/src/main.c Fri Dec 16 10:08:45 2011 +10001.3 @@ -45,7 +45,7 @@1.5 #define GL_INFO_OPT 11.7 -char *option_list = "a:A:bc:e:dfg:G:hHl:m:npt:T:uvV:xX?";1.8 +char *option_list = "a:A:bc:e:dfg:G:hHl:m:npPt:T:uvV:xX?";1.9 struct option longopts[] = {1.10 { "aica", required_argument, NULL, 'a' },1.11 { "audio", required_argument, NULL, 'A' },1.12 @@ -67,6 +67,7 @@1.13 { "unsafe", no_argument, NULL, 'u' },1.14 { "video", no_argument, NULL, 'V' },1.15 { "version", no_argument, NULL, 'v' },1.16 + { "sh4-profile-blocks", no_argument, NULL, 'P' },1.17 { NULL, 0, 0, 0 } };1.18 char *aica_program = NULL;1.19 char *display_driver_name = NULL;1.20 @@ -131,7 +132,7 @@1.21 int opt;1.22 double t;1.23 gboolean display_ok, have_disc = FALSE, have_save = FALSE, have_exec = FALSE;1.24 - gboolean print_glinfo = FALSE;1.25 + gboolean print_glinfo = FALSE, sh4_profile_blocks = FALSE;1.26 uint32_t time_secs, time_nanos;1.27 const char *exec_name = NULL;1.29 @@ -192,6 +193,9 @@1.30 start_immediately = TRUE;1.31 no_start = FALSE;1.32 break;1.33 + case 'P':1.34 + sh4_profile_blocks = TRUE;1.35 + break;1.36 case 't': /* Time limit + auto quit */1.37 t = strtod(optarg, NULL);1.38 time_secs = (uint32_t)t;1.39 @@ -355,6 +359,9 @@1.40 }1.42 sh4_set_core( sh4_core );1.43 + if( sh4_core == SH4_TRANSLATE ) {1.44 + sh4_translate_set_profile_blocks( sh4_profile_blocks );1.45 + }1.47 /* If requested, start the gdb server immediately before we go into the main1.48 * loop.
.