Skip to content

Commit 29c2a73

Browse files
David MaloneyDavid Maloney
authored andcommitted
latest fix
trying to fix c comparison ops
1 parent ab7c4a4 commit 29c2a73

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/metasm/metasm/cpu/x86_64/compile_c.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -879,6 +879,7 @@ def c_ifgoto(expr, target)
879879
r = c_cexpr_inner(expr.rexpr)
880880
r = make_volatile(r, expr.type) if r.kind_of? ModRM and l.kind_of? ModRM
881881
r = make_volatile(r, expr.type) if r.kind_of?(ModRM) and r.sz != l.sz
882+
l = make_volatile(l, expr.type) if l.kind_of?(ModRM) and r.kind_of?(Reg) and r.sz != l.sz
882883
if l.kind_of? Expression
883884
o = { :< => :>, :> => :<, :>= => :<=, :<= => :>= }[o] || o
884885
l, r = r, l

0 commit comments

Comments
 (0)