mirror of
https://github.com/hakril/PythonForWindows
synced 2026-06-08 14:31:45 +00:00
Fixed a warning in simple_x[86|64]
This commit is contained in:
@@ -789,7 +789,7 @@ class JmpType(Instruction):
|
||||
arg = initial_args[0]
|
||||
if isinstance(arg, str) and arg[0] == ":":
|
||||
return DelayedJump(cls, arg)
|
||||
return super(JmpType, cls).__new__(cls, *initial_args)
|
||||
return super(JmpType, cls).__new__(cls)
|
||||
|
||||
|
||||
class Push(Instruction):
|
||||
|
||||
@@ -608,7 +608,7 @@ class JmpType(Instruction):
|
||||
arg = initial_args[0]
|
||||
if isinstance(arg, str) and arg[0] == ":":
|
||||
return DelayedJump(cls, arg)
|
||||
return super(JmpType, cls).__new__(cls, *initial_args)
|
||||
return super(JmpType, cls).__new__(cls)
|
||||
|
||||
|
||||
class JmpImm(object):
|
||||
@@ -847,8 +847,25 @@ class _NopArtifact(Nop):
|
||||
pass
|
||||
|
||||
|
||||
class Label(object):
|
||||
class Byte(Instruction):
|
||||
"""Output a raw byte"""
|
||||
encoding = [(UImm8(),)]
|
||||
|
||||
|
||||
class Raw(Instruction):
|
||||
"""Output raw data"""
|
||||
def __init__(self, *initial_args):
|
||||
if len(initial_args) != 1:
|
||||
raise ValueError("raw 'opcode' only accept one argument")
|
||||
self.data = initial_args[0].decode("hex")
|
||||
|
||||
def get_code(self):
|
||||
return self.data
|
||||
|
||||
|
||||
|
||||
|
||||
class Label(object):
|
||||
def __init__(self, name):
|
||||
self.name = name
|
||||
|
||||
|
||||
Reference in New Issue
Block a user