node/lib/metasm/metasm/cpu/ia32/decode.rb
def decode_cc_to_expr(cc)
		case cc
		when 'o'; Expression[:eflag_o]
		when 'no'; Expression[:'!', :eflag_o]
		when 'b', 'nae', 'c'; Expression[:eflag_c]
		when 'nb', 'ae', 'nc'; Expression[:'!', :eflag_c]
		when 'z', 'e'; Expression[:eflag_z]
		when 'nz', 'ne'; Expression[:'!', :eflag_z]
		when 'be', 'na'; Expression[:eflag_c, :|, :eflag_z]
		when 'nbe', 'a'; Expression[:'!', [:eflag_c, :|, :eflag_z]]
		when 's'; Expression[:eflag_s]
		when 'ns'; Expression[:'!', :eflag_s]
		when 'p', 'pe'; Expression::Unknown
		when 'np', 'po'; Expression::Unknown
		when 'l', 'nge'; Expression[:eflag_s, :'!=', :eflag_o]
		when 'nl', 'ge'; Expression[:eflag_s, :==, :eflag_o]
		when 'le', 'ng'; Expression[[:eflag_s, :'!=', :eflag_o], :|, :eflag_z]
		when 'nle', 'g'; Expression[[:eflag_s, :==, :eflag_o], :&, :eflag_z]
		when 'ecxz'; Expression[:'!', register_symbols[1]]
		when 'cxz'; Expression[:'!', [register_symbols[1], :&, 0xffff]]
		end
	end
# interprets a condition code (in an opcode name) as an expression involving backtracked eflags
# eflag_p is never computed, and this returns Expression::Unknown for this flag
# ex: 'z' => Expression[:eflag_z]
interprets a condition code (in an opcode name) as an expression involving backtracked eflags
eflag_p is never computed, and this returns Expression::Unknown for this flag
ex: 'z' => Expression[:eflag_z]
interprets a condition code ( in an opcode name ) as an expression involving backtracked eflags eflag_p is never computed and this returns Expression :: Unknown for this flag ex : ' z ' = > Expression [ : eflag_z ]
def decode_cc_to_expr(cc)
		case cc
		when 'o'; Expression[:eflag_o]
		when 'no'; Expression[:'!', :eflag_o]
		when 'b', 'nae', 'c'; Expression[:eflag_c]
		when 'nb', 'ae', 'nc'; Expression[:'!', :eflag_c]
		when 'z', 'e'; Expression[:eflag_z]
		when 'nz', 'ne'; Expression[:'!', :eflag_z]
		when 'be', 'na'; Expression[:eflag_c, :|, :eflag_z]
		when 'nbe', 'a'; Expression[:'!', [:eflag_c, :|, :eflag_z]]
		when 's'; Expression[:eflag_s]
		when 'ns'; Expression[:'!', :eflag_s]
		when 'p', 'pe'; Expression::Unknown
		when 'np', 'po'; Expression::Unknown
		when 'l', 'nge'; Expression[:eflag_s, :'!=', :eflag_o]
		when 'nl', 'ge'; Expression[:eflag_s, :==, :eflag_o]
		when 'le', 'ng'; Expression[[:eflag_s, :'!=', :eflag_o], :|, :eflag_z]
		when 'nle', 'g'; Expression[[:eflag_s, :==, :eflag_o], :&, :eflag_z]
		when 'ecxz'; Expression[:'!', register_symbols[1]]
		when 'cxz'; Expression[:'!', [register_symbols[1], :&, 0xffff]]
		end
	end
def decode_cc_to_expr ( cc ) case cc when 'o' ; Expression [ :eflag_o ] when 'no' ; Expression [ :' ! ' , :eflag_o ] when 'b' , 'nae' , 'c' ; Expression [ :eflag_c ] when 'nb' , 'ae' , 'nc' ; Expression [ :' ! ' , :eflag_c ] when 'z' , 'e' ; Expression [ :eflag_z ] when 'nz' , 'ne' ; Expression [ :' ! ' , :eflag_z ] when 'be' , 'na' ; Expression [ :eflag_c , :| , :eflag_z ] when 'nbe' , 'a' ; Expression [ :' ! ' , [ :eflag_c , :| , :eflag_z ] ] when 's' ; Expression [ :eflag_s ] when 'ns' ; Expression [ :' ! ' , :eflag_s ] when 'p' , 'pe' ; Expression :: Unknown when 'np' , 'po' ; Expression :: Unknown when 'l' , 'nge' ; Expression [ :eflag_s , :' != ' , :eflag_o ] when 'nl' , 'ge' ; Expression [ :eflag_s , :== , :eflag_o ] when 'le' , 'ng' ; Expression [ [ :eflag_s , :' != ' , :eflag_o ] , :| , :eflag_z ] when 'nle' , 'g' ; Expression [ [ :eflag_s , :== , :eflag_o ] , :& , :eflag_z ] when 'ecxz' ; Expression [ :' ! ' , register_symbols [ 1 ] ] when 'cxz' ; Expression [ :' ! ' , [ register_symbols [ 1 ] , :& , 0xffff ] ] end end
interprets a condition code (in an opcode name) as an expression involving backtracked eflags
eflag_p is never computed, and this returns Expression::Unknown for this flag
ex: 'z' => Expression[:eflag_z]
interprets a condition code ( in an opcode name ) as an expression involving backtracked eflags eflag_p is never computed and this returns Expression :: Unknown for this flag ex : ' z ' = > Expression [ : eflag_z ]
cc