diff options
author | Mike Frysinger <vapier@gentoo.org> | 2023-12-22 18:05:50 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2023-12-22 23:29:19 -0500 |
commit | e4e3a80911a6c214ad4c9bae50593adc578d9c60 (patch) | |
tree | 3571d6dc1c58cc4d46927991cf56377a7cde496f /sim/m32c/r8c.opc | |
parent | 2d351bda2f0611ad16cd2ba8233fae0660f448d6 (diff) | |
download | binutils-e4e3a80911a6c214ad4c9bae50593adc578d9c60.zip binutils-e4e3a80911a6c214ad4c9bae50593adc578d9c60.tar.gz binutils-e4e3a80911a6c214ad4c9bae50593adc578d9c60.tar.bz2 |
sim: m32c: fix -Wshadow=local warnings
These decoders declare a lot of common variables for use by substeps,
and then shadows a few because of how the opc generator is implemented.
Easiest way around it is to rename the per-substep vars as needed as
anything more would require substantial changes to the opc logic.
Diffstat (limited to 'sim/m32c/r8c.opc')
-rw-r--r-- | sim/m32c/r8c.opc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sim/m32c/r8c.opc b/sim/m32c/r8c.opc index c5d8929..9c35e13 100644 --- a/sim/m32c/r8c.opc +++ b/sim/m32c/r8c.opc @@ -880,9 +880,9 @@ decode_r8c (void) v = mem_get_qi (imm); put_dest (dc, v); - /** 0111 1101 1010 0imm LDIPL #IMM */ + /** 0111 1101 1010 0flg LDIPL #IMM */ - set_flags (0x700, imm*0x100); + set_flags (0x700, flg*0x100); /** 0111 010w 1100 dest MOV.size:G #IMM,dest */ @@ -1380,13 +1380,13 @@ decode_r8c (void) a = sign_ext (get_reg (r1h), 8); shift_op (dc, 0, a); - /** 0111 110w 1110 100b SMOVB.size */ + /** 0111 110w 1110 100z SMOVB.size */ { int count = get_reg (r3); int s1 = get_reg (a0) + (get_reg (r1h) << 16); int s2 = get_reg (a1); - int inc = (w ? 2 : 1) * (b ? -1 : 1); + int inc = (w ? 2 : 1) * (z ? -1 : 1); while (count) { |