From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1944) id 0C3053852C45; Wed, 23 Nov 2022 14:41:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0C3053852C45 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1669214488; bh=5VRXTVbGC9ilGH+SwYLmAs4MYY/M9eAVc6P5Fmb9Vvw=; h=From:To:Subject:Date:From; b=ldx87I8hGoQMl3jzANuAjMOb/X3hiJLN8ClCBD8xF+krPXJPcvaC3kXSl5Ua9m00W hq3MWbNP+z74Zd1Ogm8eDoDC3jUp7MAVfjPCz+WbJ4wD3xYQCkFIifQ5MpLnR7TSr2 ptOnmY49EGqlVfWDp0vCHW9Nhj0PSRYniUFhfOzQ= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Szabolcs Nagy To: glibc-cvs@sourceware.org Subject: [glibc/arm/morello/main] aarch64: morello: update sysdep.h for purecap ABI X-Act-Checkin: glibc X-Git-Author: Carlos Eduardo Seo X-Git-Refname: refs/heads/arm/morello/main X-Git-Oldrev: c75b4885df122eb0ad63802f7ca9e3604a0d10f3 X-Git-Newrev: c7f259679aed1eac4732b01279e04a301d5160df Message-Id: <20221123144128.0C3053852C45@sourceware.org> Date: Wed, 23 Nov 2022 14:41:28 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=c7f259679aed1eac4732b01279e04a301d5160df commit c7f259679aed1eac4732b01279e04a301d5160df Author: Carlos Eduardo Seo Date: Tue May 18 17:24:34 2021 -0300 aarch64: morello: update sysdep.h for purecap ABI Add macro definitions for purecap ABI in sysdep.h. Diff: --- sysdeps/aarch64/sysdep.h | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/sysdeps/aarch64/sysdep.h b/sysdeps/aarch64/sysdep.h index 5c8e6d50c2..6575503c8b 100644 --- a/sysdeps/aarch64/sysdep.h +++ b/sysdeps/aarch64/sysdep.h @@ -21,12 +21,19 @@ #include -#ifdef __LP64__ +#if defined __LP64__ || defined __CHERI_PURE_CAPABILITY__ # define AARCH64_R(NAME) R_AARCH64_ ## NAME # define PTR_REG(n) x##n # define PTR_LOG_SIZE 3 # define PTR_ARG(n) # define SIZE_ARG(n) +# ifdef __CHERI_PURE_CAPABILITY__ +# define MORELLO_R(NAME) R_MORELLO_ ## NAME +# undef PTR_REG +# define PTR_REG(n) c##n +# undef PTR_LOG_SIZE +# define PTR_LOG_SIZE 4 +# endif #else # define AARCH64_R(NAME) R_AARCH64_P32_ ## NAME # define PTR_REG(n) w##n @@ -145,6 +152,9 @@ GNU_PROPERTY (FEATURE_1_AND, FEATURE_1_BTI) /* If compiled for profiling, call `mcount' at the start of each function. */ #ifdef PROF +# ifdef __CHERI_PURE_CAPABILITY__ +# error mcount profiling is not supported with purecap ABI +# endif # define CALL_MCOUNT \ str x30, [sp, #-80]!; \ cfi_adjust_cfa_offset (80); \ @@ -200,9 +210,15 @@ GNU_PROPERTY (FEATURE_1_AND, FEATURE_1_BTI) ldr PTR_REG (T), [x##T, #:got_lo12:EXPR]; \ OP PTR_REG (R), [x##T]; +#ifdef __CHERI_PURE_CAPABILITY__ +/* These are not used in purecap asm. */ +# undef LDST_PCREL +# undef LDST_GLOBAL +#endif + /* Load an immediate into R. Note R is a register number and not a register name. */ -#ifdef __LP64__ +#if defined __LP64__ || defined __CHERI_PURE_CAPABILITY__ # define MOVL(R, NAME) \ movz x##R, #:abs_g3:NAME; \ movk x##R, #:abs_g2_nc:NAME; \