public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Leif Lindholm" <leif@nuviainc.com>
To: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Daniel Schaefer <daniel.schaefer@hpe.com>,
	devel@edk2.groups.io, Abner Chang <abner.chang@hpe.com>,
	Gilbert Chen <gilbert.chen@hpe.com>,
	Eric Jin <eric.jin@intel.com>,
	G Edhaya Chandran <Edhaya.Chandran@arm.com>,
	Barton Gao <gaojie@byosoft.com.cn>,
	Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
Subject: Re: [edk2-devel] [edk2-test PATCH v1 2/2] SctPkg: Enable RISCV64 support using AARCH64 sources
Date: Tue, 9 Feb 2021 14:58:13 +0000	[thread overview]
Message-ID: <20210209145813.GI1664@vanye> (raw)
In-Reply-To: <5e8de9b9-17cc-65c5-1b47-e3f087f8ce85@gmx.de>

On Tue, Feb 09, 2021 at 14:47:46 +0100, Heinrich Schuchardt wrote:
> >>> I have no idea why the alignment would be 3 on other platforms, so I
> >>> don't know how to fix it.
> >>> If anyone knows more, please let me know. I'll just change the comment
> >>> to say Riscv64.
> >>>
> >>>>> +.align 3
> >>
> >> Both on Aarch64 and on RISC-V an odd alignment value makes no sense.
> >>
> >> .align 8 should do no harm. But is it needed?
> >
> > The glory of the GAS .align directive is that its meaning differs
> > between architectures and executable formats. On ARM/AArch64, as well
> > as on RISC-V (I think?) the alignment is described as a power of 2.
> >
> > So .align 3 on ARM and others are the same as .align 8 on x86 (ELF)
> > and others.
> >
> > (It might not be a bad idea to start replacing .align directives with
> > .baligh to reduce confusion.)
> 
> Thanks for pointing out the different meanings of .align. They are
> documented in binutils-2.36/gas/doc/as.info chapter 7.3.
> 
> .balign is GNU assembler specific.
> 
> Do we have to consider other assemblers here?

I don't think so.
The GNU family of toolchains are the only ones using .s/.S sources.
Unless there are GNU-compatible assemblers that don't support the
directive.

Visual Studio uses .asm on ARM* and .nasm on x86.

/
    Leif

  reply	other threads:[~2021-02-09 14:58 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-01 16:17 [edk2-test PATCH v1 0/2] Add RISCV64 support to SctPkg Daniel Schaefer
2020-12-01 16:17 ` [edk2-test PATCH v1 1/2] SctPkg: Add RISCV64 support Daniel Schaefer
2020-12-02 11:44   ` [edk2-devel] " Leif Lindholm
2021-02-08 15:09     ` Daniel Schaefer
2020-12-01 16:17 ` [edk2-test PATCH v1 2/2] SctPkg: Enable RISCV64 support using AARCH64 sources Daniel Schaefer
2020-12-02 12:04   ` [edk2-devel] " Leif Lindholm
2021-02-08 15:09     ` Daniel Schaefer
2021-02-08 17:04       ` Heinrich Schuchardt
2021-02-09 12:42         ` Leif Lindholm
2021-02-09 13:47           ` Heinrich Schuchardt
2021-02-09 14:58             ` Leif Lindholm [this message]
2021-02-09 15:11               ` Daniel Schaefer
2020-12-01 16:59 ` [edk2-test PATCH v1 0/2] Add RISCV64 support to SctPkg Heinrich Schuchardt
2020-12-01 17:11   ` Daniel Schaefer
2020-12-01 17:37     ` Heinrich Schuchardt
2021-02-08 14:30       ` Daniel Schaefer
2021-02-08 15:50         ` Heinrich Schuchardt
2020-12-02 12:07 ` Leif Lindholm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210209145813.GI1664@vanye \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox