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

test: make it easy to test machine code generation #7515

Closed
josharian opened this issue Mar 11, 2014 · 6 comments
Closed

test: make it easy to test machine code generation #7515

josharian opened this issue Mar 11, 2014 · 6 comments

Comments

@josharian
Copy link
Contributor

Make it easy to write a test for machine code generation.

One way this might work: Write a test containing an assembly language function and the
desired compiled code (per compiler+arch+goarm?). The run.go test hook compiles,
extracts the relevant symbol, disassembles with objdump, and compares to the desired
output.

Use fixedbugs/issue7044.go as a motivating use case (and replace it with a new and
improved version).

See https://golang.org/cl/73730043/ for the original discussion.
@remyoudompheng
Copy link
Contributor

Comment 1:

Status changed to Duplicate.

Merged into issue #5379.

@josharian
Copy link
Contributor Author

Comment 2:

Per discussion in issue #5379, this is not a dup.

Status changed to Accepted.

@bradfitz
Copy link
Contributor

Comment 3:

I don't see this happening for Go 1.3 at this point, nor is it critical.

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

@josharian
Copy link
Contributor Author

Comment 4:

Another use case: issue #8545.
cc r in case this intersects usefully with work on the assembler.

Labels changed: added release-go1.5, removed release-go1.4.

@rsc
Copy link
Contributor

rsc commented Jun 29, 2015

Too late for Go 1.5.

@rsc rsc modified the milestones: Unplanned, Go1.5 Jun 29, 2015
@ALTree
Copy link
Member

ALTree commented May 13, 2019

This was implemented last year by the new codegen test harness. Closing.

@ALTree ALTree closed this as completed May 13, 2019
@golang golang locked and limited conversation to collaborators May 12, 2020
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

6 participants