require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_AARCH64_FRAME_H_)) {
    eval 'sub _AARCH64_FRAME_H_ () {1;}' unless defined(&_AARCH64_FRAME_H_);
    if(defined(&__aarch64__)) {
	require 'aarch64/reg.ph';
	eval 'sub tf_reg () { ($tf_regs->{r_reg});}' unless defined(&tf_reg);
	eval 'sub tf_lr () { ($tf_regs->{r_reg[30]});}' unless defined(&tf_lr);
	eval 'sub tf_pc () { ($tf_regs->{r_pc});}' unless defined(&tf_pc);
	eval 'sub tf_sp () { ($tf_regs->{r_sp});}' unless defined(&tf_sp);
	eval 'sub tf_spsr () { ($tf_regs->{r_spsr});}' unless defined(&tf_spsr);
	if(defined(&_KERNEL)) {
	}
	eval 'sub TF_SIZE () {$sizeof{\'struct trapframe\'};}' unless defined(&TF_SIZE);
	eval 'sub FB_X19 () {0;}' unless defined(&FB_X19);
	eval 'sub FB_X20 () {1;}' unless defined(&FB_X20);
	eval 'sub FB_X21 () {2;}' unless defined(&FB_X21);
	eval 'sub FB_X22 () {3;}' unless defined(&FB_X22);
	eval 'sub FB_X23 () {4;}' unless defined(&FB_X23);
	eval 'sub FB_X24 () {5;}' unless defined(&FB_X24);
	eval 'sub FB_X25 () {6;}' unless defined(&FB_X25);
	eval 'sub FB_X26 () {7;}' unless defined(&FB_X26);
	eval 'sub FB_X27 () {8;}' unless defined(&FB_X27);
	eval 'sub FB_X28 () {9;}' unless defined(&FB_X28);
	eval 'sub FB_X29 () {10;}' unless defined(&FB_X29);
	eval 'sub FB_LR () {11;}' unless defined(&FB_LR);
	eval 'sub FB_SP () {12;}' unless defined(&FB_SP);
	eval 'sub FB_MAX () {13;}' unless defined(&FB_MAX);
	eval 'sub lwp_trapframe {
	    my($l) = @_;
    	    eval q((($l)-> ($l_md->{md_utf})));
	}' unless defined(&lwp_trapframe);
    }
 elsif(defined(&__arm__)) {
	require 'arm/frame.ph';
    }
}
1;
