@@ -400,6 +400,16 @@ def accept_arg(self, args, instr_state):
400400
401401class SegmentSelectorAbsoluteAddr (object ):
402402 def accept_arg (self , args , instr_state ):
403+ # Special case ptr 16:32
404+ if isinstance (args [0 ], str ) and args [0 ].count (":" ) == 1 :
405+ imm16 , imm32 = [int (x , 0 ) for x in args [0 ].split (":" )]
406+ sizess , datass = UImm16 ().accept_arg ([imm16 ], instr_state )
407+ sizeabs , dataabs = Imm32 ().accept_arg ([imm32 ], instr_state )
408+ if sizess is None or sizeabs is None :
409+ return None , None
410+ # We only consumed 1 args as it was the same string
411+ return (1 , dataabs + datass )
412+
403413 sizess , datass = UImm16 ().accept_arg (args , instr_state )
404414 if sizess is None :
405415 return None , None
@@ -711,6 +721,10 @@ class Jmp(JmpType):
711721 (RawBits .from_int (8 , 0xff ), Slash (4 )),
712722 (RawBits .from_int (8 , 0xea ), SegmentSelectorAbsoluteAddr ())]
713723
724+ # Allow a second mnemonic for the longjump
725+ class Ljmp (JmpType ):
726+ encoding = [(RawBits .from_int (8 , 0xea ), SegmentSelectorAbsoluteAddr ())]
727+
714728
715729class Jz (JmpType ):
716730 encoding = [(RawBits .from_int (8 , 0x74 ), JmpImm8 (2 )),
0 commit comments