From patchwork Fri Nov 1 22:24:21 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Newton X-Patchwork-Id: 21316 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f200.google.com (mail-ob0-f200.google.com [209.85.214.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9DF31244AF for ; Fri, 1 Nov 2013 22:24:26 +0000 (UTC) Received: by mail-ob0-f200.google.com with SMTP id uy5sf15222769obc.7 for ; Fri, 01 Nov 2013 15:24:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:message-id:date:from:user-agent :mime-version:to:cc:subject:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe:content-type :content-transfer-encoding; bh=fyFQDMqeaQECRFDylzLL97cFy1nm3xv6BoEbm5r1CTA=; b=Y0Y/60zaVX6zC3a+70yqzl0vhjzI8iOIkIW5FWJsLtLjNmG5lRaxGniYpkrzvZF3Ek rt1LmCmsW2nQ7arSCijUiJoSte1rw268OMKRTn2VHW0z79B1N/JjLBudgJVHDd+mVLZA wqCLCVGH7/ca02MQnUMU3Wr6JKrbhK1ZGe+L0nRQ2N9kYaM4d7EkUXilNR+V3DI2utne EiViVeLTM6tefqohJn3wdzcS+4YE+PMQ+PvUyZKcbL4zw1ISws1zlEI2s1SCeZrAmqNG 9MCN21kj32sjBx7d9h7jJO5+hcCjdm/PY0ouRP+IhpseTdO3/kaJR1XgapV7WBe9KsET VJaQ== X-Gm-Message-State: ALoCoQlSdlX8EBMBZcZF1s4/NbO4a543hT1U7CK4NChGX+4Qyu9g40XQMTepv6SJWbU96J8FGmpH X-Received: by 10.182.205.138 with SMTP id lg10mr1625049obc.33.1383344665824; Fri, 01 Nov 2013 15:24:25 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.129.8 with SMTP id ns8ls1532514qeb.39.gmail; Fri, 01 Nov 2013 15:24:25 -0700 (PDT) X-Received: by 10.58.117.7 with SMTP id ka7mr735777veb.44.1383344665637; Fri, 01 Nov 2013 15:24:25 -0700 (PDT) Received: from mail-vb0-f43.google.com (mail-vb0-f43.google.com [209.85.212.43]) by mx.google.com with ESMTPS id dl10si1174963veb.57.2013.11.01.15.24.25 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 01 Nov 2013 15:24:25 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.43 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.43; Received: by mail-vb0-f43.google.com with SMTP id g10so82390vbg.16 for ; Fri, 01 Nov 2013 15:24:25 -0700 (PDT) X-Received: by 10.220.174.200 with SMTP id u8mr3390710vcz.6.1383344665521; Fri, 01 Nov 2013 15:24:25 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp73831vcz; Fri, 1 Nov 2013 15:24:25 -0700 (PDT) X-Received: by 10.68.185.68 with SMTP id fa4mr5412746pbc.136.1383344664359; Fri, 01 Nov 2013 15:24:24 -0700 (PDT) Received: from mail-pb0-f53.google.com (mail-pb0-f53.google.com [209.85.160.53]) by mx.google.com with ESMTPS id pz2si5838963pac.202.2013.11.01.15.24.23 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 01 Nov 2013 15:24:24 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.53 is neither permitted nor denied by best guess record for domain of will.newton@linaro.org) client-ip=209.85.160.53; Received: by mail-pb0-f53.google.com with SMTP id up7so4889422pbc.12 for ; Fri, 01 Nov 2013 15:24:23 -0700 (PDT) X-Received: by 10.68.191.3 with SMTP id gu3mr5231146pbc.142.1383344663794; Fri, 01 Nov 2013 15:24:23 -0700 (PDT) Received: from localhost.localdomain ([63.239.94.10]) by mx.google.com with ESMTPSA id ry4sm15523740pab.4.2013.11.01.15.24.22 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 01 Nov 2013 15:24:23 -0700 (PDT) Message-ID: <52742A15.7090108@linaro.org> Date: Fri, 01 Nov 2013 15:24:21 -0700 From: Will Newton User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8 MIME-Version: 1.0 To: binutils@sourceware.org CC: Patch Tracking Subject: [PATCH v2] config/tc-aarch64.c: Avoid trying to parse a vector mov as immediate. X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: will.newton@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.43 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Parsing a vector mov instruction currently leads to a phantom undefined symbol being added to the symbol table. e.g.: .text mov x0, v0.D[0] Produces an undefined symbol called "v0.D". gas/ChangeLog: 2013-11-01 Will Newton PR gas/16103 * config/tc-aarch64.c (parse_operands): Avoid trying to parse a vector register as an immediate. gas/testsuite/ChangeLog: 2013-11-01 Will Newton * gas/aarch64/advsimd-mov-bad.d: New file. * gas/aarch64/advsimd-mov-bad.s: Likewise. --- gas/config/tc-aarch64.c | 3 ++- gas/testsuite/gas/aarch64/advsimd-mov-bad.d | 12 ++++++++++++ gas/testsuite/gas/aarch64/advsimd-mov-bad.s | 2 ++ 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 gas/testsuite/gas/aarch64/advsimd-mov-bad.d create mode 100644 gas/testsuite/gas/aarch64/advsimd-mov-bad.s Changes in v2: - Add testcase - Add PR to changelog diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c index 14ffdad..02fe4de 100644 --- a/gas/config/tc-aarch64.c +++ b/gas/config/tc-aarch64.c @@ -4810,7 +4810,8 @@ parse_operands (char *str, const aarch64_opcode *opcode) case AARCH64_OPND_IMM_MOV: { char *saved = str; - if (reg_name_p (str, REG_TYPE_R_Z_SP)) + if (reg_name_p (str, REG_TYPE_R_Z_SP) || + reg_name_p (str, REG_TYPE_VN)) goto failure; str = saved; po_misc_or_fail (my_get_expression (&inst.reloc.exp, &str, diff --git a/gas/testsuite/gas/aarch64/advsimd-mov-bad.d b/gas/testsuite/gas/aarch64/advsimd-mov-bad.d new file mode 100644 index 0000000..6ca9887 --- /dev/null +++ b/gas/testsuite/gas/aarch64/advsimd-mov-bad.d @@ -0,0 +1,12 @@ +#source: advsimd-mov-bad.s +#readelf: -s --wide + +Symbol table '.symtab' contains 6 entries: + +Num:.* + +[0-9]+:.* + +[0-9]+:.* + +[0-9]+:.* + +[0-9]+:.* + +[0-9]+:.* +#failif + +[0-9]+: +[0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +UND v0.D diff --git a/gas/testsuite/gas/aarch64/advsimd-mov-bad.s b/gas/testsuite/gas/aarch64/advsimd-mov-bad.s new file mode 100644 index 0000000..d7ba226 --- /dev/null +++ b/gas/testsuite/gas/aarch64/advsimd-mov-bad.s @@ -0,0 +1,2 @@ + .text + mov x0, v0.D[0]