<?xml version="1.0" encoding="UTF-8"?>

<compiler_spec>
  <data_organization>
     <absolute_max_alignment value="0" />
     <machine_alignment value="4" />
     <default_alignment value="1" />
     <default_pointer_alignment value="8" />
     <pointer_size value="4" />
     <wchar_size value="4" />
     <short_size value="2" />
     <integer_size value="4" />
     <long_size value="4" />
     <long_long_size value="8" />
     <float_size value="4" />
     <double_size value="8" />
     <long_double_size value="8" />
     <size_alignment_map>
          <entry size="1" alignment="1" />
          <entry size="2" alignment="2" />
          <entry size="4" alignment="4" />
          <entry size="8" alignment="8" />
     </size_alignment_map>
  </data_organization>
  
  <global>
    <range space="ram"/>
      <!-- The decompiler will treat registers in this range as global variables.
        ie: tmp_ldWn, tmp_ldXn, tmp_stWn, tmp_stXn -->
    <range space="register"  first="0x3000" last="0x3fff"/>
  </global>
  
  <aggressivetrim signext="true"/> <!-- Aggressively try to eliminate sign extensions -->

  <stackpointer register="sp" space="ram"/>
  <funcptr align="4"/>     <!-- Function pointers are word aligned and leastsig bit may encode otherstuff -->
  
  <prefersplit style="inhalf">
    <register name="q0"/>
    <register name="q1"/>
    <register name="q2"/>
    <register name="q3"/>
    <register name="q4"/>
    <register name="q5"/>
    <register name="q6"/>
    <register name="q7"/>
    <register name="q8"/>
    <register name="q9"/>
    <register name="q10"/>
    <register name="q11"/>
    <register name="q12"/>
    <register name="q13"/>
    <register name="q14"/>
    <register name="q15"/>
    <register name="q16"/>
    <register name="q17"/>
    <register name="q18"/>
    <register name="q19"/>
    <register name="q20"/>
    <register name="q21"/>
    <register name="q22"/>
    <register name="q23"/>
    <register name="q24"/>
    <register name="q25"/>
    <register name="q26"/>
    <register name="q27"/>
    <register name="q28"/>
    <register name="q29"/>
    <register name="q30"/>
  </prefersplit>
  
  <default_proto>
    <prototype name="__cdecl" extrapop="0" stackshift="0">
      <input>
        <pentry minsize="1" maxsize="8" metatype="float">
          <register name="d0"/>
        </pentry>
        <pentry minsize="1" maxsize="8" metatype="float">
          <register name="d1"/>
        </pentry>
        <pentry minsize="1" maxsize="8" metatype="float">
          <register name="d2"/>
        </pentry>
        <pentry minsize="1" maxsize="8" metatype="float">
          <register name="d3"/>
        </pentry>
        <pentry minsize="1" maxsize="8" metatype="float">
          <register name="d4"/>
        </pentry>
        <pentry minsize="1" maxsize="8" metatype="float">
          <register name="d5"/>
        </pentry>
        <pentry minsize="1" maxsize="8" metatype="float">
          <register name="d6"/>
        </pentry>
        <pentry minsize="1" maxsize="8" metatype="float">
          <register name="d7"/>
        </pentry>
        <pentry minsize="1" maxsize="8" extension="zero">
          <register name="x0"/>
        </pentry>
        <pentry minsize="1" maxsize="8" extension="zero">
          <register name="x1"/>
        </pentry>
        <pentry minsize="1" maxsize="8" extension="zero">
          <register name="x2"/>
        </pentry>
        <pentry minsize="1" maxsize="8" extension="zero">
          <register name="x3"/>
        </pentry>
        <pentry minsize="1" maxsize="8" extension="zero">
          <register name="x4"/>
        </pentry>
        <pentry minsize="1" maxsize="8" extension="zero">
          <register name="x5"/>
        </pentry>
        <pentry minsize="1" maxsize="8" extension="zero">
          <register name="x6"/>
        </pentry>
        <pentry minsize="1" maxsize="8" extension="zero">
          <register name="x7"/>
        </pentry>
        <pentry minsize="1" maxsize="500" align="4">
          <addr offset="0" space="stack"/>
        </pentry>
      </input>
      <output>
        <pentry minsize="1" maxsize="8" metatype="float">
          <register name="d0"/>
        </pentry>
        <pentry minsize="1" maxsize="8" extension="zero">
          <register name="x0"/>
        </pentry>
        <pentry minsize="9" maxsize="16" extension="zero">
          <addr space="join" piece1="x1" piece2="x0"/>
        </pentry>
      </output>
      <unaffected>
        <register name="x19"/>
        <register name="x20"/>
        <register name="x21"/>
        <register name="x22"/> 
        <register name="x23"/> 
        <register name="x24"/> 
        <register name="x25"/> 
        <register name="x26"/> 
        <register name="x27"/> 
        <register name="x28"/>
        <register name="x29"/>
        <register name="x30"/>
        <register name="sp"/>
        <!-- vectors -->
        <register name="d8"/>
        <register name="d9"/>
        <register name="d10"/>
        <register name="d11"/>
        <register name="d12"/>
        <register name="d13"/>
        <register name="d14"/>
        <register name="d15"/>
      </unaffected>
      <killedbycall>
        <!-- x8: indirect result location register, which is not
         reflected in the pentry list -->
        <register name="x8"/>
        <register name="x9"/>
        <register name="x10"/>
        <register name="x11"/>
        <register name="x12"/>
        <register name="x13"/>
        <register name="x14"/>
        <register name="x15"/>
        <register name="x16"/>
        <register name="x17"/>
        <register name="x18"/>
        <!-- vectors -->
        <register name="d16"/>
        <register name="d17"/>
        <register name="d18"/>
        <register name="d19"/>
        <register name="d20"/>
        <register name="d21"/>
        <register name="d22"/>
        <register name="d23"/>
        <register name="d24"/>
        <register name="d25"/>
        <register name="d26"/>
        <register name="d27"/>
        <register name="d28"/>
        <register name="d29"/>
        <register name="d30"/>
        <register name="d31"/>
        </killedbycall>
    </prototype>
  </default_proto>


  <callfixup name="PlaceHolderCallFixup">  <!-- This is here just to force call fixup and NoReturn fixup.  Will be fixed in Ghidra V6.0 -->
    <target name="___NotARealFunctionName___"/>
    <pcode>
      <body><![CDATA[
            tmpptr:4 = 0;
      ]]></body>
    </pcode>
  </callfixup>
  
</compiler_spec>
