Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/internal/obj/arm: add TST, TEQ instruction #5921

Closed
ncw opened this issue Jul 19, 2013 · 10 comments
Closed

cmd/internal/obj/arm: add TST, TEQ instruction #5921

ncw opened this issue Jul 19, 2013 · 10 comments

Comments

@ncw
Copy link
Contributor

ncw commented Jul 19, 2013

5l seems to explode on the TST instruction

        TST $3, R0

5a is quite happy to assemble this, but 5l then produces

main.tst: illegal combination TST C_RCON C_REG C_NONE, 8 1
(3) TST $3,R0,
main.tst: illegal combination TST C_RCON C_REG C_NONE, 8 1
(3) TST $3,R0,

I conjecture this might be easy to fix since the very similar TEQ instruction works fine.

-------------------

What steps will reproduce the problem?

Save the attached files into a temporary directory

Run

GOARCH="arm" GOOS="linux" go build

What is the expected output?

Nothing (it compiles)

What do you see instead?

# _/tmp/tst
main.tst: illegal combination TST C_RCON C_REG C_NONE, 8 1
(3) TST $3,R0,
main.tst: illegal combination TST C_RCON C_REG C_NONE, 8 1
(3) TST $3,R0,


Which compiler are you using (5g, 6g, 8g, gccgo)?

5a & 5l

Which operating system are you using?

Cross compiling for arm linux on amd64 linux

$ go-linux-arm env
GOARCH="arm"
GOBIN=""
GOCHAR="5"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/ncw/Code/Go"
GORACE=""
GOROOT="/home/ncw/Code/go"
GOTOOLDIR="/home/ncw/Code/go/pkg/tool/linux_amd64"
CC="gcc"
GOGCCFLAGS="-g -O2 -fPIC -marm"
CGO_ENABLED="0"

Which version are you using?  (run 'go version')

go version devel +77be25034f84 Fri Jul 19 01:22:26 2013 +0400 linux/amd64

Attachments:

  1. tst.s (74 bytes)
  2. tst.go (49 bytes)
@minux
Copy link
Member

minux commented Jul 19, 2013

Comment 1:

yeah, the real supported TST inst. is one synthesized from CMP.

Labels changed: added priority-later, removed priority-triage.

Status changed to Accepted.

@davecheney
Copy link
Contributor

Comment 2:

@minux, can we add TST? It take the same argument form as TEQ.

@minux
Copy link
Member

minux commented Jul 19, 2013

Comment 3:

yeah, we should.
i will do it when i get back to a computer.

@rsc
Copy link
Contributor

rsc commented Jul 30, 2013

Comment 4:

I don't know what the fake TST instruction is, but we should rename/remove it.

@rsc
Copy link
Contributor

rsc commented Nov 27, 2013

Comment 5:

Labels changed: added go1.3maybe.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 6:

Labels changed: added release-none, removed go1.3maybe.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 7:

Labels changed: added repo-main.

@rsc rsc added this to the Unplanned milestone Apr 10, 2015
@rsc
Copy link
Contributor

rsc commented Jun 8, 2015

Note that there is a TST that means something else.

@rsc rsc changed the title cmd/5l: add TST, TEQ instruction cmd/internal/obj/arm: add TST, TEQ instruction Jun 8, 2015
@jolan
Copy link

jolan commented Oct 13, 2017

I believe this can be closed now since this is a duplicate of #21583 which was just closed via:

https://go-review.googlesource.com/c/go/+/67490

@tklauser
Copy link
Member

Fixed by https://golang.org/cl/67490

@golang golang locked and limited conversation to collaborators Sep 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants