lib/metasm/ia32/decompile.rb in metasm-1.0.0 vs lib/metasm/ia32/decompile.rb in metasm-1.0.1

- old
+ new

@@ -288,11 +288,11 @@ if di.opcode.name == 'mov' # mov cr0 etc a1, a2 = di.instruction.args case a1 - when Ia32::CtrlReg, Ia32::DbgReg, Ia32::SegReg + when Ia32::CtrlReg, Ia32::DbgReg, Ia32::TstReg, Ia32::SegReg sz = a1.kind_of?(Ia32::SegReg) ? 16 : 32 if not dcmp.c_parser.toplevel.symbol["intrinsic_set_#{a1}"] dcmp.c_parser.parse("void intrinsic_set_#{a1}(__int#{sz});") end f = dcmp.c_parser.toplevel.symbol["intrinsic_set_#{a1}"] @@ -300,10 +300,10 @@ a2 = [a2, :&, 0xffff] if sz == 16 stmts << C::CExpression.new(f, :funcall, [ceb[a2]], f.type.type) next end case a2 - when Ia32::CtrlReg, Ia32::DbgReg, Ia32::SegReg + when Ia32::CtrlReg, Ia32::DbgReg, Ia32::TstReg, Ia32::SegReg if not dcmp.c_parser.toplevel.symbol["intrinsic_get_#{a2}"] sz = a2.kind_of?(Ia32::SegReg) ? 16 : 32 dcmp.c_parser.parse("__int#{sz} intrinsic_get_#{a2}(void);") end f = dcmp.c_parser.toplevel.symbol["intrinsic_get_#{a2}"]