From patchwork Mon Aug 20 22:40:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Desaulniers X-Patchwork-Id: 10570827 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C7AD8921 for ; Mon, 20 Aug 2018 22:41:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B7E3C29C79 for ; Mon, 20 Aug 2018 22:41:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B5F8D29CA8; Mon, 20 Aug 2018 22:41:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, USER_IN_DEF_DKIM_WL autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4850B29CDB for ; Mon, 20 Aug 2018 22:41:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726590AbeHUB6h (ORCPT ); Mon, 20 Aug 2018 21:58:37 -0400 Received: from mail-yb0-f202.google.com ([209.85.213.202]:41301 "EHLO mail-yb0-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726119AbeHUB6e (ORCPT ); Mon, 20 Aug 2018 21:58:34 -0400 Received: by mail-yb0-f202.google.com with SMTP id d127-v6so8767866ybb.8 for ; Mon, 20 Aug 2018 15:41:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:message-id:mime-version:subject:from:to:cc; bh=EoH5pauqWlTA0RTnufTs0PyEbborC6SNL6ee6ZkN5rM=; b=VhkOi+CbXyia7j+wc7X6rTCrw9XR+q9dCZK7qfrsShokxp4I8WAyhc3Pk8LVoVqwVg w6gTHsWJIY8dZX2ipWuMpQmIOsZt5llRTn4E4I4XEebYUMi1XjNETWPf7OJM0dWtapKm DDR8RGUIa+M8X6YlMdaVyML5taGs5iI+SirzF8mdZIjcW0lCbBuC03cuXIvJ+K7hfFmL f6OlD92dPzRBrm69wa1EIzfgWjS1Vp6MphvIBIDzxRbecFO9c0RLCafA/CixBJ8qDi60 7WZboInv3vKD2VS7AzQiAATyzqT53ODqu5J6R0UB1mFhSUVGBDcxZQMzHy1uPAp1zHka ojJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=EoH5pauqWlTA0RTnufTs0PyEbborC6SNL6ee6ZkN5rM=; b=aCFheD1oVU/ZFKmG2oc3UhCRCBC65JNN6Nab7pCjZ71asGR46CSM/Zv3VWAebJJvdh 2Ph5P3WPNXGtkejLMgtI7NOi1e3SIeC9Fk6g0erAHk3sRkWaiEHnWh/+eAAGerbG8LLF KlWUs1BB71LT2//UQovnIgNbjqwLt+iYG2NSuciIECxlRidk+oV2c2TjC9itV16rOI7Y gZzW7wGC97uCun5vMCeRjw4NSWM+2Qu62pugL3maTuyDUEnNCr41ujMMFjncnn9hG/2T 3Nbhv04JbFaVoLKj3Q/zGmBr2Cftg5m6xyeuV0NMj5KOFuWOyHyfvpnWWWILIcRp7KRt k/nA== X-Gm-Message-State: AOUpUlEpO5iOaBA6GzG5G/HUgbXswrJfwvXoG8v+RqWclToWYjmGfzll OwYu8uXzps0nFlOcmkfIRY7y4b9cjVHb3JHuGBc= X-Google-Smtp-Source: AA+uWPw7n4D3afJ4dsA2aTX+Y42hvf4SGYTi3IfVbE4yuIvCJujG1ua4iUX7pyKts31Pcgxb7r0+QsljwR0U9Pn9KfU= X-Received: by 2002:a0d:fbc5:: with SMTP id l188-v6mr14440405ywf.133.1534804864260; Mon, 20 Aug 2018 15:41:04 -0700 (PDT) Date: Mon, 20 Aug 2018 15:40:32 -0700 Message-Id: <20180820224032.53194-1-ndesaulniers@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.18.0.865.gffc8e1a3cd6-goog Subject: [PATCH] arm64/crypto: remove non-standard notation From: Nick Desaulniers To: ard.biesheuvel@linaro.org Cc: Nick Desaulniers , Herbert Xu , "David S. Miller" , Catalin Marinas , Will Deacon , linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP It seems that: ldr q8, =0x30000000200000001 is a GNU as convience notation for: ldr q8, .Lconstant .Lconstant .word 0x00000001 .word 0x00000002 .word 0x00000003 .word 0x00000000 based on this comment in binutils' source [0]. I've asked for this non-standard convience notation to be added to other assemblers [1], but until then, we can remove it and get equivalent disassembly: before: 00000000000009d4 : ... a48: 9c000ac8 ldr q8, ba0 ... ba0: 00000001 .word 0x00000001 ba4: 00000002 .word 0x00000002 ba8: 00000003 .word 0x00000003 bac: 00000000 .word 0x00000000 after: 00000000000009d4 : ... a48: 9c000aa8 ldr q8, b9c ... b9c: 00000001 .word 0x00000001 ba0: 00000002 .word 0x00000002 ba4: 00000003 .word 0x00000003 ba8: 00000000 .word 0x00000000 [0] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob;f=gas/testsuite/gas/aarch64/programmer-friendly.s;h=6254c6476efdc848648b05068be0574e7addc85d;hb=HEAD#l11 [1] https://bugs.llvm.org/show_bug.cgi?id=38642 Signed-off-by: Nick Desaulniers --- arch/arm64/crypto/aes-modes.S | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/arm64/crypto/aes-modes.S b/arch/arm64/crypto/aes-modes.S index 483a7130cf0e..9288c5b0eca2 100644 --- a/arch/arm64/crypto/aes-modes.S +++ b/arch/arm64/crypto/aes-modes.S @@ -232,7 +232,7 @@ AES_ENTRY(aes_ctr_encrypt) bmi .Lctr1x cmn w6, #4 /* 32 bit overflow? */ bcs .Lctr1x - ldr q8, =0x30000000200000001 /* addends 1,2,3[,0] */ + ldr q8, .Laddends /* addends 1,2,3[,0] */ dup v7.4s, w6 mov v0.16b, v4.16b add v7.4s, v7.4s, v8.4s @@ -295,6 +295,12 @@ AES_ENTRY(aes_ctr_encrypt) rev x7, x7 ins v4.d[0], x7 b .Lctrcarrydone + +.Laddends: + .word 0x00000001 + .word 0x00000002 + .word 0x00000003 + .word 0x00000000 AES_ENDPROC(aes_ctr_encrypt) .ltorg