Skip to content

cmd/internal/obj: legal instruction denied by amd64 assembler but accepted by 386 #28070

@benshi001

Description

@benshi001

"ADDL runtime.m0+8(SB)(BX*4), AX" is accepted by the 386 assembler, but denied by the amd64 assembler. With error message,

Building Go cmd/dist using /usr/lib/go-1.6.
Building Go toolchain1 using /usr/lib/go-1.6.
Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1.
asm: invalid instruction: 00175 (/home/local/SPREADTRUM/ben.shi/Desktop/go-old/src/runtime/asm_amd64.s:74)	ADDL	runtime.m0+8(SB)(BX*4), AX
asm: assembly failed

go tool dist: FAILED: /home/local/SPREADTRUM/ben.shi/Desktop/go-old/pkg/tool/linux_amd64/asm -I /tmp/go-tool-dist-417590703/runtime -I /home/local/SPREADTRUM/ben.shi/Desktop/go-old/pkg/include -D GOOS_linux -D GOARCH_amd64 -D GOOS_GOARCH_linux_amd64 -o /tmp/go-tool-dist-417590703/runtime/asm_amd64.o /home/local/SPREADTRUM/ben.shi/Desktop/go-old/src/runtime/asm_amd64.s: exit status 1
go tool dist: open /tmp/go-tool-dist-417590703/runtime/asm_amd64.o: no such file or directory

But there is no error if the instruction is added to src/runtime/asm_386.s

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions