require '_h2ph_pre.ph';

unless(defined(&_POWERPC_ASM_H_)) {
    eval 'sub _POWERPC_ASM_H_ () {1;}' unless defined(&_POWERPC_ASM_H_);
    eval 'sub TARGET_ELF () {1;}' unless defined(&TARGET_ELF);
    if(defined(&PIC)) {
	eval 'sub PIC_PROLOGUE () { &XXX;}' unless defined(&PIC_PROLOGUE);
	eval 'sub PIC_EPILOGUE () { &XXX;}' unless defined(&PIC_EPILOGUE);
	if(defined(&__STDC__)) {
	    eval 'sub PIC_PLT {
	        local($x) = @_;
    		eval q($x  @ &plt);
	    }' unless defined(&PIC_PLT);
	    eval 'sub PIC_GOT {
	        local($x) = @_;
    		eval q( &XXX);
	    }' unless defined(&PIC_GOT);
	    eval 'sub PIC_GOTOFF {
	        local($x) = @_;
    		eval q( &XXX);
	    }' unless defined(&PIC_GOTOFF);
	} else {
	    eval 'sub PIC_PLT {
	        local($x) = @_;
    		eval q($x @ &plt);
	    }' unless defined(&PIC_PLT);
	    eval 'sub PIC_GOT {
	        local($x) = @_;
    		eval q( &XXX);
	    }' unless defined(&PIC_GOT);
	    eval 'sub PIC_GOTOFF {
	        local($x) = @_;
    		eval q( &XXX);
	    }' unless defined(&PIC_GOTOFF);
	}
    } else {
	eval 'sub PIC_PROLOGUE () {1;}' unless defined(&PIC_PROLOGUE);
	eval 'sub PIC_EPILOGUE () {1;}' unless defined(&PIC_EPILOGUE);
	eval 'sub PIC_PLT {
	    local($x) = @_;
    	    eval q($x);
	}' unless defined(&PIC_PLT);
	eval 'sub PIC_GOT {
	    local($x) = @_;
    	    eval q($x);
	}' unless defined(&PIC_GOT);
	eval 'sub PIC_GOTOFF {
	    local($x) = @_;
    	    eval q($x);
	}' unless defined(&PIC_GOTOFF);
    }
    if(defined(&TARGET_AOUT)) {
	if(defined(&__STDC__)) {
	    eval 'sub _C_LABEL {
	        local($x) = @_;
    		eval q( &_  $x);
	    }' unless defined(&_C_LABEL);
	} else {
	    eval 'sub _C_LABEL {
	        local($x) = @_;
    		eval q( &_ $x);
	    }' unless defined(&_C_LABEL);
	}
    }
    if(defined(&TARGET_ELF)) {
	eval 'sub _C_LABEL {
	    local($x) = @_;
    	    eval q($x);
	}' unless defined(&_C_LABEL);
    }
    eval 'sub _ASM_LABEL {
        local($x) = @_;
	    eval q($x);
    }' unless defined(&_ASM_LABEL);
    if(defined(&__STDC__)) {
	eval 'sub _TMP_LABEL {
	    local($x) = @_;
    	    eval q(. &L_  $x);
	}' unless defined(&_TMP_LABEL);
    } else {
	eval 'sub _TMP_LABEL {
	    local($x) = @_;
    	    eval q(. &L_ $x);
	}' unless defined(&_TMP_LABEL);
    }
    eval 'sub _ENTRY {
        local($x) = @_;
	    eval q(. &text; . &align 2; . &globl $x; . &type $x,@ &function; $x:);
    }' unless defined(&_ENTRY);
    if(defined(&PROF)) {
	eval 'sub _PROF_PROLOGUE {
	    local($y) = @_;
    	    eval q(. &section \\".data\\"; . &align 2;  &_TMP_LABEL($y):; .\'long 0\'; . &section \\".text\\";  &mflr 0;  &addis 11, 11,  &_TMP_LABEL($y)@ &ha;  &stw 0, 4(1);  &addi 0, 11, &_TMP_LABEL($y)@ &l;  &bl  &_mcount;);
	}' unless defined(&_PROF_PROLOGUE);
    } else {
	eval 'sub _PROF_PROLOGUE {
	    local($y) = @_;
    	    eval q();
	}' unless defined(&_PROF_PROLOGUE);
    }
    eval 'sub ENTRY {
        local($y) = @_;
	    eval q( &_ENTRY( &_C_LABEL($y));  &_PROF_PROLOGUE($y));
    }' unless defined(&ENTRY);
    eval 'sub ASENTRY {
        local($y) = @_;
	    eval q( &_ENTRY( &_ASM_LABEL($y));  &_PROF_PROLOGUE($y));
    }' unless defined(&ASENTRY);
    eval 'sub ASMSTR () {. &asciz;}' unless defined(&ASMSTR);
    eval 'sub RCSID {
        local($x) = @_;
	    eval q(. &text; . &asciz $x);
    }' unless defined(&RCSID);
}
1;
