On Fri, Feb 25, 2022 at 1:25 AM Wojciech Muła wrote:
>
> Thanks! Didn't know that the assembler is able to do this. TBH, for me, it's
> not desired behaviour when an assembler program does something extra to a
> low-level code. I have already observed that Go asm strips a series of NOPs,
> whic
I don't think PCALIGN is supported for x86. The assembler can parse the
instruction, but the x86 assembler backend can't generate machine code for
it.
Wouldn't be hard to add, I think. There's already disabled experimental
code in there for aligning loops.
On Friday, February 25, 2022 at 1:25:3
Thanks! Didn't know that the assembler is able to do this. TBH, for me,
it's not desired behaviour when an assembler program does something extra
to a low-level code. I have already observed that Go asm strips a series of
NOPs, which is highly unexpected.
A directive for alignment is way cleare
Oops, I see it's disabled; but the knob is there if you want to experiment.
On Friday, 25 February 2022 at 08:35:10 UTC Brian Candler wrote:
> It seems to me that there is automatic alignment for loops:
>
> https://github.com/golang/go/blob/go1.17.7/src/cmd/internal/obj/x86/asm6.go#L51-L67
>
>
>
It seems to me that there is automatic alignment for loops:
https://github.com/golang/go/blob/go1.17.7/src/cmd/internal/obj/x86/asm6.go#L51-L67
On Friday, 25 February 2022 at 06:42:23 UTC Wojciech Muła wrote:
> The directive is not documented on https://pkg.go.dev/cmd/internal/obj/x86.
> `grep
The directive is not documented on https://pkg.go.dev/cmd/internal/obj/x86.
`grep -l -R PCALIGN *` run in `cmd/interal/obj` shows for the freshest
master:
arm64/doc.go
arm64/asm7.go
arm64/asm_arm64_test.go
link.go
ppc64/doc.go
ppc64/asm9.go
ppc64/asm_test.go
util.go
Seems it's not implemented.
On Thu, Feb 24, 2022 at 5:21 PM Ian Lance Taylor wrote:
> On Thu, Feb 24, 2022 at 9:40 AM Wojciech Muła
> wrote:
> >
> > I'm writing an implementation in x86 assembler and I need to force a
> certain alignment of blocks of code (as it affects performance). I found
> that there's PCALIGN directiv
On Thu, Feb 24, 2022 at 9:40 AM Wojciech Muła wrote:
>
> I'm writing an implementation in x86 assembler and I need to force a certain
> alignment of blocks of code (as it affects performance). I found that there's
> PCALIGN directive, but it's only available for the PPC architecture. It does
>
It's not clear what your question has to do with the Go language. Are you
asking how to control the alignment of the code produced by the Go
compiler? Some more context would probably help the community answer your
question.
On Thu, Feb 24, 2022 at 9:40 AM Wojciech Muła wrote:
>
> Hi all! That's
Hi all! That's my first post to the group.
I'm writing an implementation in x86 assembler and I need to force a
certain alignment of blocks of code (as it affects performance). I found
that there's PCALIGN directive, but it's only available for the PPC
architecture. It does not work for x86.
10 matches
Mail list logo