Exemplo n.º 1
0
		public void Jmp(X86ConditionCode cond, Int32 displacement) {
			if (is_imm8(displacement - 2)) {
				writer.Write(new byte[] { (byte)(0x70 | (byte)cond) });
				imm_emit8(displacement - 2);
			} else {
				writer.Write(new byte[] { 0x0F, (byte)(0x80 | (byte)cond) });
				imm_emit32(displacement - 6);
			}
		}
Exemplo n.º 2
0
		public void Jmp(X86ConditionCode cond, X86Label label) {
			if (label.IsMarked) {
				Jmp(cond, label.Position.ToInt32() - this.Position.ToInt32());
			} else {
				label.AddPatchRequired();
				writer.Write(new byte[] { 0x0F, (byte)(0x80 | (byte)cond) });
				writer.Write(0xDEADBEEF);
			}
		}
Exemplo n.º 3
0
 public void Jmp(X86ConditionCode cond, Int32 displacement)
 {
     if (is_imm8(displacement - 2))
     {
         writer.Write(new byte[] { (byte)(0x70 | (byte)cond) });
         imm_emit8(displacement - 2);
     }
     else
     {
         writer.Write(new byte[] { 0x0F, (byte)(0x80 | (byte)cond) });
         imm_emit32(displacement - 6);
     }
 }
Exemplo n.º 4
0
 public void Jmp(X86ConditionCode cond, X86Label label)
 {
     if (label.IsMarked)
     {
         Jmp(cond, label.Position.ToInt32() - this.Position.ToInt32());
     }
     else
     {
         label.AddPatchRequired();
         writer.Write(new byte[] { 0x0F, (byte)(0x80 | (byte)cond) });
         writer.Write(0xDEADBEEF);
     }
 }