예제 #1
0
        public void EmitIfNecessary(Format14OpCode opCode, bool includePcLr, byte registers)
        {
            var includePcLrText = "";

            if (includePcLr)
            {
                includePcLrText = (opCode == Format14OpCode.POP ? ",PC" : ",LR");
            }
            else if (registers == 0)
            {
                return;
            }
            var fluentComment = opCode.ToHumanReadable().MyConcat(" {regs=", ((int)registers).ToBinary(8), includePcLrText, "}");
            var loadStoreBit  = opCode == Format14OpCode.POP ? 1 : 0;
            var pcLrBit       = includePcLr ? 1 : 0;

            //HACK: we are explicitly excluding this call from the hacky "RegistersWritten" tracking
            //because our caller doesn't want it (our caller only wants registers that were touched
            //during its run, not saved and restored)
            EmitHelper(null, 14, fluentComment, 11, 4, loadStoreBit, 1, 2, 2, pcLrBit, 1, registers, 8);
        }
예제 #2
0
 public void EmitIfNecessary(Format14OpCode opCode, bool includePcLr, byte registers)
 {
     var includePcLrText="";
       if(includePcLr) {
     includePcLrText=(opCode==Format14OpCode.POP ? ",PC" : ",LR");
       } else if(registers==0) {
     return;
       }
       var fluentComment=opCode.ToHumanReadable().MyConcat(" {regs=", ((int)registers).ToBinary(8), includePcLrText, "}");
       var loadStoreBit=opCode==Format14OpCode.POP ? 1 : 0;
       var pcLrBit=includePcLr ? 1 : 0;
       //HACK: we are explicitly excluding this call from the hacky "RegistersWritten" tracking
       //because our caller doesn't want it (our caller only wants registers that were touched
       //during its run, not saved and restored)
       EmitHelper(null, 14, fluentComment, 11, 4, loadStoreBit, 1, 2, 2, pcLrBit, 1, registers, 8);
 }
예제 #3
0
 public static string ToHumanReadable(this Format14OpCode opCode)
 {
     return(format14[(int)opCode]);
 }