From patchwork Tue Jun 21 12:06:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhang Jian(Bamvor)" X-Patchwork-Id: 13281 Received: (qmail 17438 invoked by alias); 21 Jun 2016 12:08:21 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 17406 invoked by uid 89); 21 Jun 2016 12:08:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy=apr, Apr X-HELO: szxga05-in.huawei.com Subject: Re: [RFC PATCH 00/27] ARM64: support ILP32 To: Yury Norov , , References: <1466485631-3532-1-git-send-email-ynorov@caviumnetworks.com> CC: , , , , , , , , , "jijun (D)" , "Zhangjian (Bamvor)" From: "Zhangjian (Bamvor)" Message-ID: <57692DBA.6080103@huawei.com> Date: Tue, 21 Jun 2016 20:06:18 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <1466485631-3532-1-git-send-email-ynorov@caviumnetworks.com> X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020202.57692DCE.01A2, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: f98270760a3f9120d45c7772da56d952 Hi, In our test, we need to fix stack pointer in makecontext. Not sure if it should be a standalone patch: From 1d51ca34034ef83ea602874a93e26fd158ddd214 Mon Sep 17 00:00:00 2001 From: Jun Ji Date: Fri, 29 Apr 2016 17:20:23 +0800 Subject: [PATCH] fix for makecontext error Signed-off-by: Jun Ji --- sysdeps/unix/sysv/linux/aarch64/makecontext.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sysdeps/unix/sysv/linux/aarch64/makecontext.c b/sysdeps/unix/sysv/linux/aarch64/makecontext.c index 34f91a3..55a26a3 100644 --- a/sysdeps/unix/sysv/linux/aarch64/makecontext.c +++ b/sysdeps/unix/sysv/linux/aarch64/makecontext.c @@ -42,18 +42,18 @@ void __makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...) { extern void __startcontext (void); - unsigned long int *sp; + unsigned long long *sp; va_list ap; int i; - sp = (unsigned long int *) + sp = (unsigned long long *) ((uintptr_t) ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size); /* Allocate stack arguments. */ sp -= argc < 8 ? 0 : argc - 8; /* Keep the stack aligned. */ - sp = (unsigned long int *) (((uintptr_t) sp) & -16L); + sp = (unsigned long long *) (((uintptr_t) sp) & -16L); ucp->uc_mcontext.regs[19] = (uintptr_t) ucp->uc_link; ucp->uc_mcontext.sp = (uintptr_t) sp; @@ -64,9 +64,9 @@ __makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...) va_start (ap, argc); for (i = 0; i < argc; ++i) if (i < 8) - ucp->uc_mcontext.regs[i] = va_arg (ap, unsigned long int); + ucp->uc_mcontext.regs[i] = va_arg (ap, unsigned long long); else - sp[i - 8] = va_arg (ap, unsigned long int); + sp[i - 8] = va_arg (ap, unsigned long long); va_end (ap); }