[prev in list] [next in list] [prev in thread] [next in thread] 

List:       binutils
Subject:    Re: [PATCH v2 5/7] RISC-V: relax post-relocation-operator separator expectation
From:       Fangrui Song <i () maskray ! me>
Date:       2023-04-28 8:03:46
Message-ID: DS7PR12MB57654E08251C64C7F5DBB5A6CB6B9 () DS7PR12MB5765 ! namprd12 ! prod ! outlook ! com
[Download RAW message or body]

On Thu, Apr 27, 2023 at 11:05 PM Jan Beulich via Binutils
<binutils@sourceware.org> wrote:
>
> On 28.04.2023 03:29, Nelson Chu wrote:
> > Sorry for missing this one.  No, not a request.  I'm fine with both, since
> > this patch won't break the risc-gnu-toolchain regression, so most of the
> > stuff already used looks good.  It seems that the risc v-asm doesn't say we
> > "must '' use a parenthesis after the modifiers, it just shows examples that
> > all use it.
>
> Hmm, interesting. My interpretation of especially the table in the doc (not
> so much the examples) would be that it pretty much mandates parentheses. One
> might even go as far as taking it to mandate no blank between reloc specifier
> and paren (but I wouldn't feel well going that far without it being said
> explicitly). So my plan was to make the alternative patch, and then leave it
> to you (incl other maintainers) to decide (with my personal preference being
> the yet to be created alternative one, now that I've seen the doc).
>
> Jan

I agree that rejecting `%hi sym` shall be a reasonable change in gas.
The LLVM integrated assembler (used by Clang and llvm-mc) rejects the
syntax.

% cat a.s
 lui     t0, %hi sym
% clang --target=riscv64 -c a.s
a.s:1:18: error: expected '('
 lui     t0, %hi sym
                 ^
a.s:1:18: error: unknown operand
 lui     t0, %hi sym
                 ^
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic