From nobody Tue Jun 25 09:37:55 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W7frh02fTz5PBdp; Tue, 25 Jun 2024 09:37:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W7frg6b2Hz4N6Q; Tue, 25 Jun 2024 09:37:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719308275; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wzw4YyWl+Yn2d4cl9FBmyZSM03ChMwOOhXP5LqQ4mC8=; b=uWbNytTFsjPxxlh4HhwzBhtSG2AgviIvCti+QgmbCpSyFeY4RQ+xhDeoN//y82LFDTU8yV alu84Wj4LzTzK1ede8mh0c8xDlJXxSN/VTFbfwq10hmQy1g2ROzMe7IZ5mCGLQAQKTydTi Tu5qEZKGfT3zNQAAZcFtgow1GsXU6v48VWpz0X1Iy4U49/WLQyc1MFJt+uKzRsBSPI/Ssj rUbixvyESVtPID1gUL55KaZa3MqMK984EpxQ5X7toOD03khafkuZ2bqIV18S3KXozMVuRB sySPg9t1m5aqkhlQ/G9k3J73RAr5H1QsN0Jy7q1xZVg371dF8xX88MHf4Vp+Xg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719308275; a=rsa-sha256; cv=none; b=CaV2LgW0+2p555fsx50K1tXYQ6aNRUFmCHijRK3l+6/J/56IB775JDZBnX97FL2DPSlOyP 4dblr6to1LtOPQQ6+aMhBKkof6gOgyyvnm+EI7UnFs0Pkzcg0/Di38ZmBL/LO/Nok5bU0E mb3wOpauKnKDx/G0jMZQWvkqcuMTTqaiy5x6FAKDt4WDH1eHLjQPJ/bUzOJxR1SAkpCXUb M3hTFNkrVdNTo17xyalSomRblBEpV+KNDxbS0Q8H38tFvbymMUTOAjIxy3/jvqMADGdmZ2 UCpzK9cS4EaFh4WqlWK+ckB4gBTjmcQbaRrp7hzCMFsoPiHVJb6S5MCRFly6Xw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719308275; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wzw4YyWl+Yn2d4cl9FBmyZSM03ChMwOOhXP5LqQ4mC8=; b=ghHTatbDySvoJK0156P4UbV/f22OaJbbcuQPI4K3vMmH2ax36wz7emexQXYPt02mt6qyyn Wajcn6y1SCmjbUDI/Lx9BHwJw6r7UGw0kgvIr1kdsJAta6TDp6hZ/Xfh4ytQwZkTCozfod pu3Lqh8kX7c4ouPYZOjSWPh3utdlU2Xcry/8BOq+4sIynbp3FVqGVEZ916PZsDcmmn4hxY ah82LcQpomWEL0vPym/f9U/v+llT+QZEPNwBwfetPZRjoSJJyfDyznrjLCAqX7ldxVcDAs TT9Zgv0EErCikZX7g0kc1HV0KQo1//NHSOtjppXm+C3CAdirvsxMRQOIG9+Vkg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W7frg6BfGzwsV; Tue, 25 Jun 2024 09:37:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45P9btRp012802; Tue, 25 Jun 2024 09:37:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45P9btW3012799; Tue, 25 Jun 2024 09:37:55 GMT (envelope-from git) Date: Tue, 25 Jun 2024 09:37:55 GMT Message-Id: <202406250937.45P9btW3012799@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 36e0db4916c5 - main - Revert "arm: Start to remove the now unneeded acle-compat.h" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 36e0db4916c5957dbea4e8451b15bd7b846ed272 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=36e0db4916c5957dbea4e8451b15bd7b846ed272 commit 36e0db4916c5957dbea4e8451b15bd7b846ed272 Author: Andrew Turner AuthorDate: 2024-06-25 09:37:14 +0000 Commit: Andrew Turner CommitDate: 2024-06-25 09:37:14 +0000 Revert "arm: Start to remove the now unneeded acle-compat.h" This reverts commit 3d02fe6c59dc87b265f268233cd574f7f04edb5d. This wasn't ready to be committed --- sys/arm/include/acle-compat.h | 158 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 155 insertions(+), 3 deletions(-) diff --git a/sys/arm/include/acle-compat.h b/sys/arm/include/acle-compat.h index 75e7e3774491..0d5726b7846c 100644 --- a/sys/arm/include/acle-compat.h +++ b/sys/arm/include/acle-compat.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Arm Ltd + * Copyright (c) 2014 ARM Ltd * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -27,5 +27,157 @@ */ #ifndef __ARM_ARCH -#error You compiler is too old -#endif + +/* ACLE standardises a set of pre-defines that describe the ARM architecture. + These were mostly implemented in GCC around GCC-4.8; older versions + have no, or only partial support. To provide a level of backwards + compatibility we try to work out what the definitions should be, given + the older pre-defines that GCC did produce. This isn't complete, but + it should be enough for use by routines that depend on this header. */ + +/* No need to handle ARMv8, GCC had ACLE support before that. */ + +#define __ARM_ACLE 101 + +# ifdef __ARM_ARCH_7__ +/* The common subset of ARMv7 in all profiles. */ +# define __ARM_ARCH 7 +# define __ARM_ARCH_ISA_THUMB 2 +# define __ARM_FEATURE_CLZ +# define __ARM_FEATURE_LDREX 7 +# define __ARM_FEATURE_UNALIGNED +# endif + +# if defined (__ARM_ARCH_7A__) || defined (__ARM_ARCH_7R__) +# define __ARM_ARCH 7 +# define __ARM_ARCH_ISA_THUMB 2 +# define __ARM_ARCH_ISA_ARM +# define __ARM_FEATURE_CLZ +# define __ARM_FEATURE_SIMD32 +# define __ARM_FEATURE_DSP +# define __ARM_FEATURE_QBIT +# define __ARM_FEATURE_SAT +# define __ARM_FEATURE_LDREX 15 +# define __ARM_FEATURE_UNALIGNED +# ifdef __ARM_ARCH_7A__ +# define __ARM_ARCH_PROFILE 'A' +# else +# define __ARM_ARCH_PROFILE 'R' +# endif +# endif + +# ifdef __ARM_ARCH_7EM__ +# define __ARM_ARCH 7 +# define __ARM_ARCH_ISA_THUMB 2 +# define __ARM_FEATURE_CLZ +# define __ARM_FEATURE_SIMD32 +# define __ARM_FEATURE_DSP +# define __ARM_FEATURE_QBIT +# define __ARM_FEATURE_SAT +# define __ARM_FEATURE_LDREX 7 +# define __ARM_FEATURE_UNALIGNED +# define __ARM_ARCH_PROFILE 'M' +# endif + +# ifdef __ARM_ARCH_7M__ +# define __ARM_ARCH 7 +# define __ARM_ARCH_ISA_THUMB 2 +# define __ARM_FEATURE_CLZ +# define __ARM_FEATURE_QBIT +# define __ARM_FEATURE_SAT +# define __ARM_FEATURE_LDREX 7 +# define __ARM_FEATURE_UNALIGNED +# define __ARM_ARCH_PROFILE 'M' +# endif + +# ifdef __ARM_ARCH_6T2__ +# define __ARM_ARCH 6 +# define __ARM_ARCH_ISA_THUMB 2 +# define __ARM_ARCH_ISA_ARM +# define __ARM_FEATURE_CLZ +# define __ARM_FEATURE_SIMD32 +# define __ARM_FEATURE_DSP +# define __ARM_FEATURE_QBIT +# define __ARM_FEATURE_SAT +# define __ARM_FEATURE_LDREX 4 +# define __ARM_FEATURE_UNALIGNED +# endif + +# ifdef __ARM_ARCH_6M__ +# define __ARM_ARCH 6 +# define __ARM_ARCH_ISA_THUMB 1 +# define __ARM_ARCH_PROFILE 'M' +# endif + +# if defined (__ARM_ARCH_6__) || defined (__ARM_ARCH_6J__) \ + || defined (__ARM_ARCH_6K__) || defined (__ARM_ARCH_6Z__) \ + || defined (__ARM_ARCH_6ZK__) +# define __ARM_ARCH 6 +# define __ARM_ARCH_ISA_THUMB 1 +# define __ARM_ARCH_ISA_ARM +# define __ARM_FEATURE_CLZ +# define __ARM_FEATURE_SIMD32 +# define __ARM_FEATURE_DSP +# define __ARM_FEATURE_QBIT +# define __ARM_FEATURE_SAT +# define __ARM_FEATURE_UNALIGNED +# ifndef __thumb__ +# if defined (__ARM_ARCH_6K__) || defined (__ARM_ARCH_6ZK__) +# define __ARM_FEATURE_LDREX 15 +# else +# define __ARM_FEATURE_LDREX 4 +# endif +# endif +# endif + +# if defined (__ARM_ARCH_5TE__) || defined (__ARM_ARCH_5E__) +# define __ARM_ARCH 5 +# define __ARM_ARCH_ISA_ARM +# ifdef __ARM_ARCH_5TE__ +# define __ARM_ARCH_ISA_THUMB 1 +# endif +# define __ARM_FEATURE_CLZ +# define __ARM_FEATURE_DSP +# endif + +# if defined (__ARM_ARCH_5T__) || defined (__ARM_ARCH_5__) +# define __ARM_ARCH 5 +# define __ARM_ARCH_ISA_ARM +# ifdef __ARM_ARCH_5TE__ +# define __ARM_ARCH_ISA_THUMB 1 +# endif +# define __ARM_FEATURE_CLZ +# endif + +# ifdef __ARM_ARCH_4T__ +# define __ARM_ARCH 4 +# define __ARM_ARCH_ISA_ARM +# define __ARM_ARCH_ISA_THUMB 1 +# endif + +# ifdef __ARM_ARCH_4__ +# define __ARM_ARCH 4 +# define __ARM_ARCH_ISA_ARM +# endif + +# if defined (__ARM_ARCH_3__) || defined (__ARM_ARCH_3M__) +# define __ARM_ARCH 3 +# define __ARM_ARCH_ISA_ARM +# endif + +# ifdef __ARM_ARCH_2__ +# define __ARM_ARCH 2 +# define __ARM_ARCH_ISA_ARM +# endif + +# ifdef __ARMEB__ +# define __ARM_BIG_ENDIAN +# endif + +/* If we still don't know what the target architecture is, then we're + probably not using GCC. */ +# ifndef __ARM_ARCH +# error Unable to determine architecture version. +# endif + +#endif /* __ARM_ARCH */