bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gas/22819] powerpc gas "instruction address is not a multiple of 4"


From: cvs-commit at gcc dot gnu.org
Subject: [Bug gas/22819] powerpc gas "instruction address is not a multiple of 4"
Date: Thu, 08 Feb 2018 03:31:30 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=22819

--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot 
gnu.org> ---
The master branch has been updated by Alan Modra <address@hidden>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a9479dc051ab00f311c04cdd5b299a70739f67ed

commit a9479dc051ab00f311c04cdd5b299a70739f67ed
Author: Alan Modra <address@hidden>
Date:   Thu Feb 8 10:18:59 2018 +1030

    PR22819, powerpc gas "instruction address is not a multiple of 4"

    Checks for insn alignment were hopelessly confused when misaligned
    data starts a new frag.  The real-world testcase happened to run out
    of frag space in the middle of emitting a trace-back table via
    something like:
        .byte 0         /* VERSION=0 */
        .byte 9         /* LANG=C++ */
        .byte 34        /* Bits on: has_tboff, fp_present */
        .byte 64        /* Bits on: name_present */
        .byte 128       /* Bits on: stores_bc, FP_SAVED=0 */
        .byte 0         /* Bits on: GP_SAVED=0 */
        .byte 2         /* FIXEDPARMS=2 */
        .byte 1         /* FLOATPARMS=0, parmsonstk */
        .long 0
        .long 768       /* tb_offset: 0x300 */
        .hword 45       /* Function name length: 45 */
        .long 0x334e5a5f
        .long 0x31766f70
        .long 0x65744932
        .long 0x69746172
        .long 0x7a5f6e6f
        .long 0x64504533
        .long 0x5f534e50
        .long 0x72463431
        .long 0x61746361
        .long 0x74535f6c
        .long 0x74637572
        .byte 0x45
        .byte 0
    The trigger being those misaligned .long's output for the function
    name.  A most horrible way to output a string, especially considering
    endian issues..

        PR 22819
        * config/tc-ppc.c (md_assemble): Rewrite insn alignment checking.
        (ppc_frag_check): Likewise.
        * testsuite/gas/ppc/misalign.d,
        * testsuite/gas/ppc/misalign.l,
        * testsuite/gas/ppc/misalign.s: New test.
        * testsuite/gas/ppc/misalign2.d,
        * testsuite/gas/ppc/misalign2.s: New test.
        * testsuite/gas/ppc/ppc.exp: Run them.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]