From patchwork Sun Mar 20 15:19:19 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ramana Radhakrishnan X-Patchwork-Id: 87657 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 468AEB6F07 for ; Mon, 21 Mar 2011 02:19:31 +1100 (EST) Received: (qmail 29823 invoked by alias); 20 Mar 2011 15:19:29 -0000 Received: (qmail 29813 invoked by uid 22791); 20 Mar 2011 15:19:28 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-wy0-f175.google.com (HELO mail-wy0-f175.google.com) (74.125.82.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 20 Mar 2011 15:19:22 +0000 Received: by wyb40 with SMTP id 40so5019735wyb.20 for ; Sun, 20 Mar 2011 08:19:20 -0700 (PDT) Received: by 10.227.28.217 with SMTP id n25mr1769043wbc.68.1300634360120; Sun, 20 Mar 2011 08:19:20 -0700 (PDT) Received: from [192.168.1.108] (66.37.187.81.in-addr.arpa [81.187.37.66]) by mx.google.com with ESMTPS id o23sm2325049wbc.61.2011.03.20.08.19.19 (version=SSLv3 cipher=OTHER); Sun, 20 Mar 2011 08:19:19 -0700 (PDT) Message-ID: <4D861AF7.2000903@linaro.org> Date: Sun, 20 Mar 2011 15:19:19 +0000 From: Ramana Radhakrishnan User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8 MIME-Version: 1.0 To: gcc-patches CC: patches@linaro.org Subject: [Patch ARM] PR47930 Fix documentation for marm / mthumb X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Hi, This fixes up documentation for the -marm option and changes the behaviour of mthumb to reject the negative options to bring this to behave similar to the marm option. The option needs to be documented since we now have situations where toolchains default to Thumb state and folks need a way of overriding this. I would like a review of this before committing it since this is a change to the command line options. Tested by building a cross toolchain to arm-linux-gnueabi and verified that -mno-thumb is rejected and looking up the documentation after it was rebuilt. Ok ? cheers Ramana 2011-03-20 Ramana Radhakrishnan PR target/47930 * config/arm/arm.opt (marm): Document it. (mthumb): Reject negative variant. Index: gcc/doc/invoke.texi =================================================================== --- gcc/doc/invoke.texi (revision 171192) +++ gcc/doc/invoke.texi (working copy) @@ -10109,6 +10109,13 @@ @option{-mno-apcs-reentrant}. @end ignore +@item -marm +@opindex marm +Generate code for the 32 bit ARM instruction set. This is used to +override and generate code in ARM state if the compiler has been +configured to be built in Thumb state. This option is not passed to the +assembler. + @item -mthumb-interwork @opindex mthumb-interwork Generate code which supports calling between the ARM and Thumb @@ -10354,7 +10361,8 @@ @item -mthumb @opindex mthumb Generate code for the Thumb instruction set. The default is to -use the 32-bit ARM instruction set. +use the 32-bit ARM instruction set unless the compiler defaults to building +with Thumb using the @option{--with-mode=thumb} option. This option automatically enables either 16-bit Thumb-1 or mixed 16/32-bit Thumb-2 instructions based on the @option{-mcpu=@var{name}} and @option{-march=@var{name}} options. This option is not passed to the Index: gcc/config/arm/arm.opt =================================================================== --- gcc/config/arm/arm.opt (revision 171192) +++ gcc/config/arm/arm.opt (working copy) @@ -49,7 +49,8 @@ Specify the name of the target architecture marm -Target RejectNegative InverseMask(THUMB) Undocumented +Target RejectNegative InverseMask(THUMB) +Generate code in 32 bit ARM state. mbig-endian Target Report RejectNegative Mask(BIG_END) @@ -130,7 +131,7 @@ Specify the minimum bit alignment of structures mthumb -Target Report Mask(THUMB) +Target RejectNegative Mask(THUMB) Compile for the Thumb not the ARM mthumb-interwork