From patchwork Thu Apr 21 15:52:41 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ken Werner X-Patchwork-Id: 1145 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:49:38 -0000 Delivered-To: patches@linaro.org Received: by 10.224.67.148 with SMTP id r20cs169678qai; Thu, 21 Apr 2011 08:53:03 -0700 (PDT) Received: by 10.216.234.203 with SMTP id s53mr111432weq.54.1303401182934; Thu, 21 Apr 2011 08:53:02 -0700 (PDT) Received: from mtagate5.uk.ibm.com (mtagate5.uk.ibm.com [194.196.100.165]) by mx.google.com with ESMTPS id f62si4438081wej.153.2011.04.21.08.53.02 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 21 Apr 2011 08:53:02 -0700 (PDT) Received-SPF: neutral (google.com: 194.196.100.165 is neither permitted nor denied by best guess record for domain of ken.werner@linaro.org) client-ip=194.196.100.165; Authentication-Results: mx.google.com; spf=neutral (google.com: 194.196.100.165 is neither permitted nor denied by best guess record for domain of ken.werner@linaro.org) smtp.mail=ken.werner@linaro.org Received: from d06nrmr1806.portsmouth.uk.ibm.com (d06nrmr1806.portsmouth.uk.ibm.com [9.149.39.193]) by mtagate5.uk.ibm.com (8.13.1/8.13.1) with ESMTP id p3LFqsGf023091 for ; Thu, 21 Apr 2011 15:52:54 GMT Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by d06nrmr1806.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p3LFrqaT1986668 for ; Thu, 21 Apr 2011 16:53:52 +0100 Received: from d06av02.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p3LFqsEp019622 for ; Thu, 21 Apr 2011 09:52:54 -0600 Received: from localhost.localdomain (dyn-9-152-224-51.boeblingen.de.ibm.com [9.152.224.51]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id p3LFqroi019567; Thu, 21 Apr 2011 09:52:54 -0600 From: Ken Werner To: libunwind-devel@nongnu.org Subject: [PATCH 4/5] ARM: tests/Gtest-dyn1.c workaround for GCC bug. Date: Thu, 21 Apr 2011 17:52:41 +0200 Message-Id: <1303401162-14277-5-git-send-email-ken.werner@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1303401162-14277-1-git-send-email-ken.werner@linaro.org> References: <1303401162-14277-1-git-send-email-ken.werner@linaro.org> Temporarily workaround for a GCC bug that prevents code from obtaining the thumb marker: https://bugs.launchpad.net/gcc-linaro/+bug/721531. Signed-off-by: Ken Werner --- tests/Gtest-dyn1.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/Gtest-dyn1.c b/tests/Gtest-dyn1.c index b7b788f..fcb773d 100644 --- a/tests/Gtest-dyn1.c +++ b/tests/Gtest-dyn1.c @@ -68,8 +68,12 @@ struct fdesc long code; long is_thumb; }; -# define get_fdesc(fdesc,func) ({(fdesc).code = (long) &(func) & ~0x1; \ - (fdesc).is_thumb = (long) &(func) & 0x1;}) +/* Workaround GCC bug: https://bugs.launchpad.net/gcc-linaro/+bug/721531 */ +# define get_fdesc(fdesc,func) ({long tmp = (long) &(func); \ + (fdesc).code = (long) &(func) & ~0x1; \ + (fdesc).is_thumb = tmp & 0x1;}) +/*# define get_fdesc(fdesc,func) ({(fdesc).code = (long) &(func) & ~0x1; \ + (fdesc).is_thumb = (long) &(func) & 0x1;})*/ # define get_funcp(fdesc) ((template_t) ((fdesc).code | (fdesc).is_thumb)) # define get_gp(fdesc) (0) #else