diff options
author | Alex Dowad <alexinbeijing@gmail.com> | 2015-10-02 13:32:33 +0200 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2015-10-08 21:04:41 +0000 |
commit | dc97951402b499023ce877dd2438bce0840b2c26 (patch) | |
tree | fff46eb4e5ec75eaef6a26aaf412f1fea4e52075 | |
parent | 0650a05947c9f67cedff693d2e1c2f61a8e6c0d3 (diff) | |
download | musl-dc97951402b499023ce877dd2438bce0840b2c26.tar.gz musl-dc97951402b499023ce877dd2438bce0840b2c26.tar.bz2 musl-dc97951402b499023ce877dd2438bce0840b2c26.tar.xz musl-dc97951402b499023ce877dd2438bce0840b2c26.zip |
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.
-rw-r--r-- | tools/add-cfi.i386.awk | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/add-cfi.i386.awk b/tools/add-cfi.i386.awk index b8bdd7f4..5dc87941 100644 --- a/tools/add-cfi.i386.awk +++ b/tools/add-cfi.i386.awk @@ -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") } |