except.c (70635) | except.c (74473) |
---|---|
1/* Implements exception handling. 2 Copyright (C) 1989, 92-97, 1998 Free Software Foundation, Inc. 3 Contributed by Mike Stump <mrs@cygnus.com>. 4 5This file is part of GNU CC. 6 7GNU CC is free software; you can redistribute it and/or modify 8it under the terms of the GNU General Public License as published by --- 709 unchanged lines hidden (view full) --- 718 719 return tempentry; 720} 721 722static void 723receive_exception_label (handler_label) 724 rtx handler_label; 725{ | 1/* Implements exception handling. 2 Copyright (C) 1989, 92-97, 1998 Free Software Foundation, Inc. 3 Contributed by Mike Stump <mrs@cygnus.com>. 4 5This file is part of GNU CC. 6 7GNU CC is free software; you can redistribute it and/or modify 8it under the terms of the GNU General Public License as published by --- 709 unchanged lines hidden (view full) --- 718 719 return tempentry; 720} 721 722static void 723receive_exception_label (handler_label) 724 rtx handler_label; 725{ |
726 rtx around_label = NULL_RTX; 727 728 if (! flag_new_exceptions || exceptions_via_longjmp) 729 { 730 around_label = gen_label_rtx (); 731 emit_jump (around_label); 732 emit_barrier (); 733 } 734 | |
735 emit_label (handler_label); 736 | 726 emit_label (handler_label); 727 |
737 if (! exceptions_via_longjmp) 738 { | |
739#ifdef HAVE_exception_receiver | 728#ifdef HAVE_exception_receiver |
740 if (HAVE_exception_receiver) 741 emit_insn (gen_exception_receiver ()); 742 else | 729 if (! exceptions_via_longjmp) 730 if (HAVE_exception_receiver) 731 emit_insn (gen_exception_receiver ()); |
743#endif | 732#endif |
733 |
|
744#ifdef HAVE_nonlocal_goto_receiver | 734#ifdef HAVE_nonlocal_goto_receiver |
745 if (HAVE_nonlocal_goto_receiver) 746 emit_insn (gen_nonlocal_goto_receiver ()); 747 else | 735 if (! exceptions_via_longjmp) 736 if (HAVE_nonlocal_goto_receiver) 737 emit_insn (gen_nonlocal_goto_receiver ()); |
748#endif | 738#endif |
749 { /* Nothing */ } 750 } 751 else 752 { 753#ifndef DONT_USE_BUILTIN_SETJMP 754 expand_builtin_setjmp_receiver (handler_label); 755#endif 756 } 757 758 if (around_label) 759 emit_label (around_label); | |
760} 761 | 739} 740 |
741 |
|
762struct func_eh_entry 763{ 764 int range_number; /* EH region number from EH NOTE insn's */ 765 rtx rethrow_label; /* Label for rethrow */ 766 struct handler_info *handlers; 767}; 768 769 --- 565 unchanged lines hidden (view full) --- 1335/* Emit RTL to start a dynamic handler on the EH runtime dynamic 1336 handler stack. This should only be used by expand_eh_region_start 1337 or expand_eh_region_start_tree. */ 1338 1339static void 1340start_dynamic_handler () 1341{ 1342 rtx dhc, dcc; | 742struct func_eh_entry 743{ 744 int range_number; /* EH region number from EH NOTE insn's */ 745 rtx rethrow_label; /* Label for rethrow */ 746 struct handler_info *handlers; 747}; 748 749 --- 565 unchanged lines hidden (view full) --- 1315/* Emit RTL to start a dynamic handler on the EH runtime dynamic 1316 handler stack. This should only be used by expand_eh_region_start 1317 or expand_eh_region_start_tree. */ 1318 1319static void 1320start_dynamic_handler () 1321{ 1322 rtx dhc, dcc; |
1343 rtx arg, buf; | 1323 rtx x, arg, buf; |
1344 int size; 1345 1346#ifndef DONT_USE_BUILTIN_SETJMP 1347 /* The number of Pmode words for the setjmp buffer, when using the 1348 builtin setjmp/longjmp, see expand_builtin, case 1349 BUILT_IN_LONGJMP. */ 1350 size = 5; 1351#else --- 25 unchanged lines hidden (view full) --- 1377 1378 /* Zero out the start of the cleanup chain. */ 1379 emit_move_insn (dcc, const0_rtx); 1380 1381 /* The jmpbuf starts two words into the area allocated. */ 1382 buf = plus_constant (XEXP (arg, 0), GET_MODE_SIZE (Pmode)*2); 1383 1384#ifdef DONT_USE_BUILTIN_SETJMP | 1324 int size; 1325 1326#ifndef DONT_USE_BUILTIN_SETJMP 1327 /* The number of Pmode words for the setjmp buffer, when using the 1328 builtin setjmp/longjmp, see expand_builtin, case 1329 BUILT_IN_LONGJMP. */ 1330 size = 5; 1331#else --- 25 unchanged lines hidden (view full) --- 1357 1358 /* Zero out the start of the cleanup chain. */ 1359 emit_move_insn (dcc, const0_rtx); 1360 1361 /* The jmpbuf starts two words into the area allocated. */ 1362 buf = plus_constant (XEXP (arg, 0), GET_MODE_SIZE (Pmode)*2); 1363 1364#ifdef DONT_USE_BUILTIN_SETJMP |
1365 x = emit_library_call_value (setjmp_libfunc, NULL_RTX, 1, SImode, 1, 1366 buf, Pmode); 1367 /* If we come back here for a catch, transfer control to the handler. */ 1368 jumpif_rtx (x, ehstack.top->entry->exception_handler_label); 1369#else |
|
1385 { | 1370 { |
1386 rtx x; 1387 x = emit_library_call_value (setjmp_libfunc, NULL_RTX, LCT_CONST, 1388 TYPE_MODE (integer_type_node), 1, 1389 buf, Pmode); 1390 /* If we come back here for a catch, transfer control to the handler. */ 1391 jumpif_rtx (x, ehstack.top->entry->exception_handler_label); | 1371 /* A label to continue execution for the no exception case. */ 1372 rtx noex = gen_label_rtx(); 1373 x = expand_builtin_setjmp (buf, NULL_RTX, noex, 1374 ehstack.top->entry->exception_handler_label); 1375 emit_label (noex); |
1392 } | 1376 } |
1393#else 1394 expand_builtin_setjmp_setup (buf, 1395 ehstack.top->entry->exception_handler_label); | |
1396#endif 1397 1398 /* We are committed to this, so update the handler chain. */ 1399 1400 emit_move_insn (dhc, force_operand (XEXP (arg, 0), NULL_RTX)); 1401} 1402 1403/* Start an exception handling region for the given cleanup action. --- 1583 unchanged lines hidden --- | 1377#endif 1378 1379 /* We are committed to this, so update the handler chain. */ 1380 1381 emit_move_insn (dhc, force_operand (XEXP (arg, 0), NULL_RTX)); 1382} 1383 1384/* Start an exception handling region for the given cleanup action. --- 1583 unchanged lines hidden --- |