From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3450 invoked by alias); 6 Mar 2015 16:23:44 -0000 Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org Received: (qmail 3437 invoked by uid 89); 6 Mar 2015 16:23:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.4 required=5.0 tests=BAYES_50,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,FREEMAIL_REPLYTO_END_DIGIT,KAM_COUK,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2 X-HELO: nm40-vm2.bullet.mail.ne1.yahoo.com Received: from nm40-vm2.bullet.mail.ne1.yahoo.com (HELO nm40-vm2.bullet.mail.ne1.yahoo.com) (98.138.229.178) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 06 Mar 2015 16:23:42 +0000 Received: from [127.0.0.1] by nm40.bullet.mail.ne1.yahoo.com with NNFMP; 06 Mar 2015 16:23:40 -0000 Received: from [98.138.100.103] by nm40.bullet.mail.ne1.yahoo.com with NNFMP; 06 Mar 2015 16:20:46 -0000 Received: from [212.82.98.111] by tm102.bullet.mail.ne1.yahoo.com with NNFMP; 06 Mar 2015 16:20:46 -0000 Received: from [127.0.0.1] by omp1048.mail.ir2.yahoo.com with NNFMP; 06 Mar 2015 16:20:45 -0000 Received: by 217.12.9.15; Fri, 06 Mar 2015 16:20:45 +0000 Date: Fri, 06 Mar 2015 16:23:00 -0000 From: Michael Perkins Reply-To: Michael Perkins To: "binutils@sourceware.org" Message-ID: <520488908.7091696.1425658833229.JavaMail.yahoo@mail.yahoo.com> Subject: [PATCH][GAS][ARM] Fix for POP {regs}^ problem MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-03/txt/msg00054.txt.bz2 Here is a diff for a patch to fix a problem with gas accepting the POP {reglist}^ instruction. It was encoding this in the same way as the POP {reglist} instruction. The patch rejects the POP {reglist}^ instruction in ARM mode (previously only rejected in THUMB mode). gas/ChangeLog: 2015-03-06 Michael Perkins * config/tc-arm.c (parse_operands): Set inst.operands[i].writeback for '^' on OP_REGLSTs. (do_push_pop): New writeback constraint. diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index 08155ac..136e52c 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -7042,7 +7042,7 @@ parse_operands (char *str, const unsigned int *pattern, bf val = parse_reg_list (&str); if (*str == '^') { - inst.operands[1].writeback = 1; + inst.operands[i].writeback = 1; str++; } break; @@ -9040,6 +9040,8 @@ do_pli (void) static void do_push_pop (void) { + constraint (inst.operands[0].writeback, + _("push/pop do not support {reglist}^")); inst.operands[1] = inst.operands[0]; memset (&inst.operands[0], 0, sizeof inst.operands[0]); inst.operands[0].isreg = 1;