From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=slIoqttY; spf=pass (domain: linaro.org, ip: 209.85.128.65, mailfrom: ard.biesheuvel@linaro.org) Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by groups.io with SMTP; Thu, 19 Sep 2019 03:38:10 -0700 Received: by mail-wm1-f65.google.com with SMTP id y21so3383986wmi.0 for ; Thu, 19 Sep 2019 03:38:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KAXXEjgrgTVtfPzaGswwcWLj3QJrF9H6GDjSAyvJCgc=; b=slIoqttY+UuiGSTYS/uGTyhHOLyp3BOLcaiS2Xpr9f5IILy4tVCHzxownkypUtpyaa Jr9pCNqo6KpEZLndK7cq0uugmoLAFnIEkRLLmfd/T1CmOmm1VwsOOFxOaJGKmPrWkB2H 1rDMXjO59tlZSI2ghMBdSjLL0ummIp9e1RxotLCtDytafPSK0H44hkL0nMAwgpDNSR87 ullddL1VVwedFrTnT9p47r1lthzKzEML0o3H9wuNPpQekQKofioIlagy+A0h0ZyaZEPa 5mUiIQc0+t1VEMB3jSAH8/wCiZMkmcIOOqG5DPowhKNkwWIPvkSaND1bfZvB7EgnbM8N RI4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KAXXEjgrgTVtfPzaGswwcWLj3QJrF9H6GDjSAyvJCgc=; b=I6IhqwaBRiw6KIcOh65+W4aRb+gJ49Ii0AJFblWgMhjoxxwpxtNQoXkmRnhJ5yS/Wt SCCKd1JjTD20nyAr3u4SIFZ9w01pUm0NIO7AMI2jtdUXOKYnTLocAa/K3hBxMZkro0z2 IrGQLTIYspZ5pp9gbjOcResAtr6SCG214tKVn1YCFIEKAgRcdKwTGgurQPuIEboP/Ny6 emeckQQbhlzjfRUpSSxqZuasQPe58NFASJpqRUNPLuSb2HGHlKKzhSVkR6D/n6lCIzfo +Ng/LKhlNtPaDSkEfWsuULUQGqrGuNcFJKb045m7vSuPEJvy3cuz65qdfS9aQRmnwOCq kxGA== X-Gm-Message-State: APjAAAX8dTAPBs0HGCw6DT4XqpLZOIXzOJo3KKd4Ae36cuLluee8AcND 1/+koXlOnfBkHXx4ctDDK/jcb/C0zP9W+OVfNR9O7g== X-Google-Smtp-Source: APXvYqykHVY1Q6wEih1Az5EERCjWL4B3qKYL66FrbraT40rq4TknFfCIfyrQT8GEu3UrXECyO9UQ/FNfYGOt+QzVvMs= X-Received: by 2002:a1c:e906:: with SMTP id q6mr2051154wmc.136.1568889488461; Thu, 19 Sep 2019 03:38:08 -0700 (PDT) MIME-Version: 1.0 References: <0d024d72b50b7f5a6d3d908d309810f350c5b1f5.1568808805.git.baptiste.gerondeau@linaro.org> <20190919094846.GO28454@bivouac.eciton.net> <20190919100921.GR28454@bivouac.eciton.net> In-Reply-To: From: "Ard Biesheuvel" Date: Thu, 19 Sep 2019 13:37:40 +0300 Message-ID: Subject: Re: [PATCH 2/3] ARM/Assembler: Correct syntax from RVCT for MSFT To: Baptiste Gerondeau Cc: Leif Lindholm , edk2-devel-groups-io , "Kinney, Michael D" , "Gao, Liming" , "Zhang, Shenglei" , Baptiste GERONDEAU Content-Type: text/plain; charset="UTF-8" On Thu, 19 Sep 2019 at 13:34, Baptiste Gerondeau wrote: >> >> >> >> > > So is this simply the default of the compiler? I'd prefer it if we >> > > could add a 'CODE 32' directive instead, that way, we may not need any >> > > of the other changes to begin with. > > > > Oh, and the CODE 32 directive is not supported - it's ARM or THUMB :) > > https://docs.microsoft.com/en-us/cpp/assembler/arm/arm-assembler-directives?view=vs-2019 > > > > I can confirm that CODE 32 (or CODE32) does not work/does not allow the barrel shifting to be assembled... > The doc suggests that something like AREA CODE, ARM should do the trick? >> >> >> > This one, possible - Baptiste? >> > > > > The unconditional str ? From what I understand, we drop the cmp and drop the ldr/str of lr_svc and only keep those for lr_usr, right ? > >> >> >> >> OK. >> >> In any case, I'd strongly prefer it if the .S and .asm files produced >> identical object code, so please apply the same changes to the sibling >> .S files as well, please (but only the ones that are really required >> when building it in ARM mode) > > > ACK ! Will mirror changes to asm on S files (on separate commit, right ?) > I'm only touching the files VS2019 as a problem with on the ARM build anyways (this is what you meant by "really required" right ?) > I mean that I'd prefer to assemble the .asm files in ARM mode, especially since I am not convinced that the startup code we have is guaranteed to switch into the right mode after the CPU comes out of reset in ARM mode.