提交 dc979514 编写于 作者: A Alex Dowad 提交者: Rich Felker

fix instruction matching errors in i386 CFI generation

fdiv and fmul instructions were wrongly matched by the rules for
integer div and mul instructions, leading to incorrect conclusions
about register values being clobbered.
上级 0650a059
......@@ -188,9 +188,9 @@ function trashed(register) {
/(add|addl|sub|subl|and|or|xor|lea|sal|sar|shl|shr) %e(ax|bx|cx|dx|si|di|bp),/ {
trashed(get_reg1())
}
/i?mul [^,]*$/ { trashed("eax"); trashed("edx") }
/i?mul %e(ax|bx|cx|dx|si|di|bp),/ { trashed(get_reg1()) }
/i?div/ { trashed("eax"); trashed("edx") }
/^i?mul [^,]*$/ { trashed("eax"); trashed("edx") }
/^i?mul %e(ax|bx|cx|dx|si|di|bp),/ { trashed(get_reg1()) }
/^i?div/ { trashed("eax"); trashed("edx") }
/(dec|inc|not|neg|pop) %e(ax|bx|cx|dx|si|di|bp)/ { trashed(get_reg()) }
/cpuid/ { trashed("eax"); trashed("ebx"); trashed("ecx"); trashed("edx") }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册