You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(AVX2 gather checks share same switch but do not belong to TODO note.)
On tip, you can't make assembler to enter either of those two cases during make.bash,
but with 0bf79b2d checked out, we can see the effects and consequences.
For example if case with PINSRQ is commented-out, this error will occur:
// TODO(rsc): This special case is for SHRQ $3, AX:DX,
// which encodes as SHRQ $32(DX*0), AX.
// Similarly SHRQ CX, AX:DX is really SHRQ CX(DX*0), AX.
// Change encoding generated by assemblers and compilers and remove.
if (p.From.Type==obj.TYPE_CONST||p.From.Type==obj.TYPE_REG) &&p.From.Index!=REG_NONE&&p.From.Scale==0 {
p.SetFrom3(obj.Addr{
Type: obj.TYPE_REG,
Reg: p.From.Index,
})
p.From.Index=0
}
Given this example code:
TEXT asmtest(SB),0,$0 SHLQ$3,AX:DXRET
We can instrument assembler to print something when it enters branch for special case.
Suppose we are printing p stringified representation before and after if body:
The main thing to observe is that asm code above does trigger that
special condition at previous commit (845c4ff52a624a61be5a0669ec315b6f3a651b51~1 / 59584ed)
and it does not trigger with that revision applied.
Still, running make.bash will fail without that code.
Why?
Because older 6a asm uses older format for those.
Commit ba0c142CL12784 removes 6a and
we can do make.bash without any problems even with that code removed.
CL is on it's way.
This issue will be referenced to provide information that can't be conveniently
represented inside commit message.
The text was updated successfully, but these errors were encountered:
There are two TODO notes in obj/x86
doasm
that I was planning to resolve for quite a long time.TODO 1/2
go/src/cmd/internal/obj/x86/asm6.go
Lines 3821 to 3852 in fcfea24
(AVX2 gather checks share same switch but do not belong to TODO note.)
On tip, you can't make assembler to enter either of those two cases during
make.bash
,but with
0bf79b2d
checked out, we can see the effects and consequences.For example if case with
PINSRQ
is commented-out, this error will occur:doasm
does "fix" operands for some instructions because assembler frontendfills
obj.Prog
in unusual way:Crawling towards master will lead to 845c4ff CL6901.
Among other things, it does change lines showed above:
This alone is enough to remove code referenced in TODO-1.
TODO 2/2
Second TODO is trickier.
It's also obsolete due to CL6901, but in order to verify that, more actions are required.
go/src/cmd/internal/obj/x86/asm6.go
Lines 3809 to 3819 in fcfea24
Given this example code:
We can instrument assembler to print something when it enters branch for special case.
Suppose we are printing
p
stringified representation before and after if body:(New "AX:DX" => "DX, AX" syntax is a feature.)
The main thing to observe is that asm code above does trigger that
special condition at previous commit (
845c4ff52a624a61be5a0669ec315b6f3a651b51~1
/ 59584ed)and it does not trigger with that revision applied.
Still, running
make.bash
will fail without that code.Why?
Because older
6a
asm uses older format for those.Commit ba0c142 CL12784 removes
6a
andwe can do
make.bash
without any problems even with that code removed.CL is on it's way.
This issue will be referenced to provide information that can't be conveniently
represented inside commit message.
The text was updated successfully, but these errors were encountered: