123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687(*Generated by Lem from abis/mips64/abi_mips64.lem.*)(** [abi_mips64] contains top-level definition for the MIPS64 ABI.
*)openLem_basic_classesopenLem_boolopenLem_listopenLem_numopenLem_maybeopenErroropenLem_mapopenLem_assert_extraopenMissing_pervasivesopenElf_headeropenElf_types_native_uintopenElf_fileopenElf_interpreted_segmentopenElf_interpreted_sectionopenEndiannessopenMemory_image(* open import Elf_memory_image *)openAbi_classes(*open import Abi_mips64_relocation*)openAbi_mips64_elf_header(** [abi_mips64_compute_program_entry_point segs entry] computes the program
* entry point using ABI-specific conventions. On MIPS64 the entry point in
* the ELF header ([entry] here) is the real entry point. On other ABIs, e.g.
* PowerPC64, the entry point [entry] is a pointer into one of the segments
* constituting the process image (passed in as [segs] here for a uniform
* interface).
*)(*val abi_mips64_compute_program_entry_point : list elf64_interpreted_segments -> elf64_addr -> error natural*)letabi_mips64_compute_program_entry_pointsegsentry:(Nat_big_num.num)error=(return(Ml_bindings.nat_big_num_of_uint64entry))(*val header_is_mips64 : elf64_header -> bool*)letheader_is_mips64h:bool=(is_valid_elf64_headerh&&(is_valid_abi_mips64_machine_architecture(Uint32_wrapper.to_biginth.elf64_machine)&&is_valid_abi_mips64_magic_numberh.elf64_ident))type'abifeatureplt_entry_address_fn=Nat_big_num.num(* offset in PLT? *)->'abifeatureannotated_memory_image(* img *)->Nat_big_num.num(* addr *)type'abifeaturemips64_abi_feature=GOT1of((string*(symbol_definitionoption))list)|PLT1of((string*(symbol_definitionoption)*'abifeatureplt_entry_address_fn)list)(*val abiFeatureCompare : forall 'abifeature. mips64_abi_feature 'abifeature -> mips64_abi_feature 'abifeature -> Basic_classes.ordering*)letabiFeatureCompare1f1f2:int=((match(f1,f2)with(GOT1(_),GOT1(_))->0|(GOT1(_),PLT1(_))->(-1)|(PLT1(_),PLT1(_))->0|(PLT1(_),GOT1(_))->1))(*val abiFeatureTagEq : forall 'abifeature. mips64_abi_feature 'abifeature -> mips64_abi_feature 'abifeature -> bool*)letabiFeatureTagEq1f1f2:bool=((match(f1,f2)with(GOT1(_),GOT1(_))->true|(PLT1(_),PLT1(_))->true|(_,_)->false))letinstance_Abi_classes_AbiFeatureTagEquiv_Abi_mips64_mips64_abi_feature_dict:('abifeaturemips64_abi_feature)abiFeatureTagEquiv_class=({abiFeatureTagEquiv_method=abiFeatureTagEq1})letinstance_Basic_classes_Ord_Abi_mips64_mips64_abi_feature_dict:('abifeaturemips64_abi_feature)ord_class=({compare_method=abiFeatureCompare1;isLess_method=(funf1->(funf2->(Lem.orderingEqual(abiFeatureCompare1f1f2)(-1))));isLessEqual_method=(funf1->(funf2->Pset.mem(abiFeatureCompare1f1f2)(Pset.from_listcompare[(-1);0])));isGreater_method=(funf1->(funf2->(Lem.orderingEqual(abiFeatureCompare1f1f2)1)));isGreaterEqual_method=(funf1->(funf2->Pset.mem(abiFeatureCompare1f1f2)(Pset.from_listcompare[1;0])))})(*val section_is_special : forall 'abifeature. elf64_interpreted_section -> annotated_memory_image 'abifeature -> bool*)letsection_is_special2simg2:bool=(elf_section_is_specialsimg2)