From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25040 invoked by alias); 24 Oct 2017 15:20:52 -0000 Mailing-List: contact newlib-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: newlib-owner@sourceware.org Received: (qmail 25031 invoked by uid 89); 24 Oct 2017 15:20:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.7 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: EUR01-VE1-obe.outbound.protection.outlook.com Received: from mail-ve1eur01on0074.outbound.protection.outlook.com (HELO EUR01-VE1-obe.outbound.protection.outlook.com) (104.47.1.74) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 24 Oct 2017 15:20:49 +0000 Received: from DB6PR0802MB2309.eurprd08.prod.outlook.com (10.172.228.13) by DB6PR0802MB2392.eurprd08.prod.outlook.com (10.172.250.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.178.6; Tue, 24 Oct 2017 15:20:45 +0000 Received: from DB6PR0802MB2309.eurprd08.prod.outlook.com ([fe80::aca9:7d55:a31b:496d]) by DB6PR0802MB2309.eurprd08.prod.outlook.com ([fe80::aca9:7d55:a31b:496d%18]) with mapi id 15.20.0156.007; Tue, 24 Oct 2017 15:20:45 +0000 From: Tamar Christina To: Richard Earnshaw , Alexander Fedotov , "newlib@sourceware.org" CC: nd Subject: RE: [PATCH] Semihosting fix for AArch64 when heapinfo is not provided by debugger Date: Tue, 24 Oct 2017 15:28:00 -0000 Message-ID: References: <20171013091612.GE20139@calimero.vinschen.de> In-Reply-To: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Tamar.Christina@arm.com; x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DB6PR0802MB2392;6:q7a2YHCuHI5yBUUHDJYc2LL9c4ANfpFIscPPgRi31KSje97fGR0zKoAuDrl76+01cflZnyZN7/jfOibz9z1Ugc74HLeX6jfrwR+UxuEk3PeCbv+RwoZeY+LJXsP7MNbnrTHlnfq0OLNVnlI0qPTGSjwZIvH+rlOaW6UqQ40xjWlThhMGq83eWZANGnrbJP2ar03yfIIFjtJkrnb7/rOrNrOnghWbpEUZEdta/YbJNhgyH2+0vp0BVqk8B5CAFzbYRPZtLTSUk35WC/aWXuhRXlMR4pSav3rKmr/xaN7i/VOrqCDGKSDf8GysNW8Y8LaVulMPw1jk5YZlpStohMpz2/dIzqh5N72roXqLzjiz1l4=;5:nip2GLkOVRGCzDRovtKQWGRh9Ox5fwfavGdh7AOXcWbREF17hF67SWFKg5fB1k/C6+Ll4Tf8DyMMDpBetgWdmmCEBk1hFWCCfJLfYcmVnNhDwUfbTnoR0SGxuE+AtWtazVvBsJnTNrE5OcJomAK5lbhGAAnjSetHjmzsuAhj9ig=;24:I3MmQEt0ZjsTc59cdUYb0EAUAB5bBMOrw53DWFPHywmcIuMU3dq0QAhx7FW01mFpj8OtP+mvRwhUg2/y4ArGp1y67QU4+2jfP9r04YpdSAI=;7:Uy4Kn8rbH4f/PH9lX2l9oFfv4hLkg6xYdPUiT+oVU8IooE8d7xqRXMoDFS51QKSxcFx9LXRNqwc1GWncLKY0zu/uayLUdsilsYaw93tba5C8BYUJ/XCA2t1XLXVk9gYuu17+R+Cy/gTkSIIFT91tbIOyXK7lSu5I6XzM/yBWbPnTnfgRQT0edHE4aQLhP+pkZMCksg8Ho1grLCxdFoGMp/JIYq5THIq+hoQ8n56G0FFqUc8ppmHuQcCjagdZ3khV x-ms-exchange-antispam-srfa-diagnostics: SSOS;SSOR; x-ms-office365-filtering-correlation-id: b611f09e-908a-4e3d-7c49-08d51af2cc33 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(48565401081)(4534020)(4602075)(4627075)(201703031133081)(201702281549075)(2017052603199);SRVR:DB6PR0802MB2392; x-ms-traffictypediagnostic: DB6PR0802MB2392: nodisclaimer: True x-exchange-antispam-report-test: UriScan:(180628864354917); x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(93006095)(93001095)(100000703101)(100105400095)(3002001)(3231020)(10201501046)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123564025)(20161123555025)(20161123562025)(20161123560025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:DB6PR0802MB2392;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:DB6PR0802MB2392; x-forefront-prvs: 047001DADA x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(346002)(376002)(39860400002)(189002)(199003)(13464003)(24454002)(3660700001)(55016002)(189998001)(86362001)(3280700002)(99286003)(106356001)(9686003)(105586002)(110136005)(2950100002)(101416001)(33656002)(7696004)(50986999)(54356999)(76176999)(2906002)(5660300001)(93886005)(6436002)(25786009)(229853002)(14454004)(305945005)(7736002)(74316002)(4326008)(6506006)(68736007)(66066001)(2900100001)(8936002)(3846002)(6116002)(81156014)(102836003)(81166006)(5250100002)(53546010)(6246003)(97736004)(72206003)(478600001)(8676002)(53936002)(316002)(39060400002)(2501003);DIR:OUT;SFP:1101;SCL:1;SRVR:DB6PR0802MB2392;H:DB6PR0802MB2309.eurprd08.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: b611f09e-908a-4e3d-7c49-08d51af2cc33 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Oct 2017 15:20:45.1720 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0802MB2392 X-IsSubscribed: yes X-SW-Source: 2017/txt/msg01049.txt.bz2 > -----Original Message----- > From: Richard Earnshaw (lists) [mailto:Richard.Earnshaw@arm.com] > Sent: 24 October 2017 16:20 > To: Tamar Christina; Alexander Fedotov; newlib@sourceware.org > Cc: nd > Subject: Re: [PATCH] Semihosting fix for AArch64 when heapinfo is not > provided by debugger >=20 > On 23/10/17 18:23, Tamar Christina wrote: > > Hi Alex, > > > > In principle nothing against the patch. Just a comment > > > >> diff --git a/libgloss/aarch64/crt0.S b/libgloss/aarch64/crt0.S index > >> f670e03..f831be1 100644 > >> --- a/libgloss/aarch64/crt0.S > >> +++ b/libgloss/aarch64/crt0.S > >> @@ -102,33 +102,44 @@ > >> ldr x0, .LC0 /* point at returned values */ > >> ldr x1, [x0, #8] /* get heap_limit */ > >> > >> + /* Set __heap_limit. */ > >> +#ifdef __ILP32__ > >> + /* Sanity check on the __heap_limit. */ > >> + tst x1, #0xffffffff00000000 > >> + bne .Linsanepar > >> +#endif > > > > if x1 is 0 it won't pass the first test in ILP32 and takes the branch, > > I assume you intended it to fall through in that case? So I think this > > test should be re-ordered. >=20 > Huh? zero & anything is zero, so the Z bit will be set and the branch wi= ll not > be taken. >=20 Yes, sorry, I flipped the mask. Disregard my earlier comment. >=20 > > > >> + cmp x1, xzr > >> + beq .LC4 > >> + adrp x2, __heap_limit > >> + add x2, x2, #:lo12:__heap_limit > >> + str x1, [x2] > >> +.LC4: > > > > Thanks, > > Tamar > > >=20 > Looks basically OK to me. >=20 > R. >=20 > > > > > >> -----Original Message----- > >> From: newlib-owner@sourceware.org [mailto:newlib- > >> owner@sourceware.org] On Behalf Of Alexander Fedotov > >> Sent: 19 October 2017 22:41 > >> To: newlib@sourceware.org > >> Subject: Re: [PATCH] Semihosting fix for AArch64 when heapinfo is not > >> provided by debugger > >> > >> Any comments/thoughts on this patch ? > >> It would be great to have this feature in newlib release version. > >> > >> Alex > >> > >> On Fri, 13 Oct 2017 at 12:16, Corinna Vinschen > >> wrote: > >> > >>> On Oct 11 14:57, Alexander Fedotov wrote: > >>>> Use the same approach as in ARM port for case when Debugger not > >>>> providing necessary info for semihosting. > >>> > >>> I'd like to see an ACK from some arm folks. > >>> > >>> > >>> Thanks, > >>> Corinna > >>> > >>> -- > >>> Corinna Vinschen > >>> Cygwin Maintainer > >>> Red Hat > >>> > >> -- > >> Best regards, > >> AF