about summary refs log tree commit diff
path: root/tools
diff options
context:
space:
mode:
authorAlex Dowad <alexinbeijing@gmail.com>2015-10-13 17:58:43 -0400
committerRich Felker <dalias@aerifal.cx>2015-10-13 17:58:43 -0400
commit8cfdfa9c8fd84d4090bba54eb616a2c9361a076f (patch)
tree6af7d540f2a9d18166d97f91ee363297d6a35df9 /tools
parentfef9c801feeccbb40623f0c2a6e4f2b19f58a34b (diff)
downloadmusl-8cfdfa9c8fd84d4090bba54eb616a2c9361a076f.tar.gz
musl-8cfdfa9c8fd84d4090bba54eb616a2c9361a076f.tar.xz
musl-8cfdfa9c8fd84d4090bba54eb616a2c9361a076f.zip
fix misinterpretation of indexed memory operand in i386 CFI generation
a register used as an index in the memory destination of a mov
instruction was wrongly interpreted as the destination of the mov.
Diffstat (limited to 'tools')
-rw-r--r--tools/add-cfi.i386.awk2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/add-cfi.i386.awk b/tools/add-cfi.i386.awk
index 231d67ed..bd7932f1 100644
--- a/tools/add-cfi.i386.awk
+++ b/tools/add-cfi.i386.awk
@@ -184,7 +184,7 @@ function trashed(register) {
 }
 # this does NOT exhaustively check for all possible instructions which could
 # overwrite a register value inherited from the caller (just the common ones)
-/mov.*,%e(ax|bx|cx|dx|si|di|bp)/  { trashed(get_reg2()) }
+/mov.*,%e(ax|bx|cx|dx|si|di|bp)$/  { trashed(get_reg2()) }
 /(add|addl|sub|subl|and|or|xor|lea|sal|sar|shl|shr).*,%e(ax|bx|cx|dx|si|di|bp)$/ {
   trashed(get_reg2())
 }