foss-for-synopsys-dwc-arc-processors / binutils-gdb

A mirror of the upstream binutils-gdb repository for ARC specific work
GNU General Public License v2.0
13 stars 10 forks source link

Revert and update: Support Zcmp cm.mva01s and cm.mvsa01 instructions. #84

Closed luismgsilva closed 2 months ago

luismgsilva commented 2 months ago

This intervention is necessary as it breaks instructions offsets. If matching pairs are found in separate labels, those are ignored and those instructions are combined anyway.

Given the following example:

mv a5,s6
mv s6,a0
.L20:
mv a0,a6 # i_2, i_2

Since mv s6,a0 and mv a0,a6 are defined as a matching pair in reverted patch, the assembler would 'cache' mv s6,a0 and later combine with mv a0,a6 resulting in:

mv a5,s6
.L20:
mv s6,a0
mv a0,a6 # i_2, i_2

This change updates the patch according to the upstream master branch of bintuils.