require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&MCOUNT)) {
    sub MCOUNT () {	"(assembly code)";}
}
unless(defined(&_MCOUNT_DECL)) {
    sub _MCOUNT_DECL () {	 &static  &void  &__mcount;}
}
if(defined(&_KERNEL)) {
    eval 'sub MCOUNT_ENTER () { &__asm  &volatile("mfmsr %0" : "=r"( &s));  &if (( &s & ( &PSL_IR |  &PSL_DR)) != ( &PSL_IR |  &PSL_DR))  &return;  &s &= ~ &PSL_POW;  &__asm  &volatile("mtmsr %0" :: "r"( &s & ~ &PSL_EE));}' unless defined(&MCOUNT_ENTER);
    eval 'sub MCOUNT_EXIT () { &__asm  &volatile("mtmsr %0" :: "r"( &s));}' unless defined(&MCOUNT_EXIT);
}
1;
