From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 61924 invoked by alias); 29 Nov 2017 20:13:36 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 61915 invoked by uid 89); 29 Nov 2017 20:13:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,KAM_SHORT,KB_WAM_FROM_NAME_SINGLEWORD,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2 spammy=sk:wmissin, din_gcc, sk:Wmissin, DIN_GCC X-HELO: mail-vk0-f41.google.com Received: from mail-vk0-f41.google.com (HELO mail-vk0-f41.google.com) (209.85.213.41) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 29 Nov 2017 20:13:33 +0000 Received: by mail-vk0-f41.google.com with SMTP id x140so2036608vke.4 for ; Wed, 29 Nov 2017 12:13:33 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=eNDlkRSoddlt4B4olDT/VXg4o/fQJDi1IyEqfF1UlXg=; b=swdK5X2vdW140C/cbUdkvZLuWfQ1uAnApd/ENUFZ9S4aByiNm9M3INvmrR6bf2QNQ+ uWOB0QnfaAwuKi73rqQ0II0Q2VGXk7o4xtbWVLUJB8lbZ6cpjSQUiHKzPv94R9NrwMSC nb5+uR2/c5IZSyXox6apQHEY9/PXYW+3Kpm2QiDBhe6bHaCEE1ueO96oAakYQjRwcxBg Hf6/cWPr/+sbKWYlW4qCmMzzmuolsGCc9XOCRGhu6gtIRPZrpt7dLjssgMlLHOC1CYYZ 6i6/KWriQ+NHZxfeKSIszeFqoNrEF9E9TCgmJpMbuKNwhz2ySOrIrbUsCXEj3yQS+we9 s/0g== X-Gm-Message-State: AJaThX4iI3Gw0CrhNVN/oygK8HBJlg8+cYBuWLZnwpbCk2pGYfhGy0Fi Ddoo6+BGanpceEVb5H3dxGmNlhB1j4Y9ZBL39nol8izr8Ls= X-Google-Smtp-Source: AGs4zMaNZ657pbIacY8w3QoNE+7dtbaApRK9KVl8uyHOhpCBL5WG1PR3IaHXwDHZIVQ7fK6cy/kvNgY8Q18OnF2LTMo= X-Received: by 10.31.85.7 with SMTP id j7mr62069vkb.168.1511986411698; Wed, 29 Nov 2017 12:13:31 -0800 (PST) MIME-Version: 1.0 Received: by 10.103.120.208 with HTTP; Wed, 29 Nov 2017 12:13:31 -0800 (PST) In-Reply-To: <20171128181500.GA25893@arm.com> References: <20171128181500.GA25893@arm.com> From: Christophe Lyon Date: Wed, 29 Nov 2017 21:03:00 -0000 Message-ID: Subject: Re: [PATCH][AArch64] Fix ICE due to store_pair_lanes To: James Greenhalgh Cc: Wilco Dijkstra , GCC Patches , nd Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2017-11/txt/msg02511.txt.bz2 On 28 November 2017 at 19:15, James Greenhalgh wrote: > On Mon, Nov 27, 2017 at 03:20:29PM +0000, Wilco Dijkstra wrote: >> The recently added store_pair_lanes causes ICEs in output_operand. >> This is due to aarch64_classify_address treating it like a 128-bit STR >> rather than a STP. The valid immediate offsets don't fully overlap, >> causing it to return false. Eg. offset 264 is a valid 8-byte STP offset >> but not a valid 16-byte STR offset since it isn't a multiple of 16. >> >> The original instruction isn't passed in the printing code, so the context >> is unclear. The solution is to add a new operand formatting specifier >> which is used for LDP/STP instructions like this. This, like the Uml >> constraint that applies to store_pair_lanes, uses PARALLEL when calling >> aarch64_classify_address so that it knows it is an STP. >> Also add the 'z' specifier for future use by load/store pair instructions. >> >> Passes regress, OK for commit? > > OK. But... > >> + if (aarch64_classify_address (&addr, x, mode, op, true)) > > This interface is not nice, resulting in... > >> +/* Print address 'x' of a LDP/STP with mode 'mode'. */ >> +static void >> +aarch64_print_ldpstp_address (FILE *f, machine_mode mode, rtx x) >> +{ >> + aarch64_print_address_internal (f, mode, x, PARALLEL); >> +} >> + >> +/* Print address 'x' of a memory access with mode 'mode'. */ >> +static void >> +aarch64_print_operand_address (FILE *f, machine_mode mode, rtx x) >> +{ >> + aarch64_print_address_internal (f, mode, x, MEM); >> +} > > These, which I *really* dislike. > > Ideas on how to clean up this interface would be appreciated. > > Thanks, > James > Hi Wilco, This breaks the build of aarch64-none-elf toolchains: /tmp/8868058_9.tmpdir/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-aarch64_be-none-elf/gcc1/./gcc/xgcc -B/tmp/8868058_9.tmpdir/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-aarch64_be-none-elf/gcc1/./gcc/ -B/tmp/8868058_9.tmpdir/aci-gcc-fsf/builds/gcc-fsf-gccsrc/tools/aarch64_be-none-elf/bin/ -B/tmp/8868058_9.tmpdir/aci-gcc-fsf/builds/gcc-fsf-gccsrc/tools/aarch64_be-none-elf/lib/ -isystem /tmp/8868058_9.tmpdir/aci-gcc-fsf/builds/gcc-fsf-gccsrc/tools/aarch64_be-none-elf/include -isystem /tmp/8868058_9.tmpdir/aci-gcc-fsf/builds/gcc-fsf-gccsrc/tools/aarch64_be-none-elf/sys-include -g -O2 -mabi=ilp32 -O2 -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc -I. -I. -I../../.././gcc -I/tmp/8868058_9.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libgcc -I/tmp/8868058_9.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libgcc/. -I/tmp/8868058_9.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libgcc/../gcc -I/tmp/8868058_9.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libgcc/../include -o unwind-dw2-fde.o -MT unwind-dw2-fde.o -MD -MP -MF unwind-dw2-fde.dep -fexceptions -c /tmp/8868058_9.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libgcc/unwind-dw2-fde.c -fvisibility=hidden -DHIDE_EXPORTS during RTL pass: final /tmp/8868058_9.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libgcc/unwind-dw2-fde.c: In function 'search_object': /tmp/8868058_9.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libgcc/unwind-dw2-fde.c:1024:1: internal compiler error: in aarch64_print_address_internal, at config/aarch64/aarch64.c:5637 } ^ 0xf2259e aarch64_print_address_internal /tmp/8868058_9.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/gcc/config/aarch64/aarch64.c:5637 0x7fb063 output_address(machine_mode, rtx_def*) /tmp/8868058_9.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/gcc/final.c:3905 0x7fe563 output_asm_insn(char const*, rtx_def**) /tmp/8868058_9.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/gcc/final.c:3766 0x7fed04 final_scan_insn(rtx_insn*, _IO_FILE*, int, int, int*) /tmp/8868058_9.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/gcc/final.c:3064 0x7ffcfa final(rtx_insn*, _IO_FILE*, int) /tmp/8868058_9.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/gcc/final.c:2052 0x80088b rest_of_handle_final /tmp/8868058_9.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/gcc/final.c:4490 0x80088b execute /tmp/8868058_9.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/gcc/final.c:4564 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions. make[4]: *** [unwind-dw2-fde.o] Error 1 make[4]: Leaving directory `/tmp/8868058_9.tmpdir/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-aarch64_be-none-elf/gcc1/aarch64_be-none-elf/ilp32/libgcc' make[3]: *** [multi-do] Error 1 Can you have a look? Thanks, Christophe