sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 1 | |
| 2 | int main ( void ) |
| 3 | { |
sewardj | 9085f7e | 2006-01-18 04:17:18 +0000 | [diff] [blame] | 4 | #if defined(__powerpc64__) |
| 5 | /* on ppc64-linux, a function pointer points to a function |
| 6 | descriptor, not to the function's entry point. Hence to get |
| 7 | uniform behaviour on all supported targets - a jump to 0xE000000 |
| 8 | - the following is needed. */ |
| 9 | unsigned long long int fake_fndescr[3]; |
| 10 | fake_fndescr[0] = 0xE000000; |
| 11 | fake_fndescr[1] = 0; |
| 12 | fake_fndescr[2] = 0; |
| 13 | return ((int(*)(void)) fake_fndescr) (); |
| 14 | #else |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 15 | char* p = (char*)0xE000000; |
| 16 | return ((int(*)(void)) p) (); |
sewardj | 9085f7e | 2006-01-18 04:17:18 +0000 | [diff] [blame] | 17 | #endif |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 18 | } |