From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DE2343857407; Fri, 21 Oct 2022 07:23:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DE2343857407 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666336992; bh=4aAg0+CV/HRVDkfyxmT0FF4edpMj4164yTVmS7/hbtc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=osD1Lq90qkF0bqFEkt4wBetNHABAlaZQ5ghQ69mQdva0x2g/iBFyAy0vPQNhFDiTN fbDkYUFYwBl9X7bocrAXgrqL/IZ3IkJBZl9bZcZ7ysxatkcVMdVmWTwGfsb0YGSFVa rf+BYY/1E6Y90qputkhxt+uuE1nGJf0+P9pykUeY= From: "yy172179 at 163 dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/107339] RISC V -mstrict-align Date: Fri, 21 Oct 2022 07:23:12 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 12.2.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: yy172179 at 163 dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107339 --- Comment #4 from yy --- It works to use "uint32_t_ua", but it still works to use "uint32_t" and just change the function parameter from the structure pointer to the structure. = "The following is the assembly code 0: 00154703 lbu a4,1(a0) 4: 00054783 lbu a5,0(a0) 8: 00354583 lbu a1,3(a0) c: 0722 slli a4,a4,0x8 e: 8f5d or a4,a4,a5 10: 00254783 lbu a5,2(a0) 14: 1141 addi sp,sp,-16 16: c226 sw s1,4(sp) 18: 07c2 slli a5,a5,0x10 1a: 8fd9 or a5,a5,a4 1c: 000004b7 lui s1,0x0 20: 05e2 slli a1,a1,0x18 22: c422 sw s0,8(sp) 24: 8ddd or a1,a1,a5 26: 842a mv s0,a0 28: 00048513 mv a0,s1 2c: c606 sw ra,12(sp) 2e: 00000097 auipc ra,0x0 32: 000080e7 jalr ra # 2e 36: 00244703 lbu a4,2(s0) 3a: 00144783 lbu a5,1(s0) 3e: 00444583 lbu a1,4(s0) 42: 0722 slli a4,a4,0x8 44: 8f5d or a4,a4,a5 46: 00344783 lbu a5,3(s0) 4a: 05e2 slli a1,a1,0x18 4c: 00048513 mv a0,s1 50: 07c2 slli a5,a5,0x10 52: 8fd9 or a5,a5,a4 54: 8ddd or a1,a1,a5 56: 00000097 auipc ra,0x0 5a: 000080e7 jalr ra # 56 5e: 00444703 lbu a4,4(s0) 62: 00344783 lbu a5,3(s0) 66: 00644583 lbu a1,6(s0) 6a: 0722 slli a4,a4,0x8 6c: 8f5d or a4,a4,a5 6e: 00544783 lbu a5,5(s0) 72: 4422 lw s0,8(sp) 74: 40b2 lw ra,12(sp) 76: 07c2 slli a5,a5,0x10 78: 00048513 mv a0,s1 7c: 4492 lw s1,4(sp) 7e: 8fd9 or a5,a5,a4 80: 05e2 slli a1,a1,0x18 82: 8ddd or a1,a1,a5 84: 0141 addi sp,sp,16 86: 00000317 auipc t1,0x0 8a: 00030067 jr t1 # 86 =