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

<compiler_spec>
  <global>
    <range space="CODE"/>
    <range space="INTMEM"/>
    <range space="SFR"/>
    <range space="EXTMEM"/>
    <range space="BITS"/>
  </global>
  <stackpointer register="SP" space="INTMEM" growth="positive"/>
  <default_proto>
    <prototype name="__stdcall" extrapop="-2" stackshift="-2" strategy="register">
      <input>
        <pentry minsize="1" maxsize="1">
          <register name="ACC"/>
        </pentry>
        <pentry minsize="1" maxsize="2">
          <register name="DPTR"/>
        </pentry>
        <pentry minsize="1" maxsize="1">
          <register name="B"/>
        </pentry>
        <pentry minsize="1" maxsize="1">
          <register name="R0"/>
        </pentry>
        <pentry minsize="1" maxsize="1">
          <register name="R1"/>
        </pentry>
        <pentry minsize="1" maxsize="1">
          <register name="R2"/>
        </pentry>
        <pentry minsize="1" maxsize="1">
          <register name="R3"/>
        </pentry>
        <pentry minsize="1" maxsize="1">
          <register name="R4"/>
        </pentry>
        <pentry minsize="1" maxsize="1">
          <register name="R5"/>
        </pentry>
        <pentry minsize="1" maxsize="1">
          <register name="R6"/>
        </pentry>
        <pentry minsize="1" maxsize="1">
          <register name="R7"/>
        </pentry>
      </input>
      <output>
        <pentry minsize="1" maxsize="1">
          <register name="ACC"/>
        </pentry>
      </output>
      <unaffected>
        <register name="SP"/>
      </unaffected>
      <localrange>
        <range space="stack" first="0x0" last="0xf"/>
      </localrange>
    </prototype>
  </default_proto>
  
  <callfixup name="switch_override_ACC">
    <pcode>
      <body><![CDATA[
			PC = inst_next + zext(ACC) * 3;
            goto [PC];
      ]]></body>
    </pcode>
  </callfixup>
  
</compiler_spec>
