AIX exception-handling vs. builtin_return_address

Mark Mitchell mark@codesourcery.com
Fri Feb 2 10:36:00 GMT 2001


I think I now know at least part of why AIX EH is broken, but not
necessarily how to fix it.

In libgcc2.c, __throw computes the PC of the caller like this:

  pc = __builtin_extract_return_addr (__builtin_return_address (0)) - 1;

The expansion of __builtin_return_address looks like:

        lwz 9,504(31)

which is fine, in that at the end of the prologue we had:

        mflr 0
        stw 0,504(31)

Unfortunately, at this point the link register no longer contains the
address of the caller.  Why?

Because this is at the end of the prologue, and we have:

        mflr 0
        mfcr 12
        bl ._savef14

at the very top of the prologue.

In the middle of the prologue we have:

       stw 0,8(1)

because we remember that we moved the link register into register 0.

But, the emission of the second store is both redundant and wrong;
we've already clobbered lr.  And, it's the second store that we use
for __builtin_return_address.

This is coming from rs6000_return_addr.  Curiously, on AIX we have
flag_pic == 0, even though all code is position-independent:

  if (flag_pic && (DEFAULT_ABI == ABI_AIX))
    {
      warning ("-f%s ignored for AIX (all code is position independent)",
               (flag_pic > 1) ? "PIC" : "pic");
      flag_pic = 0;
    }

I'm not sure that matters, but it's just curious to me.  I would have
thought that in that case we would hard-wire flag_pic *on*, not *off*.

Anyhow, this means that we fall into this code:

  reg = cfun->machine->ra_rtx;
  if (reg == NULL)
    {
      /* No rtx yet.  Invent one, and initialize it from LR in
         the prologue.  */
      reg = gen_reg_rtx (Pmode);
      cfun->machine->ra_rtx = reg;
      init = gen_rtx_SET (VOIDmode, reg,
                          gen_rtx_REG (Pmode, LINK_REGISTER_REGNUM));

      /* Emit the insn to the prologue with the other argument copies.  */
      push_topmost_sequence ();
      emit_insn_after (init, get_insns ());
      pop_topmost_sequence ();
    }

which is bogus, since we have already clobbered the link register by
the point at which this code is inserted.  (Note that
cfun->machine->ra_rtx is NULL, here.)

I'm not sure quite what's going on here.  Perhaps simply setting
cfun->machine->ra_rtx when we emit the prologue instructions is good
enough?  Oh, I see we don't emit the prologue until later.  It looks
like using the PIC code would work, then.  Or else rs6000_return_addr
should just set ra_rtx, and the actual SET should be generated by the
prologue-generating code, using the register to which the link
register has already been copied?

I would really appreciate it if someone else could help out here a
bit.  I really would like to be working on other aspects of the
release by now. :-(

Attached please find libgcc2.i.  If you compile this with 

  -fpreprocessed libgcc2.i -quiet -dumpbase libgcc2.c -dA -g -version
  -fexceptions -o libgcc2.s

with an AIX compiler look at __throw.

I get:

  .__throw:
	  .stabx  "__throw:F-11",.__throw,142,0
	  .function .__throw,.__throw,16,044,FE..__throw-.__throw
  LFB..25:
	  .bf     4098
	  .line   1
	  .extern ._savef14
	  .extern ._restf14
	   # basic block 0
	  mflr 0
	  mfcr 12
	  bl ._savef14
  LCFI..131:
	  stw 13,-220(1)
  LCFI..132:
	  stw 14,-216(1)
          ...
  LCFI..154:
          mflr 0
          stw 0,504(31)

Please let me know if I am off-base in my analysis.

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com

# 36 "../../gcc/libgcc2.c"
# 1 "tconfig.h" 1


# 1 "../../gcc/gansidecl.h" 1
# 28 "../../gcc/gansidecl.h"
# 1 "../../include/ansidecl.h" 1
# 29 "../../gcc/gansidecl.h" 2
# 4 "tconfig.h" 2


# 1 "../../gcc/config/rs6000/xm-rs6000.h" 1
# 38 "../../gcc/config/rs6000/xm-rs6000.h"
# 1 "tm.h" 1


# 1 "../../gcc/gansidecl.h" 1
# 4 "tm.h" 2


# 1 "../../gcc/config/rs6000/rs6000.h" 1
# 143 "../../gcc/config/rs6000/rs6000.h"
extern int target_flags;
# 342 "../../gcc/config/rs6000/rs6000.h"
enum processor_type
 {
   PROCESSOR_RIOS1,
   PROCESSOR_RIOS2,
   PROCESSOR_RS64A,
   PROCESSOR_MPCCORE,
   PROCESSOR_PPC403,
   PROCESSOR_PPC601,
   PROCESSOR_PPC603,
   PROCESSOR_PPC604,
   PROCESSOR_PPC604e,
   PROCESSOR_PPC620,
   PROCESSOR_PPC630,
   PROCESSOR_PPC750
};

extern enum processor_type rs6000_cpu;
# 408 "../../gcc/config/rs6000/rs6000.h"
struct rs6000_cpu_select
{
  const char *string;
  const char *name;
  int set_tune_p;
  int set_arch_p;
};

extern struct rs6000_cpu_select rs6000_select[];


extern const char *rs6000_debug_name;
extern int rs6000_debug_stack;
extern int rs6000_debug_arg;
# 931 "../../gcc/config/rs6000/rs6000.h"
enum reg_class
{
  NO_REGS,
  BASE_REGS,
  GENERAL_REGS,
  FLOAT_REGS,
  NON_SPECIAL_REGS,
  MQ_REGS,
  LINK_REGS,
  CTR_REGS,
  LINK_OR_CTR_REGS,
  SPECIAL_REGS,
  SPEC_OR_GEN_REGS,
  CR0_REGS,
  CR_REGS,
  NON_FLOAT_REGS,
  XER_REGS,
  ALL_REGS,
  LIM_REG_CLASSES
};
# 1157 "../../gcc/config/rs6000/rs6000.h"
enum rs6000_abi {
  ABI_NONE,
  ABI_AIX,
  ABI_AIX_NODESC,
  ABI_V4,
  ABI_SOLARIS
};

extern enum rs6000_abi rs6000_current_abi;


typedef struct rs6000_stack {
  int first_gp_reg_save;
  int first_fp_reg_save;
  int lr_save_p;
  int cr_save_p;
  int toc_save_p;
  int push_p;
  int calls_p;
  enum rs6000_abi abi;
  int gp_save_offset;
  int fp_save_offset;
  int lr_save_offset;
  int cr_save_offset;
  int toc_save_offset;
  int varargs_save_offset;
  int reg_size;
  int varargs_size;
  int vars_size;
  int parm_size;
  int save_size;
  int fixed_size;
  int gp_size;
  int fp_size;
  int cr_size;
  int lr_size;
  int toc_size;
  int total_size;
} rs6000_stack_t;
# 1383 "../../gcc/config/rs6000/rs6000.h"
typedef struct machine_function
{

  int sysv_varargs_p;

  struct rtx_def *ra_rtx;

  int ra_needs_full_frame;
} machine_function;
# 1411 "../../gcc/config/rs6000/rs6000.h"
typedef struct rs6000_args
{
  int words;
  int fregno;
  int nargs_prototype;
  int orig_nargs;
  int prototype;
  int call_cookie;
  int sysv_gregno;
} CUMULATIVE_ARGS;
# 1655 "../../gcc/config/rs6000/rs6000.h"
extern struct rtx_def* rs6000_return_addr (int, struct rtx_def *rtx);
# 2308 "../../gcc/config/rs6000/rs6000.h"
extern struct rtx_def *rs6000_compare_op0, *rs6000_compare_op1;
extern int rs6000_compare_fp_p;
# 2329 "../../gcc/config/rs6000/rs6000.h"
extern int toc_initialized;
# 2391 "../../gcc/config/rs6000/rs6000.h"
extern char rs6000_reg_names[][8];
# 2736 "../../gcc/config/rs6000/rs6000.h"
extern int flag_pic;
extern int optimize;
extern int flag_expensive_optimizations;
extern int frame_pointer_needed;
# 7 "tm.h" 2


# 1 "../../gcc/config/rs6000/aix.h" 1
# 10 "tm.h" 2


# 1 "../../gcc/config/rs6000/aix43.h" 1
# 13 "tm.h" 2


# 1 "insn-codes.h" 1





enum insn_code {
  CODE_FOR_extendqidi2 = 3,
  CODE_FOR_extendqisi2_ppc = 21,
  CODE_FOR_extendqihi2_ppc = 27,
  CODE_FOR_one_cmplsi2 = 39,
  CODE_FOR_abssi2_power = 51,
  CODE_FOR_abssi2_nopower = 52,
  CODE_FOR_negsi2 = 55,
  CODE_FOR_ffssi2 = 58,
  CODE_FOR_mulsi3_mq = 59,
  CODE_FOR_mulsi3_no_mq = 60,
  CODE_FOR_udivsi3_mq = 66,
  CODE_FOR_divsi3_mq = 68,
  CODE_FOR_mulh_call = 74,
  CODE_FOR_mull_call = 75,
  CODE_FOR_divss_call = 76,
  CODE_FOR_divus_call = 77,
  CODE_FOR_quoss_call = 78,
  CODE_FOR_quous_call = 79,
  CODE_FOR_andsi3 = 80,
  CODE_FOR_insvsi = 100,
  CODE_FOR_insvdi = 105,
  CODE_FOR_extzvsi = 106,
  CODE_FOR_extzvdi = 109,
  CODE_FOR_rotlsi3 = 112,
  CODE_FOR_ashlsi3_power = 124,
  CODE_FOR_ashlsi3_no_power = 125,
  CODE_FOR_lshrsi3_power = 133,
  CODE_FOR_lshrsi3_no_power = 134,
  CODE_FOR_ashrsi3_power = 151,
  CODE_FOR_ashrsi3_no_power = 152,
  CODE_FOR_extendsfdf2 = 157,
  CODE_FOR_truncdfsf2 = 158,
  CODE_FOR_aux_truncdfsf2 = 159,
  CODE_FOR_negsf2 = 160,
  CODE_FOR_abssf2 = 161,
  CODE_FOR_fselsfsf4 = 181,
  CODE_FOR_fseldfsf4 = 182,
  CODE_FOR_negdf2 = 183,
  CODE_FOR_absdf2 = 184,
  CODE_FOR_adddf3 = 186,
  CODE_FOR_subdf3 = 187,
  CODE_FOR_muldf3 = 188,
  CODE_FOR_divdf3 = 189,
  CODE_FOR_sqrtdf2 = 194,
  CODE_FOR_fseldfdf4 = 195,
  CODE_FOR_fselsfdf4 = 196,
  CODE_FOR_fctiwz = 200,
  CODE_FOR_floatdidf2 = 201,
  CODE_FOR_fix_truncdfdi2 = 202,
  CODE_FOR_mulsidi3_mq = 206,
  CODE_FOR_umulsidi3_mq = 208,
  CODE_FOR_smulsi3_highpart_mq = 210,
  CODE_FOR_umulsi3_highpart_mq = 212,
  CODE_FOR_ashldi3_power = 214,
  CODE_FOR_lshrdi3_power = 215,
  CODE_FOR_ashrdi3_power = 216,
  CODE_FOR_one_cmpldi2 = 220,
  CODE_FOR_absdi2 = 226,
  CODE_FOR_ffsdi2 = 231,
  CODE_FOR_muldi3 = 232,
  CODE_FOR_smuldi3_highpart = 233,
  CODE_FOR_umuldi3_highpart = 234,
  CODE_FOR_udivdi3 = 239,
  CODE_FOR_rotldi3 = 240,
  CODE_FOR_ashldi3_internal5 = 259,
  CODE_FOR_anddi3 = 267,
  CODE_FOR_elf_high = 279,
  CODE_FOR_elf_low = 280,
  CODE_FOR_movdi_update = 315,
  CODE_FOR_movsi_update = 317,
  CODE_FOR_load_toc_aix_si = 331,
  CODE_FOR_load_toc_aix_di = 332,
  CODE_FOR_load_toc_v4_pic_si = 333,
  CODE_FOR_load_toc_v4_pic_di = 334,
  CODE_FOR_load_toc_v4_PIC_1 = 335,
  CODE_FOR_load_toc_v4_PIC_1b = 336,
  CODE_FOR_load_toc_v4_PIC_2 = 337,
  CODE_FOR_blockage = 352,
  CODE_FOR_jump = 467,
  CODE_FOR_return = 468,
  CODE_FOR_indirect_jumpsi = 469,
  CODE_FOR_indirect_jumpdi = 470,
  CODE_FOR_nop = 473,
  CODE_FOR_trap = 486,
  CODE_FOR_movesi_from_cr = 489,
  CODE_FOR_stack_tie = 493,
  CODE_FOR_return_eh_si = 502,
  CODE_FOR_return_eh_di = 503,
  CODE_FOR_zero_extendqidi2 = 504,
  CODE_FOR_zero_extendhidi2 = 509,
  CODE_FOR_extendhidi2 = 512,
  CODE_FOR_zero_extendsidi2 = 515,
  CODE_FOR_extendsidi2 = 518,
  CODE_FOR_zero_extendqisi2 = 521,
  CODE_FOR_extendqisi2 = 524,
  CODE_FOR_extendqisi2_power = 527,
  CODE_FOR_extendqisi2_no_power = 528,
  CODE_FOR_zero_extendqihi2 = 529,
  CODE_FOR_extendqihi2 = 532,
  CODE_FOR_extendqihi2_power = 535,
  CODE_FOR_extendqihi2_no_power = 536,
  CODE_FOR_zero_extendhisi2 = 537,
  CODE_FOR_extendhisi2 = 540,
  CODE_FOR_addsi3 = 543,
  CODE_FOR_subsi3 = 551,
  CODE_FOR_sminsi3 = 552,
  CODE_FOR_smaxsi3 = 554,
  CODE_FOR_uminsi3 = 556,
  CODE_FOR_umaxsi3 = 557,
  CODE_FOR_abssi2 = 560,
  CODE_FOR_mulsi3 = 565,
  CODE_FOR_divmodsi4 = 570,
  CODE_FOR_udivsi3 = 571,
  CODE_FOR_divsi3 = 572,
  CODE_FOR_modsi3 = 573,
  CODE_FOR_udivmodsi4_normal = 576,
  CODE_FOR_udivmodsi4_tests = 577,
  CODE_FOR_udivmodsi4 = 578,
  CODE_FOR_iorsi3 = 581,
  CODE_FOR_xorsi3 = 582,
  CODE_FOR_insv = 594,
  CODE_FOR_extzv = 595,
  CODE_FOR_ashlsi3 = 606,
  CODE_FOR_lshrsi3 = 613,
  CODE_FOR_ashrsi3 = 624,
  CODE_FOR_addsf3 = 629,
  CODE_FOR_subsf3 = 630,
  CODE_FOR_mulsf3 = 631,
  CODE_FOR_divsf3 = 632,
  CODE_FOR_sqrtsf2 = 633,
  CODE_FOR_maxsf3 = 634,
  CODE_FOR_minsf3 = 636,
  CODE_FOR_movsfcc = 638,
  CODE_FOR_maxdf3 = 639,
  CODE_FOR_mindf3 = 641,
  CODE_FOR_movdfcc = 643,
  CODE_FOR_floatsidf2 = 644,
  CODE_FOR_floatunssidf2 = 646,
  CODE_FOR_fix_truncdfsi2 = 648,
  CODE_FOR_mulsidi3 = 650,
  CODE_FOR_umulsidi3 = 652,
  CODE_FOR_smulsi3_highpart = 654,
  CODE_FOR_umulsi3_highpart = 655,
  CODE_FOR_adddi3 = 656,
  CODE_FOR_subdi3 = 664,
  CODE_FOR_negdi2 = 667,
  CODE_FOR_divdi3 = 670,
  CODE_FOR_moddi3 = 671,
  CODE_FOR_ashldi3 = 684,
  CODE_FOR_lshrdi3 = 689,
  CODE_FOR_ashrdi3 = 692,
  CODE_FOR_iordi3 = 697,
  CODE_FOR_xordi3 = 698,
  CODE_FOR_movsi_got = 706,
  CODE_FOR_movsi = 708,
  CODE_FOR_movhi = 711,
  CODE_FOR_movqi = 712,
  CODE_FOR_movcc = 713,
  CODE_FOR_movsf = 714,
  CODE_FOR_movdf = 716,
  CODE_FOR_movdi = 720,
  CODE_FOR_movti = 734,
  CODE_FOR_load_multiple = 735,
  CODE_FOR_store_multiple = 736,
  CODE_FOR_movstrsi = 737,
  CODE_FOR_movstrsi_8reg = 738,
  CODE_FOR_movstrsi_6reg = 739,
  CODE_FOR_movstrsi_4reg = 740,
  CODE_FOR_movstrsi_2reg = 741,
  CODE_FOR_movstrsi_1reg = 742,
  CODE_FOR_allocate_stack = 745,
  CODE_FOR_save_stack_function = 746,
  CODE_FOR_restore_stack_function = 747,
  CODE_FOR_restore_stack_block = 748,
  CODE_FOR_save_stack_nonlocal = 749,
  CODE_FOR_restore_stack_nonlocal = 750,
  CODE_FOR_builtin_setjmp_receiver = 751,
  CODE_FOR_call_indirect_aix32 = 752,
  CODE_FOR_call_indirect_aix64 = 753,
  CODE_FOR_call_value_indirect_aix32 = 754,
  CODE_FOR_call_value_indirect_aix64 = 755,
  CODE_FOR_call = 756,
  CODE_FOR_call_value = 757,
  CODE_FOR_untyped_call = 758,
  CODE_FOR_cmpsi = 759,
  CODE_FOR_cmpdi = 760,
  CODE_FOR_cmpsf = 761,
  CODE_FOR_cmpdf = 762,
  CODE_FOR_beq = 763,
  CODE_FOR_bne = 764,
  CODE_FOR_bge = 765,
  CODE_FOR_bgt = 766,
  CODE_FOR_ble = 767,
  CODE_FOR_blt = 768,
  CODE_FOR_bgeu = 769,
  CODE_FOR_bgtu = 770,
  CODE_FOR_bleu = 771,
  CODE_FOR_bltu = 772,
  CODE_FOR_bunordered = 773,
  CODE_FOR_bordered = 774,
  CODE_FOR_buneq = 775,
  CODE_FOR_bunge = 776,
  CODE_FOR_bungt = 777,
  CODE_FOR_bunle = 778,
  CODE_FOR_bunlt = 779,
  CODE_FOR_bltgt = 780,
  CODE_FOR_seq = 781,
  CODE_FOR_sne = 782,
  CODE_FOR_sgt = 783,
  CODE_FOR_slt = 784,
  CODE_FOR_sge = 785,
  CODE_FOR_sle = 786,
  CODE_FOR_sgtu = 787,
  CODE_FOR_sltu = 788,
  CODE_FOR_sgeu = 789,
  CODE_FOR_sleu = 790,
  CODE_FOR_indirect_jump = 847,
  CODE_FOR_tablejump = 848,
  CODE_FOR_tablejumpsi = 849,
  CODE_FOR_tablejumpdi = 850,
  CODE_FOR_doloop_end = 851,
  CODE_FOR_ctrsi = 852,
  CODE_FOR_ctrdi = 853,
  CODE_FOR_conditional_trap = 858,
  CODE_FOR_prologue = 859,
  CODE_FOR_epilogue = 860,
  CODE_FOR_movsi_to_cr_one = 861,
  CODE_FOR_eh_epilogue = 862,
  CODE_FOR_eh_reg_restore = 863,
  CODE_FOR_nothing = 865 };




struct rtx_def;
# 1 "../../gcc/machmode.h" 1
# 29 "../../gcc/machmode.h"
enum machine_mode {
# 1 "../../gcc/machmode.def" 1
# 67 "../../gcc/machmode.def"
VOIDmode,

BImode,
QImode,
HImode,
SImode,
DImode,
TImode,
OImode,




PQImode,
PHImode,
PSImode,
PDImode,

QFmode,
HFmode,
TQFmode,
SFmode,
DFmode,
XFmode,
TFmode,


QCmode,
HCmode,
SCmode,
DCmode,
XCmode,
TCmode,

CQImode,
CHImode,
CSImode,
CDImode,
CTImode,
COImode,




V2QImode,
V2HImode,
V2SImode,
V2DImode,

V4QImode,
V4HImode,
V4SImode,
V4DImode,

V8QImode,
V8HImode,
V8SImode,
V8DImode,

V16QImode,

V2SFmode,
V2DFmode,

V4SFmode,
V4DFmode,

V8SFmode,
V8DFmode,



BLKmode,
# 148 "../../gcc/machmode.def"
CCmode,


CCUNSmode, CCFPmode, CCEQmode,
# 31 "../../gcc/machmode.h" 2
MAX_MACHINE_MODE };
# 41 "../../gcc/machmode.h"
extern const char * const mode_name[];


enum mode_class { MODE_RANDOM, MODE_INT, MODE_FLOAT, MODE_PARTIAL_INT, MODE_CC,
                  MODE_COMPLEX_INT, MODE_COMPLEX_FLOAT,
                  MODE_VECTOR_INT, MODE_VECTOR_FLOAT,
                  MAX_MODE_CLASS};




extern const enum mode_class mode_class[];
# 80 "../../gcc/machmode.h"
extern const unsigned int mode_size[];




extern const unsigned int mode_unit_size[];
# 96 "../../gcc/machmode.h"
extern const unsigned int mode_bitsize[];
# 117 "../../gcc/machmode.h"
extern const unsigned char mode_wider_mode[];






extern enum machine_mode mode_for_size (unsigned int, enum mode_class, int);




extern enum machine_mode smallest_mode_for_size
                                (unsigned int, enum mode_class);





extern enum machine_mode int_mode_for_mode (enum machine_mode);



extern enum machine_mode get_best_mode (int, int, unsigned int, enum machine_mode, int);




extern unsigned get_mode_alignment (enum machine_mode);





extern const enum machine_mode class_narrowest_mode[];





extern enum machine_mode byte_mode;
extern enum machine_mode word_mode;
extern enum machine_mode ptr_mode;
# 243 "insn-codes.h" 2

extern int short_cint_operand (struct rtx_def *, enum machine_mode);
extern int u_short_cint_operand (struct rtx_def *, enum machine_mode);
extern int non_short_cint_operand (struct rtx_def *, enum machine_mode);
extern int gpc_reg_operand (struct rtx_def *, enum machine_mode);
extern int cc_reg_operand (struct rtx_def *, enum machine_mode);
extern int cc_reg_not_cr0_operand (struct rtx_def *, enum machine_mode);
extern int reg_or_short_operand (struct rtx_def *, enum machine_mode);
extern int reg_or_neg_short_operand (struct rtx_def *, enum machine_mode);
extern int reg_or_u_short_operand (struct rtx_def *, enum machine_mode);
extern int reg_or_cint_operand (struct rtx_def *, enum machine_mode);
extern int reg_or_arith_cint_operand (struct rtx_def *, enum machine_mode);
extern int reg_or_logical_cint_operand (struct rtx_def *, enum machine_mode);
extern int got_operand (struct rtx_def *, enum machine_mode);
extern int got_no_const_operand (struct rtx_def *, enum machine_mode);
extern int easy_fp_constant (struct rtx_def *, enum machine_mode);
extern int reg_or_mem_operand (struct rtx_def *, enum machine_mode);
extern int lwa_operand (struct rtx_def *, enum machine_mode);
extern int volatile_mem_operand (struct rtx_def *, enum machine_mode);
extern int offsettable_mem_operand (struct rtx_def *, enum machine_mode);
extern int mem_or_easy_const_operand (struct rtx_def *, enum machine_mode);
extern int add_operand (struct rtx_def *, enum machine_mode);
extern int non_add_cint_operand (struct rtx_def *, enum machine_mode);
extern int and_operand (struct rtx_def *, enum machine_mode);
extern int and64_operand (struct rtx_def *, enum machine_mode);
extern int logical_operand (struct rtx_def *, enum machine_mode);
extern int non_logical_cint_operand (struct rtx_def *, enum machine_mode);
extern int mask_operand (struct rtx_def *, enum machine_mode);
extern int mask64_operand (struct rtx_def *, enum machine_mode);
extern int rldic_operand (struct rtx_def *, enum machine_mode);
extern int count_register_operand (struct rtx_def *, enum machine_mode);
extern int xer_operand (struct rtx_def *, enum machine_mode);
extern int call_operand (struct rtx_def *, enum machine_mode);
extern int current_file_function_operand (struct rtx_def *, enum machine_mode);
extern int input_operand (struct rtx_def *, enum machine_mode);
extern int load_multiple_operation (struct rtx_def *, enum machine_mode);
extern int store_multiple_operation (struct rtx_def *, enum machine_mode);
extern int branch_comparison_operator (struct rtx_def *, enum machine_mode);
extern int branch_positive_comparison_operator (struct rtx_def *, enum machine_mode);
extern int scc_comparison_operator (struct rtx_def *, enum machine_mode);
extern int trap_comparison_operator (struct rtx_def *, enum machine_mode);
extern int boolean_operator (struct rtx_def *, enum machine_mode);
extern int boolean_or_operator (struct rtx_def *, enum machine_mode);
# 16 "tm.h" 2
# 39 "../../gcc/config/rs6000/xm-rs6000.h" 2
# 7 "tconfig.h" 2
# 37 "../../gcc/libgcc2.c" 2
# 1 "../../gcc/tsystem.h" 1
# 37 "../../gcc/tsystem.h"
# 1 "include/stddef.h" 1 3
# 147 "include/stddef.h" 3
typedef long int ptrdiff_t;
# 199 "include/stddef.h" 3
typedef long unsigned int size_t;
# 287 "include/stddef.h" 3
typedef short unsigned int wchar_t;
# 38 "../../gcc/tsystem.h" 2
# 60 "../../gcc/tsystem.h"
# 1 "include/stdarg.h" 1 3
# 43 "include/stdarg.h" 3
typedef __builtin_va_list __gnuc_va_list;
# 110 "include/stdarg.h" 3
typedef __gnuc_va_list va_list;
# 61 "../../gcc/tsystem.h" 2


# 1 "include/stdio.h" 1 3
# 14 "include/stdio.h" 3
# 1 "include/stdarg.h" 1 3
# 15 "include/stdio.h" 2 3
# 57 "include/stdio.h" 3
# 1 "/usr/include/standards.h" 1 3
# 58 "include/stdio.h" 2 3
# 96 "include/stdio.h" 3
typedef long fpos_t;



typedef long long fpos64_t;
# 150 "include/stdio.h" 3
typedef struct {
        unsigned char *_ptr;
        int _cnt;
        unsigned char *_base;
        unsigned char *_bufendp;
        short _flag;
        short _file;
        int __stdioid;
        char *__newbase;



        long _unused[1];




} FILE;




extern FILE _iob[16];
# 185 "include/stdio.h" 3
extern size_t fread(void *, size_t, size_t, FILE *);
extern size_t fwrite(const void *, size_t, size_t,FILE *);
# 234 "include/stdio.h" 3
extern int __flsbuf(unsigned char, FILE *);
extern int __filbuf(FILE *);
extern int ferror(FILE *);
extern int feof(FILE *);
extern void clearerr(FILE *);
extern int putchar(int);
extern int getchar(void);
extern int putc(int, FILE *);
extern int getc(FILE *);
extern int remove(const char *);
extern int rename(const char *, const char *);
extern FILE *tmpfile(void);
extern char *tmpnam(char *);
extern int fclose(FILE *);
extern int fflush(FILE *);
extern FILE *fopen(const char *, const char *);
extern FILE *freopen(const char *, const char *, FILE *);
extern void setbuf(FILE *, char *);
extern int setvbuf(FILE *, char *, int, size_t);
extern int fprintf(FILE *, const char *, ...);
extern int fscanf(FILE *, const char *, ...);
extern int printf(const char *, ...);
extern int scanf(const char *, ...);
extern int sprintf(char *, const char *, ...);

extern int snprintf(char *, size_t, const char *, ...);

extern int sscanf(const char *, const char *, ...);
# 272 "include/stdio.h" 3
# 1 "/usr/include/va_list.h" 1 3
# 273 "include/stdio.h" 2 3
extern int vfprintf(FILE *, const char *, __gnuc_va_list);
extern int vprintf(const char *, __gnuc_va_list);
extern int vsprintf(char *, const char *, __gnuc_va_list);

extern int vsnprintf(char *, size_t, const char *, __gnuc_va_list);



extern int fgetc(FILE *);
extern char *fgets(char *, int, FILE *);
extern int fputc(int, FILE *);
extern int fputs(const char *, FILE *);
extern char *gets(char *);
extern int puts(const char *);
extern int ungetc(int, FILE *);
extern int fgetpos(FILE *, fpos_t *);
extern int fseek(FILE *, long int, int);
extern int fsetpos(FILE *, const fpos_t *);
extern long ftell(FILE *);
extern void rewind(FILE *);
extern void perror(const char *);





extern int getc_unlocked(FILE *);
extern int getchar_unlocked(void);
extern int putc_unlocked(int, FILE *);
extern int putchar_unlocked(int);
# 377 "include/stdio.h" 3
# 1 "include/sys/types.h" 1 3
# 64 "include/sys/types.h" 3
# 1 "/usr/include/sys/inttypes.h" 1 3
# 49 "/usr/include/sys/inttypes.h" 3
typedef signed char int8_t;
typedef signed short int16_t;
typedef signed int int32_t;




typedef signed long long int64_t;



typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;




typedef unsigned long long uint64_t;
# 76 "/usr/include/sys/inttypes.h" 3
typedef int64_t intmax_t;
typedef uint64_t uintmax_t;
# 88 "/usr/include/sys/inttypes.h" 3
typedef signed long intptr_t;
typedef unsigned long uintptr_t;





typedef signed char int_least8_t;
typedef signed short int_least16_t;
typedef signed int int_least32_t;




typedef signed long long int_least64_t;



typedef unsigned char uint_least8_t;
typedef unsigned short uint_least16_t;
typedef unsigned int uint_least32_t;




typedef unsigned long long uint_least64_t;
# 122 "/usr/include/sys/inttypes.h" 3
typedef int32_t intfast_t;
typedef uint32_t uintfast_t;


typedef signed char int_fast8_t;
typedef int32_t int_fast16_t;
typedef int32_t int_fast32_t;
typedef uint32_t uint_fast8_t;
typedef uint32_t uint_fast16_t;
typedef uint32_t uint_fast32_t;

typedef int64_t int_fast64_t;
typedef uint64_t uint_fast64_t;
# 559 "/usr/include/sys/inttypes.h" 3
typedef signed long __long32_t;
typedef unsigned long __ulong32_t;
# 571 "/usr/include/sys/inttypes.h" 3
typedef signed int __long64_t;
typedef unsigned int __ulong64_t;
# 583 "/usr/include/sys/inttypes.h" 3
typedef signed int int32long64_t;
typedef unsigned int uint32long64_t;
# 596 "/usr/include/sys/inttypes.h" 3
typedef signed long long32int64_t;
typedef unsigned long ulong32int64_t;
# 606 "/usr/include/sys/inttypes.h" 3
typedef signed char int8;
typedef signed short int16;
typedef signed int int32;




typedef signed long long int64;



typedef unsigned char u_int8;
typedef unsigned char u_int8_t;
typedef unsigned short u_int16;
typedef unsigned short u_int16_t;
typedef unsigned int u_int32;
typedef unsigned int u_int32_t;





typedef unsigned long long u_int64;
typedef unsigned long long u_int64_t;
# 65 "include/sys/types.h" 2 3
# 105 "include/sys/types.h" 3
typedef unsigned int wctype_t;
# 125 "include/sys/types.h" 3
typedef int32long64_t time_t;




typedef int clock_t;
# 148 "include/sys/types.h" 3
typedef unsigned char uchar_t;
typedef unsigned short ushort_t;
typedef unsigned int uint_t;
typedef unsigned long ulong_t;
typedef signed long ssize_t;




typedef int level_t;
typedef int32long64_t daddr_t;
typedef int daddr32_t;

typedef int64_t daddr64_t;

typedef char * caddr_t;
typedef uint32long64_t ino_t;
typedef uint_t ino32_t;

typedef uint64_t ino64_t;

typedef short cnt_t;
typedef uint32long64_t dev_t;
typedef uint_t dev32_t;

typedef uint64_t dev64_t;

typedef int chan_t;
typedef int time32_t;
typedef int pid32_t;
typedef int tid32_t;

typedef uint64_t pid64_t;
typedef uint64_t tid64_t;
typedef uint64_t time64_t;







typedef void * __ptr32;
typedef char * __cptr32;


typedef int soff_t;




typedef long off_t;



typedef long long off64_t;


typedef long paddr_t;
typedef int key_t;
typedef int timer_t;
typedef short nlink_t;
typedef uint_t mode_t;
typedef uint_t uid_t;
typedef uint_t gid_t;
typedef __ptr32 mid_t;
typedef int pid_t;
typedef int tid_t;
typedef char slab_t[12];
typedef long mtyp_t;
typedef int boolean_t;


typedef int blkcnt_t;
typedef int blksize_t;
# 233 "include/sys/types.h" 3
typedef ulong_t fsblkcnt_t;
typedef ulong_t fsfilcnt_t;



        typedef int wint_t;



typedef uint_t id_t;
typedef unsigned int useconds_t;
typedef signed int suseconds_t;
typedef int clockid_t;




typedef struct sigset_t {

        unsigned int losigs;
        unsigned int hisigs;




} sigset_t;

typedef int signal_t;




typedef struct fsid_t {

        unsigned int val[2];



} fsid_t;

typedef struct __ptq_queue {
        struct __ptq_queue *__ptq_next;
        struct __ptq_queue *__ptq_prev;
} __ptq_queue;

typedef int __ptlock_type;

typedef struct __pt_attr *pthread_attr_t;
typedef struct __pt_attr *pthread_condattr_t;
typedef struct __pt_attr *pthread_mutexattr_t;


typedef struct __pt_attr *pthread_rwlockattr_t;


typedef unsigned int pthread_t;
typedef unsigned int pthread_key_t;
# 325 "include/sys/types.h" 3
typedef struct {
        __ptq_queue * __ptq_link;
        int __reserved1;
        __ptlock_type __ptmtx_lock;
        int __ptmtx_flags;
        pthread_t __ptmtx_owner;
        int __mtx_id;
        int __acquisitions;
        int __mtx_kind;
        int __lock_cpt;
        int __sleeps;
        int __misses;
        int __reserved2;
        unsigned long __ptmtx_dbx;
} pthread_mutex_t;

typedef struct {
        unsigned long __ptcv_dbx;
        int __reserved1;
        __ptlock_type __ptcv_lock;
        int __ptcv_flags;
        __ptq_queue * __ptcv_waiters;
        int __reserved2;
        int __cv_id;
        pthread_mutex_t *__cv_mutex;
        int __reserved3;
        int __cptwait;
        int __reserved;

} pthread_cond_t;



typedef struct {
        __ptlock_type __ptonce_lock;
        int __ptonce_initialized;
        int __ptonce_executing;
        int __ptonce_completed;
        pthread_mutex_t __ptonce_mutex;
        pthread_cond_t __ptonce_executed;
} pthread_once_t;


typedef struct {





        int __pad;
        unsigned long __ptrlock_dbx;


        pthread_mutex_t __rwl_mutex;
        pthread_cond_t __rwl_rsleepers;
        pthread_cond_t __rwl_wsleepers;
        int __rwl_flags;
        pthread_t __rwl_owner;
        int __rwl_rwlock_id;
        int __rwl_lock_count;


        int __rwl_waiting;
        int __rwl_wacquisitions;
        int __rwl_racquisitions;
        int __rwl_wsleeps;
        int __rwl_rsleeps;
        unsigned long __reserved[6];
} pthread_rwlock_t;
# 402 "include/sys/types.h" 3
# 1 "/usr/include/sys/m_types.h" 1 3
# 46 "/usr/include/sys/m_types.h" 3
typedef struct

label_t

{

        struct label_t *prev;
        ulong_t iar;
        ulong_t stack;
        ulong_t toc;
        ulong_t cr;
        ulong_t intpri;
        ulong_t reg[19];
# 68 "/usr/include/sys/m_types.h" 3
} label_t;




typedef long vmid_t;






typedef ulong_t vmhandle_t;






typedef long32int64_t kvmid_t;
typedef ulong32int64_t kvmhandle_t;

typedef int32long64_t vpn_t;
typedef int kvpn_t;
typedef int32long64_t rpn_t;
typedef int krpn_t;
typedef int32long64_t ext_t;
typedef int32long64_t vmsize_t;

typedef struct

vmaddr_t

{

        vmhandle_t srval;
        caddr_t offset;




} vmaddr_t;

typedef struct

adspace_t

{

        ulong32int64_t alloc;
        kvmhandle_t srval[16];




} adspace_t;
# 403 "include/sys/types.h" 2 3
# 450 "include/sys/types.h" 3
typedef unsigned long long __ptr64;
typedef unsigned long long __cptr64;





typedef ushort_t UniChar;




typedef uchar_t uchar;
typedef ushort_t ushort;
typedef uint_t uint;
typedef ulong_t ulong;

typedef struct { int r[1]; } * physadr_t;
typedef physadr_t physadr;


typedef unsigned char u_char;
typedef unsigned short u_short;
typedef unsigned int u_int;
typedef unsigned long u_long;

typedef struct _quad { int val[2]; } quad;
typedef int swblk_t;




struct sigset {
        unsigned int losigs;
        unsigned int hisigs;
};


struct fsid {
        unsigned int val[2];
};
# 499 "include/sys/types.h" 3
struct fileid {
        uint_t fid_len;
        ino_t fid_ino;
        uint_t fid_gen;
        char fid_x[(32 - sizeof(fsid_t) - sizeof(uint_t)) - (sizeof(ino_t) + 2) - sizeof(uint_t)];
};
# 520 "include/sys/types.h" 3
struct fid {
        uint_t fid_len;
        char fid_data[(32 - sizeof(fsid_t) - sizeof(uint_t))];
};
typedef struct fid fid_t;


struct fhandle {
        char x[32];
};
typedef struct fhandle fhandle_t;

struct filehandle {
        fsid_t fh_fsid;
        struct fileid fh_fid;
};
# 544 "include/sys/types.h" 3
struct unique_id {
       __ulong32_t word1;
       __ulong32_t word2;
       __ulong32_t word3;
       __ulong32_t word4;
};
typedef struct unique_id unique_id_t;
# 576 "include/sys/types.h" 3
typedef long long offset_t;





typedef unsigned long long size64_t;
typedef long long ssize64_t;






typedef long long longlong_t;
typedef unsigned long long u_longlong_t;
# 378 "include/stdio.h" 2 3
# 388 "include/stdio.h" 3
extern int fileno(FILE *);
extern FILE *fdopen(int,const char *);
extern char *ctermid(char *);

extern void flockfile(FILE *);
extern void funlockfile(FILE *);
extern int fseeko(FILE *, off_t, int);
extern off_t ftello(FILE *);
extern int ftrylockfile(FILE *);
extern void funlockfile(FILE *);
# 410 "include/stdio.h" 3
# 1 "/usr/include/va_list.h" 1 3
# 411 "include/stdio.h" 2 3

extern char *optarg;
extern int opterr;
extern int optind;
extern int optopt;
# 428 "include/stdio.h" 3
extern int getw(FILE *);
extern int putw(int, FILE *);
extern char *tempnam(const char*, const char*);
extern FILE *popen(const char *, const char *);
extern int pclose(FILE *);
extern int getopt(int, char * const [], const char*);
extern char *cuserid(char *);
# 444 "include/stdio.h" 3
# 1 "/usr/include/sys/limits.h" 1 3
# 247 "/usr/include/sys/limits.h" 3
# 1 "/usr/include/float.h" 1 3
# 206 "/usr/include/float.h" 3
        extern unsigned int SINFINITY;
        extern unsigned int _DBLINF[2];
        extern unsigned int SQNAN;
        extern unsigned int DQNAN[2];
        extern unsigned int SSNAN;
        extern unsigned int DSNAN[2];
# 237 "/usr/include/float.h" 3
typedef unsigned short fprnd_t;
# 246 "/usr/include/float.h" 3
fprnd_t fp_read_rnd(void);
fprnd_t fp_swap_rnd(fprnd_t rnd);
# 248 "/usr/include/sys/limits.h" 2 3
# 445 "include/stdio.h" 2 3



extern int fgetpos64(FILE *, fpos64_t *);
extern FILE *fopen64(const char *, const char *);
extern FILE *freopen64(const char *, const char *, FILE *);
extern int fseeko64(FILE *, off64_t, int);
extern int fsetpos64(FILE *, const fpos64_t *);
extern off64_t ftello64(FILE *);






extern void setbuffer(FILE *, char *, size_t);
extern void setlinebuf(FILE *);
# 64 "../../gcc/tsystem.h" 2


# 1 "include/sys/types.h" 1 3
# 67 "../../gcc/tsystem.h" 2


# 1 "/usr/include/errno.h" 1 3
# 37 "/usr/include/errno.h" 3
# 1 "/usr/include/standards.h" 1 3
# 38 "/usr/include/errno.h" 2 3
# 59 "/usr/include/errno.h" 3
extern int errno;
# 70 "../../gcc/tsystem.h" 2


extern int errno;



# 1 "include/string.h" 1 3
# 100 "include/string.h" 3
        extern void *memchr(const void *, int, size_t);
        extern void *memcpy(void *, const void *, size_t);
        extern void *memset(void *, int, size_t);
        extern size_t strcspn(const char *, const char *);
        extern size_t strlen(const char *);
        extern size_t strspn(const char *, const char *);
# 132 "include/string.h" 3
        extern void *memmove(void *, const void *, size_t);
        extern char *strcpy(char *, const char *);
        extern char *strncpy(char *, const char *, size_t);
        extern char *strcat(char *, const char *);
        extern char *strncat(char *, const char *, size_t);
        extern int memcmp(const void *, const void *,size_t);
        extern int strcmp(const char *, const char *);
        extern int strncmp(const char *,const char *,size_t);
        extern int strncollen(const char *, const int );
        extern char *strchr(const char *, int);
        extern char *strpbrk(const char *, const char *);
        extern char *strrchr(const char *, int);
        extern char *strstr(const char *, const char *);
        extern char *strtok(char *, const char *);
        extern char *strerror(int);
        extern int strcoll(const char *, const char *);
        extern size_t strxfrm(char *, const char *, size_t);
        extern char *strtok_r(char *, const char *, char **);
# 163 "include/string.h" 3
        extern void *memccpy(void *, const void *, int, size_t);
# 172 "include/string.h" 3
extern char *strdup(const char *);
# 205 "include/string.h" 3
        extern char *index(const char *, int);
        extern char *rindex(const char *, int);
        extern void swab(const void *, void *, ssize_t);
        extern wchar_t *wcscat(wchar_t *, const wchar_t *);
        extern wchar_t *wcschr(const wchar_t *, wchar_t);
        extern int wcscmp(const wchar_t *, const wchar_t *);
        extern wchar_t *wcscpy(wchar_t *, const wchar_t *);
        extern size_t wcscspn(const wchar_t *, const wchar_t *);
        extern size_t wcslen(const wchar_t *);
        extern wchar_t *wcsncat(wchar_t *, const wchar_t *, size_t);
        extern int wcsncmp(const wchar_t *, const wchar_t *, size_t);
        extern wchar_t *wcsncpy(wchar_t *, const wchar_t *, size_t);
        extern wchar_t *wcspbrk(const wchar_t *, const wchar_t *);
        extern wchar_t *wcsrchr(const wchar_t *, wchar_t);
        extern size_t wcsspn(const wchar_t *, const wchar_t *);
        extern wchar_t *wcswcs(const wchar_t *, const wchar_t *);
        extern int wcswidth(const wchar_t *, size_t);
        extern int wcwidth(wchar_t);
        extern int wcscoll(const wchar_t *, const wchar_t *);
        extern size_t wcsxfrm(wchar_t *, const wchar_t *, size_t);
# 77 "../../gcc/tsystem.h" 2



# 1 "include/stdlib.h" 1 3
# 95 "include/stdlib.h" 3
typedef struct div_t {
        int quot;
        int rem;
} div_t;

typedef struct ldiv_t {
        long int quot;
        long int rem;
} ldiv_t;






extern size_t __getmbcurmax (void);
extern int __getmaxdispwidth (void);
# 126 "include/stdlib.h" 3
        extern int mblen(const char *, size_t);
        extern size_t mbstowcs(wchar_t *, const char *, size_t);
        extern int mbtowc(wchar_t *, const char *, size_t);
        extern size_t wcstombs(char *, const wchar_t *, size_t);
        extern int wctomb(char *, const wchar_t);
# 182 "include/stdlib.h" 3
        extern double atof(const char *);
        extern int atoi(const char *);
        extern long int atol(const char *);
        extern double strtod(const char *, char * *);
        extern long int strtol(const char *, char * *, int);
        extern unsigned long int strtoul(const char *, char * *, int);
        extern int rand(void);
        extern void srand(unsigned int);
        extern void *calloc(size_t, size_t);
        extern void free(void *);
        extern void *malloc(size_t);
        extern void *realloc(void *, size_t);
        extern void abort(void);
        extern int atexit(void (*)(void));
        extern void exit(int);
        extern char *getenv(const char *);
        extern int system(const char *);
        extern void *bsearch(const void *, const void *, size_t, size_t, int(*)(const void *,const void *));
        extern void qsort(void *, size_t, size_t, int(*)(const void *,const void *));
# 211 "include/stdlib.h" 3
        extern int abs(int);
        extern struct div_t div(int, int);
        extern long int labs(long int);
        extern struct ldiv_t ldiv(long int, long int);
# 235 "include/stdlib.h" 3
# 1 "include/sys/wait.h" 1 3
# 58 "include/sys/wait.h" 3
# 1 "/usr/include/sys/resource.h" 1 3
# 43 "/usr/include/sys/resource.h" 3
# 1 "/usr/include/sys/time.h" 1 3
# 39 "/usr/include/sys/time.h" 3
# 1 "include/sys/types.h" 1 3
# 40 "/usr/include/sys/time.h" 2 3
# 76 "/usr/include/sys/time.h" 3
struct timeval {
        time_t tv_sec;

        suseconds_t tv_usec;



};




struct itimerval {
        struct timeval it_interval;
        struct timeval it_value;
};







extern int getitimer(int, struct itimerval *);
extern int setitimer(int, const struct itimerval *, struct itimerval *);
extern int gettimeofday(struct timeval *, void *);
extern int utimes(const char *, const struct timeval *);
# 120 "/usr/include/sys/time.h" 3
typedef struct

fd_set

{
        long fds_bits[(32767/(sizeof(long) * 8)+1)];
} fd_set;
# 135 "/usr/include/sys/time.h" 3
extern int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
# 238 "/usr/include/sys/time.h" 3
struct timestruc_t {
        time_t tv_sec;
        suseconds_t tv_nsec;
};




struct itimerstruc_t {
        struct timestruc_t it_interval;
        struct timestruc_t it_value;
};

typedef struct timebasestruct {
        int flag;
        unsigned int tb_high;
        unsigned int tb_low;
        } timebasestruct_t;

int read_real_time(timebasestruct_t *, size_t);
int time_base_to_time(timebasestruct_t *, size_t);
# 383 "/usr/include/sys/time.h" 3
struct timezone {
        int tz_minuteswest;
        int tz_dsttime;
};
# 44 "/usr/include/sys/resource.h" 2 3
# 86 "/usr/include/sys/resource.h" 3
typedef unsigned long rlim_t;


struct rlimit {
        rlim_t rlim_cur;
        rlim_t rlim_max;
};





typedef unsigned long long rlim64_t;
struct rlimit64 {
        rlim64_t rlim_cur;
        rlim64_t rlim_max;
};
# 160 "/usr/include/sys/resource.h" 3
struct rusage
{
        struct timeval ru_utime;
        struct timeval ru_stime;
        long32int64_t ru_maxrss;
        long32int64_t ru_ixrss;
        long32int64_t ru_idrss;
        long32int64_t ru_isrss;
        long32int64_t ru_minflt;
        long32int64_t ru_majflt;
        long32int64_t ru_nswap;
        long32int64_t ru_inblock;
        long32int64_t ru_oublock;
        long32int64_t ru_msgsnd;
        long32int64_t ru_msgrcv;
        long32int64_t ru_nsignals;
        long32int64_t ru_nvcsw;
        long32int64_t ru_nivcsw;
};
# 188 "/usr/include/sys/resource.h" 3
struct rusage64
{
        struct timeval ru_utime;
        struct timeval ru_stime;
        long long ru_maxrss;
        long long ru_ixrss;
        long long ru_idrss;
        long long ru_isrss;
        long long ru_minflt;
        long long ru_majflt;
        long long ru_nswap;
        long long ru_inblock;
        long long ru_oublock;
        long long ru_msgsnd;
        long long ru_msgrcv;
        long long ru_nsignals;
        long long ru_nvcsw;
        long long ru_nivcsw;
};
# 236 "/usr/include/sys/resource.h" 3
extern int getpriority(int, id_t);
extern int setpriority(int, id_t, int);
extern int getrlimit(int, struct rlimit *);
extern int setrlimit(int, const struct rlimit *);


extern int getrlimit64(int, struct rlimit64 *);
extern int setrlimit64(int, const struct rlimit64 *);
# 262 "/usr/include/sys/resource.h" 3
extern int getrusage(int, struct rusage *);

extern int getrusage64(int, struct rusage64 *);
# 59 "include/sys/wait.h" 2 3



# 1 "include/sys/signal.h" 1 3
# 94 "include/sys/signal.h" 3
extern void (*signal(int, void (*)(int)))(int);







extern int raise(int);


typedef int sig_atomic_t;
# 221 "include/sys/signal.h" 3
union sigval
{
        void * sival_ptr;
        int sival_int;
};
# 238 "include/sys/signal.h" 3
typedef struct {
        int si_signo;
        int si_errno;
        int si_code;
        pid_t si_pid;
        uid_t si_uid;






        void *si_addr;
        int si_status;

        long si_band;


        union sigval si_value;







        int __pad[7];

} siginfo_t;







struct sigaction {
   union {






        void (*__su_handler)(int);



        void (*__su_sigaction) (int, siginfo_t *, void *);



    } sa_union;
        sigset_t sa_mask;
        int sa_flags;
};
# 309 "include/sys/signal.h" 3
# 1 "/usr/include/sys/context.h" 1 3
# 39 "/usr/include/sys/context.h" 3
# 1 "/usr/include/sys/m_param.h" 1 3
# 40 "/usr/include/sys/context.h" 2 3
# 1 "/usr/include/sys/mstsave.h" 1 3
# 24 "/usr/include/sys/mstsave.h" 3
# 1 "/usr/include/sys/m_param.h" 1 3
# 25 "/usr/include/sys/mstsave.h" 2 3
# 1 "/usr/include/sys/m_types.h" 1 3
# 26 "/usr/include/sys/mstsave.h" 2 3







struct

mstsave



{

        struct mstsave *prev;
        label_t *kjmpbuf;
        char *stackfix;
        char intpri;
        char backt;
        char rsvd[2];
        pid_t curid;

        int excp_type;
        ulong_t iar;
        ulong_t msr;
        ulong_t cr;
        ulong_t lr;
        ulong_t ctr;
        ulong_t xer;
        ulong_t mq;
        ulong_t tid;
        ulong_t fpscr;
        char fpeu;
        char fpinfo;
        char pad[2];

        ulong_t except[5];
        char pad1[4];
        ulong_t o_iar;
        ulong_t o_toc;
        ulong_t o_arg1;
        ulong_t excbranch;



        ulong_t fpscrx;
        ulong_t o_vaddr;
        ulong_t cachealign[7];
        adspace_t as;
        ulong_t gpr[32];
        double fpr[32];
# 117 "/usr/include/sys/mstsave.h" 3
};
# 207 "/usr/include/sys/mstsave.h" 3
extern char __pmap_stack[];
# 41 "/usr/include/sys/context.h" 2 3
# 85 "/usr/include/sys/context.h" 3
struct __context64 {
        unsigned long long gpr[32];
        unsigned long long msr;
        unsigned long long iar;
        unsigned long long lr;
        unsigned long long ctr;
        unsigned int cr;
        unsigned int xer;
        unsigned int fpscr;
        unsigned int fpscrx;
        unsigned long long except[1];
        double fpr[32];
        char fpeu;
        char fpinfo;
        char pad[2];
        int excp_type;
};
# 133 "/usr/include/sys/context.h" 3
struct sigcontext64 {
        int sc_onstack;
        unsigned int sc_mask1;
        unsigned int sc_mask2;
        int sc_uerror;
        struct __context64 sc_context;
};
# 225 "/usr/include/sys/context.h" 3
struct __jmpbuf {

        struct mstsave jmp_context;



};
# 248 "/usr/include/sys/context.h" 3
struct __sigcontext {

        int sc_onstack;
        sigset_t sc_mask;
        int sc_uerror;
        struct __jmpbuf sc_jmpbuf;






};




typedef struct {
        void *ss_sp;
        size_t ss_size;
        int ss_flags;
        int __pad[4];
} stack_t;







typedef struct __jmpbuf mcontext_t;

typedef struct ucontext_t {
        int __sc_onstack;
        sigset_t uc_sigmask;

        int __sc_uerror;
        mcontext_t uc_mcontext;
        struct ucontext_t *uc_link;
        stack_t uc_stack;
        int __pad[4];
} ucontext_t;
# 310 "include/sys/signal.h" 2 3




struct sigstack {
        void *ss_sp;
        int ss_onstack;
};
# 396 "include/sys/signal.h" 3
extern int sigmask(int);
# 542 "include/sys/signal.h" 3
struct sigevent {
        union sigval sigev_value;
        int sigev_signo;
        int sigev_notify;
        void (*sigev_notify_function)(union sigval);
        pthread_attr_t * sigev_notify_attributes;
};
# 565 "include/sys/signal.h" 3
struct osigevent {
        void *sevt_value;
        signal_t sevt_signo;
};
# 656 "include/sys/signal.h" 3
struct sigvec {
   union {






        void (*sv_handler)(int);



        void (*sv_sigaction) (int, siginfo_t *, void *);
   } sv_union;
        int sv_mask;
        int sv_flags;
};
# 730 "include/sys/signal.h" 3
extern int sigwait(const sigset_t *, int *);

extern int sigblock(int);
extern int siglocalmask(int, const sigset_t *);
extern int sigvec(int, struct sigvec *, struct sigvec *);






extern int sigsetmask(int);
# 780 "include/sys/signal.h" 3
extern int kill(pid_t, int);
extern int sigprocmask(int, const sigset_t *, sigset_t *);
extern int sigsuspend(const sigset_t *);

extern int sigaction(int, const struct sigaction *, struct sigaction *);

extern int sigemptyset(sigset_t *);
extern int sigfillset(sigset_t *);
extern int sigaddset(sigset_t *, int);
extern int sigdelset(sigset_t *, int);
extern int sigismember(const sigset_t *, int);
extern int sigpending(sigset_t *);


extern void (*bsd_signal (int, void (*)(int)))(int);
extern int killpg(pid_t, int);
extern int sighold(int);
extern int sigignore(int);
extern int siginterrupt(int, int);
extern int sigpause(int);
extern int sigrelse(int);
extern void (*sigset(int, void(*)(int)))(int);

extern int sigaltstack(const stack_t *, stack_t *);
extern int sigstack(struct sigstack *, struct sigstack *);



extern int pthread_kill(pthread_t, int);
extern int pthread_sigmask(int, const sigset_t *, sigset_t *);
extern int sigqueue(pid_t, int, const union sigval);
struct timespec;
extern int sigtimedwait(const sigset_t *, siginfo_t *, const struct timespec *);
extern int sigwaitinfo(const sigset_t *, siginfo_t *);
# 63 "include/sys/wait.h" 2 3
# 141 "include/sys/wait.h" 3
typedef enum {P_ALL, P_PID, P_PGID} idtype_t;
# 159 "include/sys/wait.h" 3
extern pid_t wait(int *);

extern pid_t waitpid(pid_t, int *, int);
# 173 "include/sys/wait.h" 3
extern int waitid(idtype_t, id_t, siginfo_t *, int);



extern pid_t wait3(int *, int, struct rusage *);



extern pid_t kwaitpid(int *, pid_t, int, struct rusage *, siginfo_t *);

extern pid_t kwaitpid64(int *, pid_t, int, struct rusage64 *, siginfo_t *);



extern pid_t wait364(int *, int, struct rusage64 *);
# 236 "include/stdlib.h" 2 3
# 308 "include/stdlib.h" 3
        extern double drand48(void);
        extern double erand48(unsigned short[]);
        extern long jrand48(unsigned short[]);
        extern void lcong48(unsigned short int *);
        extern long lrand48(void);
        extern long mrand48(void);
        extern long nrand48(unsigned short[]);
        extern unsigned short *seed48(unsigned short[]);
        extern void setkey(const char *);
        extern void srand48(long);

        extern int putenv(char *);
# 337 "include/stdlib.h" 3
        extern int rand_r(unsigned int *);
# 361 "include/stdlib.h" 3
        extern long a64l(const char *);
        extern char *ecvt(double, int, int *, int *);
        extern char *fcvt(double, int, int *, int *);
        extern char *gcvt(double, int, char *);
        extern int getsubopt(char **, char *const *, char **);
        extern int grantpt(int);
        extern char *initstate(unsigned, char *, size_t);
        extern char *l64a(long);
        extern char *mktemp(char *);
        extern int mkstemp(char *);
        extern char *ptsname(int);
        extern long random(void);
        extern char *realpath(const char *, char *);
        extern char *setstate(const char *);
        extern void srandom(unsigned);
        extern int unlockpt(int);
        extern int ttyslot(void);
        extern void *valloc(size_t);
# 451 "include/stdlib.h" 3
# 1 "/usr/include/sys/localedef.h" 1 3
# 39 "/usr/include/sys/localedef.h" 3
# 1 "/usr/include/sys/limits.h" 1 3
# 40 "/usr/include/sys/localedef.h" 2 3
# 1 "/usr/include/sys/lc_core.h" 1 3
# 36 "/usr/include/sys/lc_core.h" 3
# 1 "include/sys/types.h" 1 3
# 37 "/usr/include/sys/lc_core.h" 2 3
# 52 "/usr/include/sys/lc_core.h" 3
typedef struct {

    unsigned short
        __type_id,
        __magic;
    unsigned long
        __version;

    size_t __size;

} _LC_object_t;
# 102 "/usr/include/sys/lc_core.h" 3
typedef struct {

    _LC_object_t __hdr;



    int __catgets;
    int __catclose;


    int __compress;
    int __decompress;
    int __start_compress;
    int __end_compress;


    int __init;
    void *__data;
} _LC_core_car_t;

typedef struct {

    _LC_object_t __hdr;


    int __nl_langinfo;


    int __mbtowc;
    int __mbstowcs;
    int __wctomb;
    int __wcstombs;


    int __mblen;


    int __wcswidth;
    int __wcwidth;


    int __mbtopc;
    int __mbstopcs;
    int __pctomb;
    int __pcstombs;


    int __csid;
    int __wcsid;


    int __init;
    void *__data;
} _LC_core_charmap_t;


typedef struct {

    _LC_object_t __hdr;


    int __towupper;
    int __towlower;


    int __get_wctype;
    int __is_wctype;


    int __init;
    void *__data;
} _LC_core_ctype_t;

typedef struct {

    _LC_object_t __hdr;


    int __strcoll;
    int __strxfrm;


    int __wcscoll;
    int __wcsxfrm;


    int __fnmatch;


    int __regcomp;
    int __regerror;
    int __regexec;
    int __regfree;


    int __init;
    void *__data;
} _LC_core_collate_t;


typedef struct {

    _LC_object_t __hdr;


    int __nl_langinfo;


    int __strftime;
    int __strptime;


    int __wcsftime;


    int __init;
    void *__data;
} _LC_core_time_t;


typedef struct {

    _LC_object_t __hdr;


    int __nl_langinfo;


    int __strfmon;


    int __init;
    void *__data;
} _LC_core_monetary_t;


typedef struct {

    _LC_object_t __hdr;


    int __nl_langinfo;


    int __init;
    void *__data;
} _LC_core_numeric_t;


typedef struct {

    _LC_object_t __hdr;


    int __nl_langinfo;


    int __rpmatch;


    int __init;
    void *__data;
} _LC_core_resp_t;

typedef struct {

    _LC_object_t __hdr;


    int __nl_langinfo;
    int __localeconv;


    int __init;
    void *__data;
} _LC_core_locale_t;
# 41 "/usr/include/sys/localedef.h" 2 3
# 1 "include/locale.h" 1 3
# 60 "include/locale.h" 3
struct lconv {
   char *decimal_point;
   char *thousands_sep;
   char *grouping;
   char *int_curr_symbol;
   char *currency_symbol;
   char *mon_decimal_point;
   char *mon_thousands_sep;
   char *mon_grouping;
   char *positive_sign;
   char *negative_sign;
   char int_frac_digits;
   char frac_digits;
   char p_cs_precedes;
   char p_sep_by_space;
   char n_cs_precedes;
   char n_sep_by_space;
   char p_sign_posn;
   char n_sign_posn;


   char *left_parenthesis;
   char *right_parenthesis;





} ;
# 104 "include/locale.h" 3
struct lconv *localeconv(void);
char *setlocale(int, const char *);





typedef struct lconv lconv;
# 42 "/usr/include/sys/localedef.h" 2 3

# 1 "/usr/include/sys/localedef31.h" 1 3
# 39 "/usr/include/sys/localedef31.h" 3
typedef struct coldesc {
        short cd_stroff;
        short cd_repoff;
        short cd_cval;
        short cd_cuniq;
} coldesc_t;




typedef struct collation_table {
        short lc_version;
        short lc_length;
        char *lc_locale_name;
        int len_collate;
        short *lc_collate;
        int len_coluniq;
        short *lc_coluniq;
        int len_coldesc;
        coldesc_t *lc_coldesc;
        int len_strings;
        wchar_t *lc_strings;
        int high_cvalue;
} col_t;







typedef struct char_classification_table {
        short lc_version;
        short lc_length;
        short lc_code_type;
        short mb_cur_max;
        short mb_cur_min;
        short lc_dsp_width;
        char *lc_locale_name;
        int len_caseconv;
        wchar_t *lc_caseconv;
        int len_ctype;
        unsigned short *lc_ctype;
} ctype_t;





typedef struct lc_monetary_table {
        short lc_version;
        short lc_length;
        char *lc_locale_name;
        char *int_curr_symbol;
        char *currency_symbol;
        char *mon_decimal_point;
        char *mon_thousands_sep;
        char *mon_grouping;
        char *positive_sign;
        char *negative_sign;
        char int_frac_digits;
        char frac_digits;
        char p_cs_precedes;
        char p_sep_by_space;
        char n_cs_precedes;
        char n_sep_by_space;
        char p_sign_posn;
        char n_sign_posn;
} mon_t;





typedef struct numeric_table {
        short lc_version;
        short lc_length;
        char *lc_locale_name;
        char *decimal_point;
        char *thousands_sep;
        char *grouping;
} num_t;





typedef struct lc_messages_table {
        short lc_version;
        short lc_length;
        char *lc_locale_name;
        char *messages;
        char *yes_string;
        char *no_string;
} msg_t;





typedef struct lc_time_table {
        short lc_version;
        short lc_length;
        char *lc_locale_name;
        char *t_fmt;
        char *d_fmt;
        char *nlldate;
        char *d_t_fmt;
        char *abday;
        char *day;
        char *abmon;
        char *mon;




        char *misc;
        char *tstrs;
        char *tunits;



        char *year;
        char *am_pm;
} tim_t;






typedef struct wchar_mapping_table {
        short lc_version;
        short lc_length;
        char *lc_identifier;
} map_t;
# 183 "/usr/include/sys/localedef31.h" 3
typedef struct localeinfo_table {
        char lc_mag0, lc_mag1;
        short lc_version;
        short lc_code_type;
        short lc_length;
        col_t *lc_coltbl;
        ctype_t *lc_chrtbl;
        mon_t *lc_montbl;
        num_t *lc_numtbl;
        tim_t *lc_timtbl;
        msg_t *lc_msgtbl;
        map_t *lc_maptbl;
} loc_t;
# 44 "/usr/include/sys/localedef.h" 2 3
# 63 "/usr/include/sys/localedef.h" 3
typedef struct {

    _LC_core_charmap_t core;

    char *cm_csname;

    size_t cm_mb_cur_max;
    size_t cm_mb_cur_min;

    unsigned char
             cm_max_disp_width;


    unsigned
        char *cm_cstab;

    struct __LC_locale
             *loc_rec;

    void *__meth_ptr;
    void *__data_ptr;

} _LC_charmap_t;

typedef struct _LC_charmap_objhdl _LC_charmap_objhdl_t;

struct _LC_charmap_objhdl {
        _LC_charmap_t *obj;


        void *(**meth)();


struct _LC_locale_objhdl *loc_hdl;


};







typedef struct {

    _LC_core_monetary_t core;

    char *int_curr_symbol;
    char *currency_symbol;
    char *mon_decimal_point;
    char *mon_thousands_sep;
    char *mon_grouping;
    char *positive_sign;
    char *negative_sign;
    signed char int_frac_digits;
    signed char frac_digits;
    signed char p_cs_precedes;
    signed char p_sep_by_space;
    signed char n_cs_precedes;
    signed char n_sep_by_space;
    signed char p_sign_posn;
    signed char n_sign_posn;
    char *debit_sign;
    char *credit_sign;
    char *left_parenthesis;
    char *right_parenthesis;

    struct __LC_locale
             *loc_rec;

    void *__meth_ptr;
    void *__data_ptr;

} _LC_monetary_t;

typedef struct _LC_monetary_objhdl _LC_monetary_objhdl_t;
struct _LC_monetary_objhdl {
        _LC_monetary_t *obj;


        void *(**meth)();


struct _LC_locale_objhdl *loc_hdl;


};






typedef struct {

    _LC_core_numeric_t core;

    char *decimal_point;
    char *thousands_sep;
    unsigned
        char *grouping;

    struct __LC_locale
             *loc_rec;

    void *__meth_ptr;
    void *__data_ptr;

} _LC_numeric_t;

typedef struct _LC_numeric_objhdl _LC_numeric_objhdl_t;
struct _LC_numeric_objhdl {
        _LC_numeric_t *obj;


        void *(**meth)();


struct _LC_locale_objhdl *loc_hdl;


};







typedef struct {

    _LC_core_resp_t core;

    char *yesexpr;
    char *noexpr;
    char *yesstr;
    char *nostr;

    struct __LC_locale
             *loc_rec;

    void *__meth_ptr;
    void *__data_ptr;

} _LC_resp_t;

typedef struct _LC_resp_objhdl _LC_resp_objhdl_t;
struct _LC_resp_objhdl {
        _LC_resp_t *obj;


        void *(**meth)();


struct _LC_locale_objhdl *loc_hdl;


};







typedef struct {

    _LC_core_time_t core;

    char *d_fmt;
    char *t_fmt;
    char *d_t_fmt;
    char *t_fmt_ampm;
    char *abday[7];
    char *day[7];
    char *abmon[12];
    char *mon[12];
    char *am_pm[2];
    char *era;
    char *era_year;
    char *era_d_fmt;
    char *alt_digits;
    char *era_d_t_fmt;
    char *era_t_fmt;

    struct __LC_locale
             *loc_rec;

    void *__meth_ptr;
    void *__data_ptr;

} _LC_time_t;

typedef struct _LC_time_objhdl _LC_time_objhdl_t;
struct _LC_time_objhdl {
        _LC_time_t *obj;


        void *(**meth)();


struct _LC_locale_objhdl *loc_hdl;


};






typedef struct {
    unsigned
        short n[4 +1];
} _LC_weight_t;






typedef struct {

    char *ce_sym;
    _LC_weight_t ce_wgt;

} _LC_collel_t;






typedef struct {
    _LC_weight_t ct_wgt;


    _LC_collel_t *ct_collel;

} _LC_coltbl_t;
# 316 "/usr/include/sys/localedef.h" 3
typedef struct {
    char *tgt_wgt_str[4 +1];


} _LC_subs_t;







typedef struct {

    _LC_core_collate_t core;

    unsigned
        char co_nord;

    _LC_weight_t co_sort;


    wchar_t co_wc_min;
    wchar_t co_wc_max;

    wchar_t co_col_min;
    wchar_t co_col_max;

    _LC_coltbl_t *co_coltbl;

    unsigned
        char co_nsubs;
    _LC_subs_t *co_subs;

    unsigned
        short co_special;




    struct __LC_locale
                *loc_rec;

    void *__meth_ptr;
    void *__data_ptr;

} _LC_collate_t;

typedef struct _LC_collate_objhdl _LC_collate_objhdl_t;
struct _LC_collate_objhdl {
        _LC_collate_t *obj;


        void *(**meth)();


struct _LC_locale_objhdl *loc_hdl;


};
# 389 "/usr/include/sys/localedef.h" 3
typedef struct {

    char *name;
    unsigned
        int mask;

} _LC_classnm_t;







typedef struct {

  _LC_core_ctype_t core;


  wchar_t min_wc;
  wchar_t max_wc;


  wchar_t *upper;
  wchar_t *lower;


  unsigned
      int *mask;
  unsigned
      int *qmask;
  unsigned
      char *qidx;


  unsigned
      char nclasses;
 _LC_classnm_t *classnms;

    struct __LC_locale
               *loc_rec;

    void *__meth_ptr;
    void *__data_ptr;

} _LC_ctype_t;

typedef struct _LC_ctype_objhdl _LC_ctype_objhdl_t;
struct _LC_ctype_objhdl {
        _LC_ctype_t *obj;


        void *(**meth)();


struct _LC_locale_objhdl *loc_hdl;


};
# 462 "/usr/include/sys/localedef.h" 3
typedef struct __LC_locale {

    _LC_core_locale_t core;

    char *nl_info[63];
    struct lconv *nl_lconv;

    _LC_charmap_objhdl_t lc_charmap;
    _LC_collate_objhdl_t lc_collate;
    _LC_ctype_objhdl_t lc_ctype;
    _LC_monetary_objhdl_t lc_monetary;
    _LC_numeric_objhdl_t lc_numeric;
    _LC_resp_objhdl_t lc_resp;
    _LC_time_objhdl_t lc_time;

    struct __LC_locale *loc_rec;


    void *__meth_ptr;
    void *__data_ptr;

    char *__nl_yesstr;
    char *__nl_nostr;
    char *__nl_crncystr;

} _LC_locale_t;

typedef struct _LC_locale_objhdl _LC_locale_objhdl_t;
struct _LC_locale_objhdl {
        _LC_locale_t *obj;


        void *(**meth)();


struct _LC_locale_objhdl *loc_hdl;


};
# 509 "/usr/include/sys/localedef.h" 3
typedef struct _LC_object_handle _LC_object_handle_t;
struct _LC_object_handle {
    union {
        _LC_object_t lc_object;
        _LC_locale_objhdl_t lc_locale;
        _LC_charmap_objhdl_t lc_charmap;
        _LC_collate_objhdl_t lc_collate;
        _LC_ctype_objhdl_t lc_ctype;
        _LC_monetary_objhdl_t lc_monetary;
        _LC_numeric_objhdl_t lc_numeric;
        _LC_resp_objhdl_t lc_resp;
        _LC_time_objhdl_t lc_time;
    } obj;


    void *(**meth)();


struct _LC_locale_objhdl *loc_hdl;


};


typedef struct {
    _LC_object_t hdr;
    _LC_locale_objhdl_t handle;
} _LC_load_object_t;







extern _LC_charmap_objhdl_t __lc_charmap;
extern _LC_collate_objhdl_t __lc_collate;
extern _LC_ctype_objhdl_t __lc_ctype;
extern _LC_monetary_objhdl_t __lc_monetary;
extern _LC_numeric_objhdl_t __lc_numeric;
extern _LC_resp_objhdl_t __lc_resp;
extern _LC_time_objhdl_t __lc_time;
extern _LC_locale_objhdl_t __lc_locale;
# 452 "include/stdlib.h" 2 3
# 464 "include/stdlib.h" 3
extern char *optarg;
extern int optind;
extern int opterr;
# 480 "include/stdlib.h" 3
        extern float atoff(char *);
        extern float strtof(char *, char **);
        extern void imul_dbl(long, long, long *);
        extern void umul_dbl(unsigned long, unsigned long, unsigned long *);
# 504 "include/stdlib.h" 3
        extern double wcstod(const wchar_t *, wchar_t **);
        extern long int wcstol(const wchar_t *, wchar_t **, int);
        extern unsigned long int wcstoul(const wchar_t *, wchar_t **, int);

        extern int rpmatch(const char *);
        extern int clearenv(void);
        extern int getopt(int, char* const*, const char*);
        extern char *getpass(const char *);
# 531 "include/stdlib.h" 3
typedef struct lldiv_t {
     long long int quot;
     long long int rem ;
} lldiv_t;
# 545 "include/stdlib.h" 3
extern long long int llabs( long long int );
extern lldiv_t lldiv( long long int, long long int );
extern long long int strtoll(
     const char *,
     char **,
     int );
extern unsigned long long int strtoull(
     const char *,
     char **,
     int );
# 81 "../../gcc/tsystem.h" 2
# 1 "/usr/include/unistd.h" 1 3
# 54 "/usr/include/unistd.h" 3
# 1 "/usr/include/sys/access.h" 1 3
# 35 "/usr/include/sys/access.h" 3
# 1 "/usr/include/standards.h" 1 3
# 36 "/usr/include/sys/access.h" 2 3
# 86 "/usr/include/sys/access.h" 3
        extern char *acl_get(char *);
        extern char *acl_fget(int);
        extern int acl_chg(char *, int, int, int);
        extern int acl_fchg(int, int, int, int);
        extern int acl_put(char *, char *, int);
        extern int acl_fput(int, char *, int);
        extern int acl_set(char *, int, int, int);
        extern int acl_fset(int, int, int, int);
        extern int accessx(char *, int, int);
# 55 "/usr/include/unistd.h" 2 3
# 134 "/usr/include/unistd.h" 3
extern int access(const char *, int);
extern unsigned int alarm(unsigned int);
extern int chdir(const char *);
extern int chown(const char *, uid_t, gid_t);
extern int close(int);
extern char *ctermid(char *);
extern int dup(int);
extern int dup2(int, int);
extern int execl(const char *, const char *, ...);
extern int execv(const char *, char *const []);
extern int execle(const char *, const char *, ...);
extern int execve(const char *, char *const [], char *const []);
extern int execlp(const char *, const char *, ...);
extern int execvp(const char *, char *const []);
extern void _exit(int);
extern pid_t fork(void);
extern long fpathconf(int, int);
extern char *getcwd(char *, size_t);
extern gid_t getegid(void);
extern uid_t geteuid(void);
extern gid_t getgid(void);
extern int getgroups(int, gid_t []);
extern char *getlogin(void);

extern pid_t getpgrp(void);

extern pid_t getpid(void);
extern pid_t getppid(void);
extern uid_t getuid(void);
extern int isatty(int);
extern int link(const char *, const char *);
extern off_t lseek(int, off_t, int);

extern off64_t lseek64(int, off64_t, int);

extern long pathconf(const char *, int);
extern int pause(void);
extern int pipe(int []);

extern int pthread_atfork(void (*)(void), void (*)(void), void (*)(void));

extern ssize_t read(int, void *, size_t);
extern int rmdir(const char *);
extern int setgid(gid_t);
extern int setpgid(pid_t, pid_t);
extern pid_t setsid(void);
extern int setuid(uid_t);
extern unsigned int sleep(unsigned int);
extern long sysconf(int);
extern pid_t tcgetpgrp(int);
extern int tcsetpgrp(int, pid_t);
extern char *ttyname(int);
extern int unlink(const char *);
extern ssize_t write(int, const void *, size_t);
# 236 "/usr/include/unistd.h" 3
extern char *optarg;
extern int optind, opterr, optopt;
# 251 "/usr/include/unistd.h" 3
        extern size_t confstr(int, char*, size_t);
        extern char *crypt(const char *, const char *);
        extern void encrypt(char *, int);
        extern int fsync(int);
        extern int getopt(int, char* const*, const char*);
        extern int nice(int);
        extern void swab(const void *, void *, ssize_t);
        extern int chroot(const char *);
        extern char *cuserid(char *);
        extern char *getpass(const char *);
# 541 "/usr/include/unistd.h" 3
# 1 "/usr/include/sys/lockf.h" 1 3
# 45 "/usr/include/sys/lockf.h" 3
# 1 "/usr/include/sys/stat.h" 1 3
# 48 "/usr/include/sys/stat.h" 3
# 1 "/usr/include/sys/mode.h" 1 3
# 41 "/usr/include/sys/mode.h" 3
# 1 "/usr/include/standards.h" 1 3
# 42 "/usr/include/sys/mode.h" 2 3
# 49 "/usr/include/sys/stat.h" 2 3
# 61 "/usr/include/sys/stat.h" 3
struct stat
{
        dev_t st_dev;




        ino_t st_ino;




        mode_t st_mode;

        nlink_t st_nlink;
        ushort_t st_flag;






        uid_t st_uid;
        gid_t st_gid;


        dev_t st_rdev;



        off_t st_size;



        time_t st_atime;
        int st_spare1;
        time_t st_mtime;
        int st_spare2;
        time_t st_ctime;
        int st_spare3;
        blksize_t st_blksize;
        blkcnt_t st_blocks;


        int st_vfstype;
        uint_t st_vfs;
        uint_t st_type;
        uint_t st_gen;



        uint_t st_reserved[9];
# 122 "/usr/include/sys/stat.h" 3
};
# 173 "/usr/include/sys/stat.h" 3
struct stat64
{
        dev_t st_dev;




        ino_t st_ino;
        mode_t st_mode;
        nlink_t st_nlink;
        ushort_t st_flag;
        uid_t st_uid;
        gid_t st_gid;
        dev_t st_rdev;


        soff_t st_ssize;
        time_t st_atime;
        int st_spare1;
        time_t st_mtime;
        int st_spare2;
        time_t st_ctime;
        int st_spare3;
        blksize_t st_blksize;
        blkcnt_t st_blocks;


        int st_vfstype;
        uint_t st_vfs;
        uint_t st_type;
        uint_t st_gen;
        uint_t st_reserved[10];



        off64_t st_size;

};
# 223 "/usr/include/sys/stat.h" 3
        extern mode_t umask(mode_t);
# 251 "/usr/include/sys/stat.h" 3
        extern int mkdir(const char *, mode_t);
        extern int stat(const char *, struct stat *);
        extern int fstat(int, struct stat *);

        extern int stat64(const char *, struct stat64 *);
        extern int fstat64(int, struct stat64 *);


        extern int chmod(const char *, mode_t);


        extern int fchmod(int, mode_t);
        extern int lstat(const char *, struct stat *);

        extern int lstat64(const char *, struct stat64 *);


        extern int mknod(const char *, mode_t, dev_t);





        extern int mkfifo(const char *, mode_t);
# 46 "/usr/include/sys/lockf.h" 2 3
# 62 "/usr/include/sys/lockf.h" 3
        extern int lockf (int, int, off_t);

        extern int lockf64 (int, int, off64_t);
# 542 "/usr/include/unistd.h" 2 3
# 569 "/usr/include/unistd.h" 3
        extern int brk(void *);
        extern int fchdir(int);
        extern int fchown(int, uid_t, gid_t);
        extern int ftruncate(int, off_t);

        extern int ftruncate64(int, off64_t);

        extern int getdtablesize(void);
        extern int gethostname(char *, size_t);
        extern long gethostid(void);
        extern int getpagesize(void);
        extern pid_t getpgid(pid_t);
        extern pid_t getsid(pid_t);
        extern char *getwd(char *);
        extern int lchown(const char *, uid_t, gid_t);
        extern int readlink(const char *, char *, size_t);

        extern void *sbrk(intptr_t);




        extern pid_t setpgrp(void);

        extern int setregid(gid_t, gid_t);
        extern int setreuid(uid_t, uid_t);
        extern int symlink(const char *, const char *);
        extern void sync(void);
        extern int truncate(const char *, off_t);

        extern int truncate64(const char *, off64_t);

        extern useconds_t ualarm(useconds_t, useconds_t);
        extern int usleep(useconds_t);
        extern pid_t vfork(void);

        extern int getlogin_r(char *, size_t);
        extern int ttyname_r(int, char *, size_t);






        extern ssize_t pread(int, void *, size_t, off_t);
        extern ssize_t pwrite(int, const void *, size_t, off_t);

        extern ssize_t pread64(int, void *, size_t, off64_t);
        extern ssize_t pwrite64(int, const void *, size_t, off64_t);
# 627 "/usr/include/unistd.h" 3
extern char **environ;


        extern pid_t f_fork();
# 646 "/usr/include/unistd.h" 3
        extern int ioctl(int, int, ...);






        extern int setgroups(int, gid_t []);

        extern int readx(int, char*, unsigned, long);
        extern int writex(int, char*, unsigned, long);





        extern off_t fclear(int, off_t);
        extern int fsync_range(int, int, off_t, off_t);

        extern off64_t fclear64(int, off64_t);
        extern int fsync_range64(int, int, off64_t, off64_t);

        extern offset_t llseek(int, offset_t, int);
        extern int fdatasync(int);
        extern int finfo(const char *, int, void *, int);
        extern int ffinfo(int, int, void *, int);
# 82 "../../gcc/tsystem.h" 2


# 1 "include/limits.h" 1 3
# 11 "include/limits.h" 3
# 1 "include/syslimits.h" 1 3






# 1 "include/limits.h" 1 3
# 130 "include/limits.h" 3
# 1 "/home/mark/dev/install/powerpc-ibm-aix4.3.2.0/lib/gcc-lib/powerpc-ibm-aix4.3.2.0/2.97/include/limits.h" 1 3
# 130 "/home/mark/dev/install/powerpc-ibm-aix4.3.2.0/lib/gcc-lib/powerpc-ibm-aix4.3.2.0/2.97/include/limits.h" 3
# 1 "/usr/include/limits.h" 1 3
# 30 "/usr/include/limits.h" 3
# 1 "/usr/include/sys/limits.h" 1 3
# 31 "/usr/include/limits.h" 2 3
# 131 "/home/mark/dev/install/powerpc-ibm-aix4.3.2.0/lib/gcc-lib/powerpc-ibm-aix4.3.2.0/2.97/include/limits.h" 2 3
# 131 "include/limits.h" 2 3
# 8 "include/syslimits.h" 2 3
# 12 "include/limits.h" 2 3
# 85 "../../gcc/tsystem.h" 2


# 1 "/usr/include/time.h" 1 3
# 70 "/usr/include/time.h" 3
struct tm {
        int tm_sec;
        int tm_min;
        int tm_hour;
        int tm_mday;
        int tm_mon;
        int tm_year;
        int tm_wday;
        int tm_yday;
        int tm_isdst;
};
# 110 "/usr/include/time.h" 3
    extern size_t strftime(char *, size_t, const char *, const struct tm *);
    extern clock_t clock(void);
    extern double difftime(time_t, time_t);
    extern time_t mktime(struct tm *);
    extern time_t time(time_t *);
    extern char *asctime(const struct tm *);
    extern char *ctime(const time_t *);
    extern struct tm *gmtime(const time_t *);
    extern struct tm *localtime(const time_t *);
# 128 "/usr/include/time.h" 3
    extern char *asctime_r(const struct tm *, char *);
    extern char *ctime_r(const time_t *, char *);
    extern struct tm *gmtime_r(const time_t *, struct tm *);
    extern struct tm *localtime_r(const time_t *, struct tm *);
# 156 "/usr/include/time.h" 3
extern char *tzname[];




    extern void tzset(void);





    extern long timezone;
    extern int daylight;



    extern char *strptime(const char *, const char *, struct tm *);




        extern int getdate_err;



        extern struct tm *getdate(const char *);




struct timespec {
        time_t tv_sec;
        long tv_nsec;
};

struct itimerspec {
        struct timespec it_interval;
        struct timespec it_value;
};




extern int clock_getres(clockid_t, struct timespec *);
extern int clock_gettime(clockid_t, struct timespec *);
extern int clock_settime(clockid_t, const struct timespec *);
extern int nanosleep(const struct timespec *, struct timespec *);

extern int timer_create(clockid_t, struct sigevent *, timer_t *);



extern int timer_delete(timer_t);
extern int timer_gettime(timer_t, struct itimerspec *);
extern int timer_getoverrun(timer_t);
extern int timer_settime(timer_t, int, const struct itimerspec *, struct itimerspec *);





# 1 "include/stddef.h" 1 3
# 218 "/usr/include/time.h" 2 3
# 227 "/usr/include/time.h" 3
        extern unsigned char *NLctime(long *);
        extern unsigned char *NLasctime(struct tm *);
        extern char *NLstrtime(char *, size_t, const char *, const struct tm *);
# 88 "../../gcc/tsystem.h" 2
# 38 "../../gcc/libgcc2.c" 2

# 1 "../../gcc/machmode.h" 1
# 40 "../../gcc/libgcc2.c" 2
# 1 "../../gcc/defaults.h" 1
# 41 "../../gcc/libgcc2.c" 2






# 1 "include/stdio.h" 1 3
# 48 "../../gcc/libgcc2.c" 2


# 1 "../../gcc/libgcc2.h" 1
# 25 "../../gcc/libgcc2.h"
extern int __gcc_bcmp (const unsigned char *, const unsigned char *, size_t);
extern void *__builtin_saveregs (void);
extern void __dummy (void);
extern void __clear_cache (char *, char *);
extern void __pure_virtual (void) __attribute__ ((__noreturn__));
extern void __terminate (void) __attribute__ ((__noreturn__));
extern void __default_terminate (void) __attribute__ ((__noreturn__));
extern void *__throw_type_match (void *, void *, void *);
extern void __empty (void);
extern void *__get_eh_context (void);
extern void **__get_eh_info (void);
extern void ***__get_dynamic_handler_chain (void);
extern int __eh_rtime_match (void *);
extern void __unwinding_cleanup (void);
extern void __rethrow (void *);
extern void __throw (void);
extern void __sjthrow (void) __attribute__ ((__noreturn__));
extern void __sjpopnthrow (void) __attribute__ ((__noreturn__));
extern void __eprintf (const char *, const char *, unsigned int, const char *)
  __attribute__ ((__noreturn__));
extern void *__eh_alloc (size_t);
extern void __eh_free (void *);

struct bb;
extern void __bb_exit_func (void);
extern void __bb_init_func (struct bb *);
extern void __bb_fork_func (void);
extern void __bb_trace_func (void);
extern void __bb_trace_ret (void);
extern void __bb_init_trace_func (struct bb *, unsigned long);

struct exception_descriptor;
extern short int __get_eh_table_language (struct exception_descriptor *);
extern short int __get_eh_table_version (struct exception_descriptor *);
# 85 "../../gcc/libgcc2.h"
typedef int QItype __attribute__ ((mode (QI)));
typedef unsigned int UQItype __attribute__ ((mode (QI)));
typedef int HItype __attribute__ ((mode (HI)));
typedef unsigned int UHItype __attribute__ ((mode (HI)));


typedef int SItype __attribute__ ((mode (SI)));
typedef unsigned int USItype __attribute__ ((mode (SI)));


typedef int DItype __attribute__ ((mode (DI)));
typedef unsigned int UDItype __attribute__ ((mode (DI)));
# 107 "../../gcc/libgcc2.h"
typedef float SFtype __attribute__ ((mode (SF)));
typedef float DFtype __attribute__ ((mode (DF)));
# 140 "../../gcc/libgcc2.h"
typedef int word_type __attribute__ ((mode (__word__)));
# 229 "../../gcc/libgcc2.h"
extern DItype __muldi3 (DItype, DItype);
extern DItype __divdi3 (DItype, DItype);
extern UDItype __udivdi3 (UDItype, UDItype);
extern UDItype __umoddi3 (UDItype, UDItype);
extern DItype __moddi3 (DItype, DItype);




extern UDItype __udivmoddi4 (UDItype, UDItype, UDItype *);




extern DItype __negdi2 (DItype);


extern DItype __lshrdi3 (DItype, word_type);
extern DItype __ashldi3 (DItype, word_type);
extern DItype __ashrdi3 (DItype, word_type);
extern DItype __ffsdi2 (DItype);




extern USItype __udiv_w_sdiv (USItype *, USItype, USItype, USItype);


extern word_type __cmpdi2 (DItype, DItype);
extern word_type __ucmpdi2 (DItype, DItype);

extern SItype __absvsi2 (SItype);
extern DItype __absvdi2 (DItype);
extern SItype __addvsi3 (SItype, SItype);
extern DItype __addvdi3 (DItype, DItype);
extern SItype __subvsi3 (SItype, SItype);
extern DItype __subvdi3 (DItype, DItype);
extern SItype __mulvsi3 (SItype, SItype);
extern DItype __mulvdi3 (DItype, DItype);
extern SItype __negvsi2 (SItype);
extern DItype __negvdi2 (DItype);


extern DItype __fixdfdi (DFtype);
extern DItype __fixsfdi (SFtype);
extern DFtype __floatdidf (DItype);
extern SFtype __floatdisf (DItype);
extern USItype __fixunsdfsi (DFtype);
extern USItype __fixunssfsi (SFtype);
extern DItype __fixunsdfdi (DFtype);
extern DItype __fixunssfdi (SFtype);
# 299 "../../gcc/libgcc2.h"
  struct DWstruct {SItype high, low;};
# 308 "../../gcc/libgcc2.h"
typedef union
{
  struct DWstruct s;
  DItype ll;
} DWunion;

# 1 "../../gcc/longlong.h" 1
# 315 "../../gcc/libgcc2.h" 2
# 51 "../../gcc/libgcc2.c" 2
# 3139 "../../gcc/libgcc2.c"
# 1 "../../gcc/gthr.h" 1
# 102 "../../gcc/gthr.h"
# 1 "../../gcc/gthr-single.h" 1
# 34 "../../gcc/gthr-single.h"
typedef int __gthread_mutex_t;
# 204 "../../gcc/gthr-single.h"
static __inline__ int
__gthread_active_p (void)
{
  return 0;
}

static __inline__ int
__gthread_mutex_lock (__gthread_mutex_t *mutex __attribute__ ((__unused__)))
{
  return 0;
}

static __inline__ int
__gthread_mutex_trylock (__gthread_mutex_t *mutex __attribute__ ((__unused__)))
{
  return 0;
}

static __inline__ int
__gthread_mutex_unlock (__gthread_mutex_t *mutex __attribute__ ((__unused__)))
{
  return 0;
}
# 103 "../../gcc/gthr.h" 2
# 3140 "../../gcc/libgcc2.c" 2



void
__default_terminate (void)
{
  abort ();
}

void (*__terminate_func)(void) __attribute__ ((__noreturn__)) =
  __default_terminate;

void __attribute__((__noreturn__))
__terminate (void)
{
  (*__terminate_func)();
}

void *
__throw_type_match (void *catch_type, void *throw_type, void *obj)
{




 if (strcmp ((const char *)catch_type, (const char *)throw_type) == 0)
   return obj;
 return 0;
}

void
__empty (void)
{
}




# 1 "../../gcc/eh-common.h" 1
# 57 "../../gcc/eh-common.h"
struct eh_context
{
  void *handler_label;
  void **dynamic_handler_chain;

  void *info;

  void *table_index;

  char alloc_buffer[192]
      __attribute__((__aligned__(16)));
  unsigned alloc_mask;
};



typedef struct old_exception_table
{
  void *start_region;
  void *end_region;
  void *exception_handler;
} old_exception_table;

typedef struct exception_table
{
  void *start_region;
  void *end_region;
  void *exception_handler;
  void *match_info;
} exception_table;




typedef struct exception_lang_info
{
  short language;
  short version;
} exception_lang_info;
# 106 "../../gcc/eh-common.h"
typedef struct exception_descriptor
{
  void *runtime_id_field;
  exception_lang_info lang;
  exception_table table[1];
} exception_descriptor;

struct __eh_info;
# 123 "../../gcc/eh-common.h"
typedef void * (*__eh_matcher) (struct __eh_info *, void *, struct exception_descriptor *);
# 134 "../../gcc/eh-common.h"
typedef struct __eh_info
{
  __eh_matcher match_function;
  short language;
  short version;
} __eh_info;




enum exception_source_language
  {
    EH_LANG_C89 = 0x0001,
    EH_LANG_C = 0x0002,
    EH_LANG_Ada83 = 0x0003,
    EH_LANG_C_plus_plus = 0x0004,
    EH_LANG_Cobol74 = 0x0005,
    EH_LANG_Cobol85 = 0x0006,
    EH_LANG_Fortran77 = 0x0007,
    EH_LANG_Fortran90 = 0x0008,
    EH_LANG_Pascal83 = 0x0009,
    EH_LANG_Modula2 = 0x000a,
    EH_LANG_Java = 0x000b,
    EH_LANG_Mips_Assembler = 0x8001
  };
# 3179 "../../gcc/libgcc2.c" 2

# 1 "include/stdio.h" 1 3
# 3181 "../../gcc/libgcc2.c" 2
# 3225 "../../gcc/libgcc2.c"
static struct eh_context *eh_context_initialize (void);
static struct eh_context *eh_context_static (void);




static struct eh_context *(*get_eh_context) (void) = &eh_context_initialize;




void *
__get_eh_context (void)
{
  return (void *) (*get_eh_context) ();
}



void **
__get_eh_info (void)
{
  struct eh_context *eh = (*get_eh_context) ();
  return &eh->info;
}


static int dwarf_reg_size_table_initialized = 0;
static char dwarf_reg_size_table[77];

static void
init_reg_size_table (void)
{
  __builtin_init_dwarf_reg_size_table (dwarf_reg_size_table);
  dwarf_reg_size_table_initialized = 1;
}
# 3280 "../../gcc/libgcc2.c"
static struct eh_context *
eh_context_initialize (void)
{
# 3309 "../../gcc/libgcc2.c"
  get_eh_context = &eh_context_static;


  init_reg_size_table ();




  return (*get_eh_context) ();
}



static struct eh_context *
eh_context_static (void)
{
  static struct eh_context eh;
  static int initialized;
  static void *top_elt[2];

  if (! initialized)
    {
      initialized = 1;
      memset (&eh, 0, sizeof eh);
      eh.dynamic_handler_chain = top_elt;
    }

  fprintf ((&_iob[2]), "libgcc: %x\n", &(eh.info));

  return &eh;
}
# 3370 "../../gcc/libgcc2.c"
void *
__eh_alloc (size_t size)
{
  void *p;

  if (!size)
    abort();
  p = malloc (size);
  if (p == 0)
    {
      struct eh_context *eh = __get_eh_context ();
      unsigned blocks = (size + 16 - 1) / 16;
      unsigned real_mask = eh->alloc_mask | (eh->alloc_mask << 1);
      unsigned our_mask;
      unsigned ix;

      if (blocks > 192 / 16)
        __terminate ();
      blocks += blocks == 1;
      our_mask = (1 << blocks) - 1;

      for (ix = 192 / 16 - blocks; ix; ix--)
        if (! ((real_mask >> ix) & our_mask))
          {

            p = &eh->alloc_buffer[ix * 16];
            eh->alloc_mask |= (our_mask >> 1) << ix;
            return p;
          }
      __terminate ();
    }
  return p;
}



void
__eh_free (void *p)
{
  struct eh_context *eh = __get_eh_context ();

  ptrdiff_t diff = (char *)p - &eh->alloc_buffer[0];
  if (diff >= 0 && diff < 192)
    {
      unsigned mask = eh->alloc_mask;
      unsigned bit = 1 << (diff / 16);

      do
        {
          mask ^= bit;
          bit <<= 1;
        }
      while (mask & bit);
      eh->alloc_mask = mask;
    }
  else
    free (p);
}
# 3442 "../../gcc/libgcc2.c"
void ***
__get_dynamic_handler_chain (void)
{
  struct eh_context *eh = (*get_eh_context) ();
  return &eh->dynamic_handler_chain;
}
# 3457 "../../gcc/libgcc2.c"
void
__sjthrow (void)
{
  struct eh_context *eh = (*get_eh_context) ();
  void ***dhc = &eh->dynamic_handler_chain;
  void *__jmpbuf;
  void (*func)(void *, int);
  void *arg;

  void ***cleanup = (void***)&(*dhc)[1];


  if (cleanup[0])
    {
      double store[200];
      void **buf = (void**)store;
      buf[1] = 0;
      buf[0] = (*dhc);





      if (! __builtin_setjmp (&buf[2]))

        {
          *dhc = buf;
          while (cleanup[0])
            {
              func = (void(*)(void*, int))cleanup[0][1];
              arg = (void*)cleanup[0][2];


              cleanup[0] = (void **)cleanup[0][0];

              (*func)(arg, 2);
            }
          *dhc = buf[0];
        }

      else
        {
          __terminate ();
        }
    }




  if (! eh->info || (*dhc)[0] == 0)
    __terminate ();



  __jmpbuf = &(*dhc)[2];


  *dhc = (void**)(*dhc)[0];






  __builtin_longjmp (__jmpbuf, 1);

}






void
__sjpopnthrow (void)
{
  struct eh_context *eh = (*get_eh_context) ();
  void ***dhc = &eh->dynamic_handler_chain;
  void (*func)(void *, int);
  void *arg;

  void ***cleanup = (void***)&(*dhc)[1];


  if (cleanup[0])
    {
      double store[200];
      void **buf = (void**)store;
      buf[1] = 0;
      buf[0] = (*dhc);





      if (! __builtin_setjmp (&buf[2]))

        {
          *dhc = buf;
          while (cleanup[0])
            {
              func = (void(*)(void*, int))cleanup[0][1];
              arg = (void*)cleanup[0][2];


              cleanup[0] = (void **)cleanup[0][0];

              (*func)(arg, 2);
            }
          *dhc = buf[0];
        }

      else
        {
          __terminate ();
        }
    }


  *dhc = (void**)(*dhc)[0];

  __sjthrow ();
}



int
__eh_rtime_match (void *rtime)
{
  void *info;
  __eh_matcher matcher;
  void *ret;

  info = *(__get_eh_info ());
  matcher = ((__eh_info *)info)->match_function;
  if (! matcher)
    {

      fprintf ((&_iob[2]), "Internal Compiler Bug: No runtime type matcher.");

      return 0;
    }
  ret = (*matcher) (info, rtime, (void *)0);
  return (ret != ((void *)0));
}
# 3616 "../../gcc/libgcc2.c"
short
__get_eh_table_version (exception_descriptor *table)
{
  return table->lang.version;
}



short
__get_eh_table_language (exception_descriptor *table)
{
  return table->lang.language;
}
# 3638 "../../gcc/libgcc2.c"
static void *
old_find_exception_handler (void *pc, old_exception_table *table)
{
  if (table)
    {
      int pos;
      int best = -1;



      for (pos = 0; table[pos].start_region != (void *) -1; ++pos)
        {
          if (table[pos].start_region <= pc && table[pos].end_region > pc)
            {


              if (best == -1 || (table[pos].end_region <= table[best].end_region
                        && table[pos].start_region >= table[best].start_region))
                best = pos;
            }

          else if (best >= 0 && table[pos].start_region > pc)
            break;
        }
      if (best != -1)
        return table[best].exception_handler;
    }

  return (void *) 0;
}
# 3682 "../../gcc/libgcc2.c"
static void *
find_exception_handler (void *pc, exception_descriptor *table,
                        __eh_info *eh_info, int rethrow, int *cleanup)
{

  void *retval = ((void *)0);
  *cleanup = 1;
  if (table)
    {
      int pos = 0;



      exception_table *tab = &(table->table[0]);


      if (rethrow)
        {

          pos = ((exception_table *) pc) - tab;
          pc = ((exception_table *) pc)->end_region - 1;




          if (tab[pos].start_region != (void *) -1)
            pos++;
        }
      else
        pc--;



      for ( ; tab[pos].start_region != (void *) -1; pos++)
        {
          fprintf ((&_iob[2]), "%x %x %x\n", pc, tab[pos].start_region,
                   tab[pos].end_region);
          if (tab[pos].start_region <= pc && tab[pos].end_region > pc)
            {
              if (tab[pos].match_info)
                {
                  __eh_matcher matcher = eh_info->match_function;

                  if (matcher)
                    {
                      void *ret = (*matcher)((void *) eh_info,
                                             tab[pos].match_info, table);
                      if (ret)
                        {
                          if (retval == ((void *)0))
                            retval = tab[pos].exception_handler;
                          *cleanup = 0;
                          break;
                        }
                    }
                }
              else
                {
                  if (retval == ((void *)0))
                    retval = tab[pos].exception_handler;
                }
            }
        }
    }
  return retval;
}






# 1 "../../gcc/frame.h" 1
# 28 "../../gcc/frame.h"
typedef struct frame_state
{
  void *cfa;
  void *eh_ptr;
  long cfa_offset;
  long args_size;
  long reg_or_offset[77 +1];
  unsigned short cfa_reg;
  unsigned short retaddr_column;
  char saved[77 +1];
  long base_offset;
  char indirect;
} frame_state;
# 54 "../../gcc/frame.h"
struct object {



  void *pc_begin;
  void *pc_end;
  struct dwarf_fde *fde_begin;



  struct dwarf_fde **fde_array;
  size_t count;
  struct object *next;
};






extern void __register_frame (void * );
extern void __register_frame_table (void *);
extern void __deregister_frame (void *);




extern void __register_frame_info (void *, struct object *);




extern void __register_frame_info_table (void *, struct object *);



extern void *__deregister_frame_info (void *);






extern struct frame_state *__frame_state_for (void *, struct frame_state *);
# 3755 "../../gcc/libgcc2.c" 2






typedef int ptr_type __attribute__ ((mode (pointer)));
# 3789 "../../gcc/libgcc2.c"
static __inline__ int
in_reg_window (int reg __attribute__ ((__unused__)),
               frame_state *udata __attribute__ ((__unused__)))
{
  return 0;
}





static word_type *
get_reg_addr (unsigned reg, frame_state *udata, frame_state *sub_udata)
{
  while (udata->saved[reg] == 2)
    {
      reg = udata->reg_or_offset[reg];
      if (in_reg_window (reg, udata))
        {
          udata = sub_udata;
          sub_udata = ((void *)0);
        }
    }
  if (udata->saved[reg] == 1)
    return (word_type *)(udata->cfa + udata->reg_or_offset[reg]);
  else
    abort ();
}




static __inline__ void *
get_reg (unsigned reg, frame_state *udata, frame_state *sub_udata)
{
  return (void *)(ptr_type) *get_reg_addr (reg, udata, sub_udata);
}



static __inline__ void
put_reg (unsigned reg, void *val, frame_state *udata)
{
  *get_reg_addr (reg, udata, ((void *)0)) = (word_type)(ptr_type) val;
}





static void
copy_reg (unsigned reg, frame_state *udata, frame_state *target_udata)
{
  word_type *preg = get_reg_addr (reg, udata, ((void *)0));
  word_type *ptreg = get_reg_addr (reg, target_udata, ((void *)0));

  memcpy (ptreg, preg, dwarf_reg_size_table [reg]);
}



static __inline__ void *
get_return_addr (frame_state *udata, frame_state *sub_udata)
{
  return __builtin_extract_return_addr
    (get_reg (udata->retaddr_column, udata, sub_udata));
}



static __inline__ void
put_return_addr (void *val, frame_state *udata)
{
  val = __builtin_frob_return_addr (val);
  put_reg (udata->retaddr_column, val, udata);
}




static void *
next_stack_level (void *pc, frame_state *udata, frame_state *caller_udata)
{
  caller_udata = __frame_state_for (pc, caller_udata);
  if (! caller_udata)
    return 0;




  if (udata->saved[caller_udata->cfa_reg])
    caller_udata->cfa = get_reg (caller_udata->cfa_reg, udata, 0);
  else
    caller_udata->cfa = udata->cfa;
  if (caller_udata->indirect)
    caller_udata->cfa = * (void **) ((unsigned char *)caller_udata->cfa
                                     + caller_udata->base_offset);
  caller_udata->cfa += caller_udata->cfa_offset;

  return caller_udata;
}


void
__unwinding_cleanup (void)
{
}
# 3910 "../../gcc/libgcc2.c"
static void *
throw_helper (struct eh_context *eh, void *pc, frame_state *my_udata,
              long *offset_p)
{
  frame_state ustruct2, *udata = &ustruct2;
  frame_state ustruct;
  frame_state *sub_udata = &ustruct;
  void *saved_pc = pc;
  void *handler;
  void *handler_p = 0;
  void *pc_p = 0;
  frame_state saved_ustruct;
  int new_eh_model;
  int cleanup = 0;
  int only_cleanup = 0;
  int rethrow = 0;
  int saved_state = 0;
  long args_size;
  __eh_info *eh_info = (__eh_info *)eh->info;

  fprintf ((&_iob[2]), "Throw helper %d!\n", new_eh_model);


  if (eh->table_index != (void *) 0)
    rethrow = 1;

  memcpy (udata, my_udata, sizeof (*udata));

  handler = (void *) 0;
  for (;;)
    {
      frame_state *p = udata;
      udata = next_stack_level (pc, udata, sub_udata);
      sub_udata = p;


      if (! udata)
        break;

      if (udata->eh_ptr == ((void *)0))
        new_eh_model = 0;
      else
        new_eh_model = (((exception_descriptor *)(udata->eh_ptr))->
                                          runtime_id_field == ((void *) -2));

      fprintf ((&_iob[2]), "find_exception_handler\n");

      if (rethrow)
        {
          rethrow = 0;
          handler = find_exception_handler (eh->table_index, udata->eh_ptr,
                                          eh_info, 1, &cleanup);
          eh->table_index = (void *)0;
        }
      else
        if (new_eh_model)
          handler = find_exception_handler (pc, udata->eh_ptr, eh_info,
                                            0, &cleanup);
        else
          handler = old_find_exception_handler (pc, udata->eh_ptr);

      fprintf ((&_iob[2]), "find_exception_handler = %x\n", handler);




      if (handler)
        {
          if (cleanup)
            {
              if (!saved_state)
                {
                  saved_ustruct = *udata;
                  handler_p = handler;
                  pc_p = pc;
                  saved_state = 1;
                  only_cleanup = 1;
                }
            }
          else
            {
              only_cleanup = 0;
              break;
            }
        }



      pc = get_return_addr (udata, sub_udata) - 1;
    }

  if (saved_state)
    {
      udata = &saved_ustruct;
      handler = handler_p;
      pc = pc_p;
      if (only_cleanup)
        __unwinding_cleanup ();
    }



  if (! handler)
    __terminate();

  eh->handler_label = handler;

  args_size = udata->args_size;

  if (pc == saved_pc)

    udata = my_udata;
  else
    {
      int i;





      void *handler_pc = pc;


      pc = saved_pc;
      memcpy (udata, my_udata, sizeof (*udata));

      while (pc != handler_pc)
        {
          frame_state *p = udata;
          udata = next_stack_level (pc, udata, sub_udata);
          sub_udata = p;

          for (i = 0; i < 77; ++i)
            if (i != udata->retaddr_column && udata->saved[i])
              {




                if (in_reg_window (i, udata)
                    && udata->saved[udata->retaddr_column] == 2
                    && udata->reg_or_offset[udata->retaddr_column] == i)
                  continue;
                copy_reg (i, udata, my_udata);
              }

          pc = get_return_addr (udata, sub_udata) - 1;
        }




      if (udata->saved[udata->retaddr_column] == 2)
        {
          i = udata->reg_or_offset[udata->retaddr_column];
          if (in_reg_window (i, udata))
            copy_reg (i, udata, my_udata);
        }
    }
# 4077 "../../gcc/libgcc2.c"
  *offset_p = udata->cfa - my_udata->cfa + args_size;




  return handler;
}
# 4096 "../../gcc/libgcc2.c"
void
__throw (void)
{
  struct eh_context *eh;
  void *pc, *handler;
  long offset;

  fprintf((&_iob[2]), "Throw!\n");

  eh = (*get_eh_context) ();

  fprintf((&_iob[2]), "Got context!\n");



  frame_state my_ustruct, *my_udata = &my_ustruct;




  if (! eh->info)
    __terminate ();

  fprintf((&_iob[2]), "Find Frame!\n");


label:
  my_udata = __frame_state_for (&&label, my_udata);
  fprintf((&_iob[2]), "%x\n", my_udata);
  if (! my_udata)
    __terminate ();


  my_udata->cfa = __builtin_dwarf_cfa ();



  __builtin_unwind_init ();


  pc = __builtin_extract_return_addr (__builtin_return_address (0)) - 1;

  handler = throw_helper (eh, pc, my_udata, &offset);



  __builtin_eh_return ((void *)eh, offset, handler);



}



void
__rethrow (void *index)
{
  struct eh_context *eh = (*get_eh_context) ();
  void *pc, *handler;
  long offset;



  frame_state my_ustruct, *my_udata = &my_ustruct;




  if (! eh->info)
    __terminate ();




  eh->table_index = index;


label:
  my_udata = __frame_state_for (&&label, my_udata);
  if (! my_udata)
    __terminate ();


  my_udata->cfa = __builtin_dwarf_cfa ();



  __builtin_unwind_init ();


  pc = __builtin_extract_return_addr (__builtin_return_address (0)) - 1;

  handler = throw_helper (eh, pc, my_udata, &offset);



  __builtin_eh_return ((void *)eh, offset, handler);



}


More information about the Gcc mailing list