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=wIf5DaUX; spf=pass (domain: linaro.org, ip: 209.85.221.66, mailfrom: ard.biesheuvel@linaro.org) Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by groups.io with SMTP; Thu, 19 Sep 2019 03:54:05 -0700 Received: by mail-wr1-f66.google.com with SMTP id n14so2568204wrw.9 for ; Thu, 19 Sep 2019 03:54:05 -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=BhmZV0dYlnFF98894gkmJ9EawVJGLI2aDyClX2bvs0M=; b=wIf5DaUXiRA5/p+9mltivqCZ3kh/+qQVNQCInzu42Kd/mYzcu/3SgukWI1CQ4yVGrV aTJLGMn8EODtvkxgMQS1El5QvXSWN7v8IL/zh49ixZVTujmK/Ju7FvY0Xavh1Q5d96Dn Fnf43pRfUrKllgKdvoJP9+cVRRflsyM9llI6VykGfaYLyURZXndRQOdXJo4op8WFPHd/ M+L81Nov5d7R7/jAjQO5f/9Zdf3QGIzPCyUSk5uyO8WhaommlbaFUyImRVa3myJn+LRT ABeCNmtOTLb/8SbgmwR7yofLy+orgMz5MqOVXJjAfqC1+/1UxHE/jHai4Oa1odbnYHCu xg8w== 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=BhmZV0dYlnFF98894gkmJ9EawVJGLI2aDyClX2bvs0M=; b=Vc8/i5YzAk1H9qg2RnHasyLsZ1UlmlrVBZLuHfKEKhkAz9yceLS00wVCZPMu6VWIsD zmRv7ghVH3Lf+wqEYqvqVYxgqtroQtYvvdrO2cVg8bh/+JJwH7sTTmNQFOat0UzYEAZh PnsQrwBOgrZlRK7SnLP8Rn/Lz3qpQNPZRa1CSrOYx2tlCqtI1/jiBqG1w6B2QdEF5B8U KYTZfv1MZTe8yWncNL54v77296qZKsheEUtd+aOrbHXIvFCEaC3Sr/hYuNc4i+SHJqr/ qg3hlMmLfCGd8WoECMw3gGgIVeP1itWmHf0npJnyfqhgbe7SviC1HPvIMRZ2nVVrRb97 b6AQ== X-Gm-Message-State: APjAAAUORUdTnI66JfQiN0LdILUIGTG7KoOZAlq7rYt3HZYswQ9VA1i/ i993sweV6SkXIHeMVOaEjAWyNVyVXArevb2IL7YU+Q== X-Google-Smtp-Source: APXvYqwt0CS2s9+tH4ukIroA0YKaVUXc/es6n5lYBi9sGwNnOZ075L4oJuvOj2EB4FPearxylJQdcLB6+2Acl3fzNRo= X-Received: by 2002:adf:ee50:: with SMTP id w16mr7007899wro.93.1568890444056; Thu, 19 Sep 2019 03:54:04 -0700 (PDT) MIME-Version: 1.0 References: <0d024d72b50b7f5a6d3d908d309810f350c5b1f5.1568808805.git.baptiste.gerondeau@linaro.org> <20190919094846.GO28454@bivouac.eciton.net> <20190919100921.GR28454@bivouac.eciton.net> <20190919104711.GT28454@bivouac.eciton.net> In-Reply-To: <20190919104711.GT28454@bivouac.eciton.net> From: "Ard Biesheuvel" Date: Thu, 19 Sep 2019 13:53:35 +0300 Message-ID: Subject: Re: [PATCH 2/3] ARM/Assembler: Correct syntax from RVCT for MSFT To: Leif Lindholm Cc: Baptiste Gerondeau , 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:47, Leif Lindholm wrote: > > On Thu, Sep 19, 2019 at 01:37:40PM +0300, Ard Biesheuvel wrote: > > On Thu, 19 Sep 2019 at 13:34, Baptiste Gerondeau > > wrote: > > >> 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. > > That could be resolved with a trivial branch at that point (or just > forcing ARM for the whole entry file) though. > Of course. The problem is that the first branch instruction is patched into the FV files by the BaseTools, and so the startup code is entered in ARM mode by default. So that means we'll either have to 1) switch to ARM mode 2) emit one branch instruction 3) switch back to Thumb mode 4) fix up all the code so it assembles in Thumb mode or 1) switch to ARM mode > But I'm OK with forcing ARM for all .asm files for now. > Indeed.