Author: sewardj Date: 2007-11-10 13:33:56 +0000 (Sat, 10 Nov 2007) New Revision: 7136
Log: Fix compilation on ppc platforms. Modified: trunk/exp-omega/o_main.c Modified: trunk/exp-omega/o_main.c =================================================================== --- trunk/exp-omega/o_main.c 2007-11-10 12:44:56 UTC (rev 7135) +++ trunk/exp-omega/o_main.c 2007-11-10 13:33:56 UTC (rev 7136) @@ -163,13 +163,27 @@ /* ** Indicate registers that are 'scratch' registers and should be ignored on ** function return for tracked pointer purposes. + + JRS 10 Nov 2007: Seems to me this should be somehow related to + caller- vs callee-saved classification of registers, but not sure. + See docs/internal/register-uses.txt for a summary. + + This fn really ought to be partitioned along VGP_arch_os lines + rather than VGA_arch lines, since register conventions are OS + dependant as well as CPU dependant. */ +#if defined(VGA_x86) switch(OFFSET_FROM_REG(reg)) { -#if defined(VGA_x86) case OFFSET_x86_ECX: case OFFSET_x86_EDX: + return 1; + default: + return 0; + } #elif defined(VGA_amd64) + switch(OFFSET_FROM_REG(reg)) + { case OFFSET_amd64_RCX: case OFFSET_amd64_RSI: case OFFSET_amd64_RDI: @@ -177,21 +191,20 @@ case OFFSET_amd64_R9: case OFFSET_amd64_R10: case OFFSET_amd64_R11: -#elif defined(VGA_ppc32) -#error I know even less about PPC than x86 - please add appropriate registers -#elif defined(VGA_ppc64) -#error I know even less about PPC than x86 - please add appropriate registers -#else -# error Unknown arch -#endif return 1; - break; - default: - break; + return 0; } - - return 0; +#elif defined(VGA_ppc32) || defined(VGA_ppc64) + VG_(printf)("\n\nOmega does not currently work on ppc platforms." + " Sorry.\n\n"); + VG_(exit)(0); +#else +# error "Unknown arch" +#endif + + /*NOTREACHED*/ + tl_assert(0); } @@ -2805,14 +2818,11 @@ case OFFSET_amd64_RIP: #endif -#elif defined(VGA_ppc32) - -#error I know even less about PPC than x86 - please add appropriate registers - -#elif defined(VGA_ppc64) - -#error I know even less about PPC than x86 - please add appropriate registers - +#elif defined(VGA_ppc32) || defined(VGA_ppc64) + default: + VG_(printf)("\n\nOmega does not currently work on ppc platforms." + " Sorry.\n\n"); + VG_(exit)(0); #else #error Unknown arch ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Valgrind-developers mailing list Valgrind-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-developers