From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 92B8D3858C66 for ; Thu, 12 Jan 2023 17:07:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 92B8D3858C66 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673543268; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=wHkW6u8rr81A2ffH7bSRD+nTIz5zFw4yxl+QMHhx8gM=; b=A/BsUwDoq1qckoKZg+N0w/eSkRbaePHErZhpAaN8nSzPUojXzQM91cCmRR0CMcBQ5puaJB 5gj72ZSDgPIvK3rCJXILvvGuOJ4DzOlVLzXLYnPE0ZAnB8ue3wQjfzaIxZVBTVWL4tJNfn G0YX7qHDAwBqu+ug/Zx17nKbGQf8Ze4= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-413-Y3LbjajuPCa5pwQVgYMM0A-1; Thu, 12 Jan 2023 12:07:44 -0500 X-MC-Unique: Y3LbjajuPCa5pwQVgYMM0A-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 64F053811F3F; Thu, 12 Jan 2023 17:07:44 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.223]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 58FF1492B00; Thu, 12 Jan 2023 17:07:41 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 30CH7cNN3429568 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 12 Jan 2023 18:07:39 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 30CH7bBJ3429567; Thu, 12 Jan 2023 18:07:37 +0100 Date: Thu, 12 Jan 2023 18:07:37 +0100 From: Jakub Jelinek To: gcc-patches@gcc.gnu.org, Florian Weimer , Andre Vieira , Andrew Pinski , Jeff Law , richard.sandiford@arm.com Subject: Re: [PATCH] Various fixes for DWARF register size computation Message-ID: Reply-To: Jakub Jelinek References: <87pmbvx41g.fsf@oldenburg.str.redhat.com> <878rijwy0u.fsf@oldenburg.str.redhat.com> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: multipart/mixed; boundary="g0UkZhVs4XoZlKel" Content-Disposition: inline X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SCC_10_SHORT_WORD_LINES,SCC_20_SHORT_WORD_LINES,SCC_35_SHORT_WORD_LINES,SCC_5_SHORT_WORD_LINES,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --g0UkZhVs4XoZlKel Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Jan 12, 2023 at 04:50:07PM +0000, Richard Sandiford wrote: > I'm jumping in here without fully understanding the context, so maybe this > is exactly your point, but: the SIMD/FP DWARF registers are supposed to be > size 8 regardless of which features are enabled. That's already only half > of the hardware register size for base Armv8-A, since Advanced SIMD registers > are 16 bytes in size. > > So yeah, if we're using the hardware register size then something is wrong. I'm talking about what the following compiles to static unsigned char dwarf_reg_size_table[__LIBGCC_DWARF_FRAME_REGISTERS__+1]; void foo (void) { __builtin_init_dwarf_reg_size_table (dwarf_reg_size_table); } (and therefore what libgcc/unwind-dw2.c (init_dwarf_reg_size_table) as well) with -O2 -fbuilding-libgcc -march=armv8-a vs. -O2 -fbuilding-libgcc -march=armv8-a+sve The former is setting I think [0..31, 46, 48..63, 72..79, 96]=8, [64..71, 80..95]=0 (and leaving others untouched, which keeps them 0). While the latter is setting [0..31, 46, 72..79, 96]=8, [64..71, 80..95]=0 and [48..63]=cntd Jakub --g0UkZhVs4XoZlKel Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="8.s1" .arch armv8-a .file "8.c" .text .align 2 .align 4 .global foo .type foo, %function foo: .LFB0: adrp x2, .LANCHOR0 add x0, x2, :lo12:.LANCHOR0 mov w1, 8 strb w1, [x2, #:lo12:.LANCHOR0] strb w1, [x0, 1] strb w1, [x0, 2] strb w1, [x0, 3] strb w1, [x0, 4] strb w1, [x0, 5] strb w1, [x0, 6] strb w1, [x0, 7] strb w1, [x0, 8] strb w1, [x0, 9] strb w1, [x0, 10] strb w1, [x0, 11] strb w1, [x0, 12] strb w1, [x0, 13] strb w1, [x0, 14] strb w1, [x0, 15] strb w1, [x0, 16] strb w1, [x0, 17] strb w1, [x0, 18] strb w1, [x0, 19] strb w1, [x0, 20] strb w1, [x0, 21] strb w1, [x0, 22] strb w1, [x0, 23] strb w1, [x0, 24] strb w1, [x0, 25] strb w1, [x0, 26] strb w1, [x0, 27] strb w1, [x0, 28] strb w1, [x0, 29] strb w1, [x0, 30] strb w1, [x0, 31] strb wzr, [x0, 64] strb w1, [x0, 46] strb wzr, [x0, 65] strb wzr, [x0, 66] strb wzr, [x0, 67] strb wzr, [x0, 68] strb wzr, [x0, 69] strb wzr, [x0, 70] strb wzr, [x0, 71] strb w1, [x0, 72] strb w1, [x0, 73] strb w1, [x0, 74] strb w1, [x0, 75] strb w1, [x0, 76] strb w1, [x0, 77] strb w1, [x0, 78] strb w1, [x0, 79] strb wzr, [x0, 80] strb wzr, [x0, 81] strb wzr, [x0, 82] strb wzr, [x0, 83] strb wzr, [x0, 84] strb wzr, [x0, 85] strb wzr, [x0, 86] strb wzr, [x0, 87] strb wzr, [x0, 88] strb wzr, [x0, 89] strb wzr, [x0, 90] strb wzr, [x0, 91] strb wzr, [x0, 92] strb wzr, [x0, 93] strb wzr, [x0, 94] strb wzr, [x0, 95] strb w1, [x0, 48] strb w1, [x0, 49] strb w1, [x0, 50] strb w1, [x0, 51] strb w1, [x0, 52] strb w1, [x0, 53] strb w1, [x0, 54] strb w1, [x0, 55] strb w1, [x0, 56] strb w1, [x0, 57] strb w1, [x0, 58] strb w1, [x0, 59] strb w1, [x0, 60] strb w1, [x0, 61] strb w1, [x0, 62] strb w1, [x0, 63] strb w1, [x0, 96] ret .LFE0: .size foo, .-foo .bss .align 4 .set .LANCHOR0,. + 0 .type dwarf_reg_size_table, %object .size dwarf_reg_size_table, 98 dwarf_reg_size_table: .zero 98 .section .eh_frame,"aw",@progbits .Lframe1: .4byte .LECIE1-.LSCIE1 .LSCIE1: .4byte 0 .byte 0x3 .string "zR" .byte 0x1 .byte 0x78 .byte 0x1e .byte 0x1 .byte 0x1b .byte 0xc .byte 0x1f .byte 0 .align 3 .LECIE1: .LSFDE1: .4byte .LEFDE1-.LASFDE1 .LASFDE1: .4byte .LASFDE1-.Lframe1 .4byte .LFB0-. .4byte .LFE0-.LFB0 .byte 0 .align 3 .LEFDE1: .ident "GCC: (GNU) 13.0.0 20230111 (experimental)" .section .note.GNU-stack,"",@progbits --g0UkZhVs4XoZlKel Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="8.s2" .arch armv8-a+sve .file "8.c" .text .align 2 .align 4 .global foo .type foo, %function foo: .LFB0: adrp x3, .LANCHOR0 add x0, x3, :lo12:.LANCHOR0 mov w1, 8 cntd x2 strb w1, [x3, #:lo12:.LANCHOR0] strb w1, [x0, 1] strb w1, [x0, 2] strb w1, [x0, 3] strb w1, [x0, 4] strb w1, [x0, 5] strb w1, [x0, 6] strb w1, [x0, 7] strb w1, [x0, 8] strb w1, [x0, 9] strb w1, [x0, 10] strb w1, [x0, 11] strb w1, [x0, 12] strb w1, [x0, 13] strb w1, [x0, 14] strb w1, [x0, 15] strb w1, [x0, 16] strb w1, [x0, 17] strb w1, [x0, 18] strb w1, [x0, 19] strb w1, [x0, 20] strb w1, [x0, 21] strb w1, [x0, 22] strb w1, [x0, 23] strb w1, [x0, 24] strb w1, [x0, 25] strb w1, [x0, 26] strb w1, [x0, 27] strb w1, [x0, 28] strb w1, [x0, 29] strb w1, [x0, 30] strb w1, [x0, 31] strb wzr, [x0, 64] strb w1, [x0, 46] strb wzr, [x0, 65] strb wzr, [x0, 66] strb wzr, [x0, 67] strb wzr, [x0, 68] strb wzr, [x0, 69] strb wzr, [x0, 70] strb wzr, [x0, 71] strb w1, [x0, 72] strb w1, [x0, 73] strb w1, [x0, 74] strb w1, [x0, 75] strb w1, [x0, 76] strb w1, [x0, 77] strb w1, [x0, 78] strb w1, [x0, 79] strb wzr, [x0, 80] strb wzr, [x0, 81] strb wzr, [x0, 82] strb wzr, [x0, 83] strb wzr, [x0, 84] strb wzr, [x0, 85] strb wzr, [x0, 86] strb wzr, [x0, 87] strb wzr, [x0, 88] strb wzr, [x0, 89] strb wzr, [x0, 90] strb wzr, [x0, 91] strb wzr, [x0, 92] strb wzr, [x0, 93] strb wzr, [x0, 94] strb wzr, [x0, 95] strb w2, [x0, 48] strb w2, [x0, 49] strb w2, [x0, 50] strb w2, [x0, 51] strb w2, [x0, 52] strb w2, [x0, 53] strb w2, [x0, 54] strb w2, [x0, 55] strb w2, [x0, 56] strb w2, [x0, 57] strb w2, [x0, 58] strb w2, [x0, 59] strb w2, [x0, 60] strb w2, [x0, 61] strb w2, [x0, 62] strb w2, [x0, 63] strb w1, [x0, 96] ret .LFE0: .size foo, .-foo .bss .align 3 .set .LANCHOR0,. + 0 .type dwarf_reg_size_table, %object .size dwarf_reg_size_table, 98 dwarf_reg_size_table: .zero 98 .section .eh_frame,"aw",@progbits .Lframe1: .4byte .LECIE1-.LSCIE1 .LSCIE1: .4byte 0 .byte 0x3 .string "zR" .byte 0x1 .byte 0x78 .byte 0x1e .byte 0x1 .byte 0x1b .byte 0xc .byte 0x1f .byte 0 .align 3 .LECIE1: .LSFDE1: .4byte .LEFDE1-.LASFDE1 .LASFDE1: .4byte .LASFDE1-.Lframe1 .4byte .LFB0-. .4byte .LFE0-.LFB0 .byte 0 .align 3 .LEFDE1: .ident "GCC: (GNU) 13.0.0 20230111 (experimental)" .section .note.GNU-stack,"",@progbits --g0UkZhVs4XoZlKel--