a143b0045c
The calculation of the shift amount, used to insert fields into the instruction buffer, is not correct when the following conditions are all true: - CGEN_INT_INSN_P is defined, and true. - CGEN_INSN_LSB0_P is true - Total instruction length is greater than the length of a single instruction word (the instruction is made of multiple words) - The word offset is non-zero (the field is outside the first word) When the above conditions are all true, the calculated shift fails to take account of the total instruction length. After this commit the calculation of the shift amount is split into two parts, first we calculate the shift required to get to BIT0 of the word in which the field lives, then we calculate the shift required to place the field within the instruction word. The change in this commit only effects the CGEN_INT_INSN_P defined true case, but changes the code for both CGEN_INSN_LSB0_P true, and false. In the case of CGEN_INSN_LSB0_P being false, the code used to say: shift = total_length - (word_offset + start + length); Now it says: shift_to_word = total_length - (word_offset + word_length); shift_within_word = word_length - start - length; shift = shift_to_word + shift_within_word; From which we can see that in all cases the computed shift value should be unchanged. In the case of CGEN_INSN_LSB0_P being true, the code used to say: shift = (word_offset + start + 1) - length; Now it says: shift_to_word = total_length - (word_offset + word_length); shift_within_word = start + 1 - length; shift = shift_to_word + shift_within_word; In the case where 'total_length == word_length' AND 'word_offset == 0' (which indicates an instruction of a single word), we see that the computed shift value will be unchanged. However, when the total_length and word_length are different, and the word_offset is non-zero then the computed shift value will be different (and correct). opcodes/ChangeLog: * cgen-ibld.in (insert_normal): Rework calculation of shift. * epiphany-ibld.c: Regenerate. * fr30-ibld.c: Regenerate. * frv-ibld.c: Regenerate. * ip2k-ibld.c: Regenerate. * iq2000-ibld.c: Regenerate. * lm32-ibld.c: Regenerate. * m32c-ibld.c: Regenerate. * m32r-ibld.c: Regenerate. * mep-ibld.c: Regenerate. * mt-ibld.c: Regenerate. * or1k-ibld.c: Regenerate. * xc16x-ibld.c: Regenerate. * xstormy16-ibld.c: Regenerate.
96 lines
2.6 KiB
Text
96 lines
2.6 KiB
Text
2016-02-02 Andrew Burgess <andrew.burgess@embecosm.com>
|
||
|
||
* cgen-ibld.in (insert_normal): Rework calculation of shift.
|
||
* epiphany-ibld.c: Regenerate.
|
||
* fr30-ibld.c: Regenerate.
|
||
* frv-ibld.c: Regenerate.
|
||
* ip2k-ibld.c: Regenerate.
|
||
* iq2000-ibld.c: Regenerate.
|
||
* lm32-ibld.c: Regenerate.
|
||
* m32c-ibld.c: Regenerate.
|
||
* m32r-ibld.c: Regenerate.
|
||
* mep-ibld.c: Regenerate.
|
||
* mt-ibld.c: Regenerate.
|
||
* or1k-ibld.c: Regenerate.
|
||
* xc16x-ibld.c: Regenerate.
|
||
* xstormy16-ibld.c: Regenerate.
|
||
|
||
2016-02-02 Andrew Burgess <andrew.burgess@embecosm.com>
|
||
|
||
* epiphany-dis.c: Regenerated from latest cpu files.
|
||
|
||
2016-02-01 Michael McConville <mmcco@mykolab.com>
|
||
|
||
* cgen-dis.c (count_decodable_bits): Use unsigned value for mask
|
||
test bit.
|
||
|
||
2016-01-25 Renlin Li <renlin.li@arm.com>
|
||
|
||
* arm-dis.c (mapping_symbol_for_insn): New function.
|
||
(find_ifthen_state): Call mapping_symbol_for_insn().
|
||
|
||
2016-01-20 Matthew Wahab <matthew.wahab@arm.com>
|
||
|
||
* aarch64-opc.c (operand_general_constraint_met_p): Check validity
|
||
of MSR UAO immediate operand.
|
||
|
||
2016-01-18 Maciej W. Rozycki <macro@imgtec.com>
|
||
|
||
* mips-dis.c (print_insn_micromips): Remove 48-bit microMIPS
|
||
instruction support.
|
||
|
||
2016-01-17 Alan Modra <amodra@gmail.com>
|
||
|
||
* configure: Regenerate.
|
||
|
||
2016-01-14 Nick Clifton <nickc@redhat.com>
|
||
|
||
* rl78-decode.opc (rl78_decode_opcode): Add 's' operand to movw
|
||
instructions that can support stack pointer operations.
|
||
* rl78-decode.c: Regenerate.
|
||
* rl78-dis.c: Fix display of stack pointer in MOVW based
|
||
instructions.
|
||
|
||
2016-01-14 Matthew Wahab <matthew.wahab@arm.com>
|
||
|
||
* aarch64-opc.c (aarch64_sys_reg_supported_p): Merge conditionals
|
||
testing for RAS support. Add checks for erxfr_el1, erxctlr_el1,
|
||
erxtatus_el1 and erxaddr_el1.
|
||
|
||
2016-01-12 Matthew Wahab <matthew.wahab@arm.com>
|
||
|
||
* arm-dis.c (arm_opcodes): Add "esb".
|
||
(thumb_opcodes): Likewise.
|
||
|
||
2016-01-11 Peter Bergner <bergner@vnet.ibm.com>
|
||
|
||
* ppc-opc.c <xscmpnedp>: Delete.
|
||
<xvcmpnedp>: Likewise.
|
||
<xvcmpnedp.>: Likewise.
|
||
<xvcmpnesp>: Likewise.
|
||
<xvcmpnesp.>: Likewise.
|
||
|
||
2016-01-08 Andreas Schwab <schwab@linux-m68k.org>
|
||
|
||
PR gas/13050
|
||
* m68k-opc.c (moveb, movew): For ISA_B/C only allow #,d(An) in
|
||
addition to ISA_A.
|
||
|
||
2016-01-01 Alan Modra <amodra@gmail.com>
|
||
|
||
Update year range in copyright notice of all files.
|
||
|
||
For older changes see ChangeLog-2015
|
||
|
||
Copyright (C) 2016 Free Software Foundation, Inc.
|
||
|
||
Copying and distribution of this file, with or without modification,
|
||
are permitted in any medium without royalty provided the copyright
|
||
notice and this notice are preserved.
|
||
|
||
Local Variables:
|
||
mode: change-log
|
||
left-margin: 8
|
||
fill-column: 74
|
||
version-control: never
|
||
End:
|