From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 54149 invoked by alias); 8 Jul 2018 05:03:09 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 54127 invoked by uid 89); 8 Jul 2018 05:03:06 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=modifiers, Everyone, HX-Received:sk:j13-v6m, Hx-languages-length:761 X-HELO: mail-oi0-f53.google.com Received: from mail-oi0-f53.google.com (HELO mail-oi0-f53.google.com) (209.85.218.53) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 08 Jul 2018 05:03:04 +0000 Received: by mail-oi0-f53.google.com with SMTP id 13-v6so30375924ois.1 for ; Sat, 07 Jul 2018 22:03:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:reply-to:from:date:message-id:subject:to :content-transfer-encoding; bh=/uhljl3kABDvaLKoZaAlBQ91MkZGktdh94Q8n5CnPmM=; b=hl+3NPM+JsWrAVCjbPieXXLSMpSvJD0CQ7npGBWXgydp704QbmDan6TDJlERz06Ds1 OlAvtwlZIKWt/f2Y7anvbQoIpG4vZP5Fu/VUV7og9KsLvVWyk1BziAF7L1Q+BFr7hwkd Y73SyXrhX//hLsiBp3mpm7tm2QoHzKu7VnHkHbGM5PQTBIifO6JOqTCZ5B3kFLp0Ujr9 Ltn3dRgIMm1LfxCPOh+GyDHw0Yi3MrDZOkrUMfTDHJVFWwORbiWu1+BQQ75ft2kgdeC1 G3GsGAsHeOnubsn+pYGM37gMhGXTC96qc0RAPNhHTzsGGXdP0TstU2dAKL8lFFUXgQa1 X8Fg== MIME-Version: 1.0 Received: by 2002:a4a:c689:0:0:0:0:0 with HTTP; Sat, 7 Jul 2018 22:03:02 -0700 (PDT) Reply-To: noloader@gmail.com From: Jeffrey Walton Date: Sun, 08 Jul 2018 05:03:00 -0000 Message-ID: Subject: invalid 'asm': invalid operand for code 'H' To: gcc-help Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2018-07/txt/msg00031.txt.bz2 Hi Everyone, I'm working from an ARM guide. The doc provides this code: $ cat move.c int main(int argc, char* argv[]) { int a; asm volatile("movw %0,%L1 \n" "movt %0,%H1 \n" : "=3Dr"(a) : "i"(0x12345678)); return a; } It results in: $ gcc -march=3Darmv7 move.c move.c: In function =E2=80=98main=E2=80=99: move.c:4:5: error: invalid 'asm': invalid operand for code 'H' asm volatile("movw %0,%L1 \n" ^ The guide says this about the modifiers: L - The lowest-numbered register of a register pair, or the low 16 bits of an immediate constant. H - The highest-numbered register of a register pair, or the high 16 bits of an immediate constant .... Is this an ARM extension not present in GCC? Or am I doing something wrong? Jeff