This is the mail archive of the
mailing list for the GCC project.
Re: [ARM] LLVM's -arm-assume-misaligned-load-store equivalent in GCC?
- From: Wilco Dijkstra <Wilco dot Dijkstra at arm dot com>
- To: Christophe Lyon <christophe dot lyon at linaro dot org>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Thu, 9 Jan 2020 20:27:18 +0000
- Subject: Re: [ARM] LLVM's -arm-assume-misaligned-load-store equivalent in GCC?
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FANMH8umu0AhzBFQHPOz4RYBSVsRthEWlYyiS0nqOfI=; b=SCBnea240HnvaBJXl5xbJmv43frCBpQnOCUNz921jJw/xUPsPoE/nM/b87MHEcV+dKVgG1qwXbN6hOW6cv1wJJF1RlGizhnSjkTDzVZa/9w8lVdu9zUXOhzAi194uiSVnFT+Ee/JGFMrtWHZOuR46AJtjKProEM/kDQWt9AHH0AB2lTpqr3tLHK4C8AvWvES8dUsGrl/mJ21gKLlaEs7Z9P7W969dAfaf0JN/iUkq+9hM/4HZwPQr+pkp20Rn7w8jMneJca4QkAXqPAtPMC4Ls5N5n45SHjsuaT893gSnPYek81UotwIAHQP4rn7Z8SMcAlIqJdcuIwK7cH5UnoWwA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QaavIaK+4h0lm76bVH0IB0A2q5Ei+y1V4H9vRyFr24Wv4j59oB4QzzUlSvQ/1Ek/5SL03pSXvyQFANr/ak4sIHm3uB1OXWT+NQJlthVqxoMBvuQRoWQ87j+7glK8/dyhh7nJctDrlXzUPV4h0bGLkLC/Gu0adln6pvTQUcY3vp6K3I9xaxNLK18WTiF5mX1zvtUy2CGTCXS3ODDq9tZ8i09D4Igoe2gmqeA5pJ+kw0sH9LtxsakhouvzqkCmctSKX43NQpipUhNR4p3pvAgFKKWrd6P/9oq6XBluHLl4A4WHgmDpSf8LNRu/cx4tstPrKDB79K0fVqJK0cRfgZn1UQ==
- Original-authentication-results: spf=none (sender IP is ) smtp.mailfrom=Wilco dot Dijkstra at arm dot com;
> Actually I got a confirmation of what I suspected: the offending function foo()
> is part of ARM CMSIS libraries, although the users are able to recompile them,
> they don't want to modify that source code. Having a compilation option to
> avoid generating problematic code sequences would be OK for them.
Well if LDRD instructions are incorrectly generated in those libraries for unaligned
accesses then why not report it as a CMSIS bug? Adding a complex new option like
this (with high impact to code quality) to workaround what seems a simple bug is
> So from the user's perspective, the wrong code is part of a 3rd party library
> which they can recompile but do not want to modify.
Would we expect every user of CMSIS to find this bug, find its cause, figure out
that a future GCC may have a new special option to avoid it, wait until that GCC
is released and then recompile?
Really, the best option is to report and modify the source until it is fixed.