Skip to content

Commit

Permalink
gopls/internal/test/integration/misc: skip ASM assertions on risc64
Browse files Browse the repository at this point in the history
It appears to be alone in using JAL instead of the CALL instruction.

Fixes golang/go#67960

Change-Id: Ic7002caf418d0ffcf8592f1e255e6c8ea260909b
Reviewed-on: https://go-review.googlesource.com/c/tools/+/592476
LUCI-TryBot-Result: Go LUCI <[email protected]>
Auto-Submit: Alan Donovan <[email protected]>
Reviewed-by: Robert Findley <[email protected]>
  • Loading branch information
adonovan authored and gopherbot committed Jun 13, 2024
1 parent a852b25 commit db99e8a
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions gopls/internal/test/integration/misc/webserver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,15 +354,21 @@ func g() {
t.Log("showDocument(package doc) URL:", doc.URI)

// Get the report and do some minimal checks for sensible results.
// Use only portable instructions below!
//
// Use only portable instructions below! Remember that
// This is a test of plumbing, not compilation, so
// it's better to skip the tests, rather than refine
// them, on any architecture that gives us trouble.
report := get(t, doc.URI)
checkMatch(t, true, report, `TEXT.*example.com/a.f`)
checkMatch(t, true, report, `CALL runtime.printlock`)
checkMatch(t, true, report, `CALL runtime.printstring`)
checkMatch(t, true, report, `CALL runtime.printunlock`)
checkMatch(t, true, report, `CALL example.com/a.f.deferwrap1`)
checkMatch(t, true, report, `RET`)
checkMatch(t, true, report, `CALL runtime.morestack_noctxt`)
if runtime.GOARCH != "risc64" { // RISC-V uses JAL instead of CALL
checkMatch(t, true, report, `CALL runtime.printlock`)
checkMatch(t, true, report, `CALL runtime.printstring`)
checkMatch(t, true, report, `CALL runtime.printunlock`)
checkMatch(t, true, report, `CALL example.com/a.f.deferwrap1`)
checkMatch(t, true, report, `RET`)
checkMatch(t, true, report, `CALL runtime.morestack_noctxt`)
}

// Nested functions are also shown.
checkMatch(t, true, report, `TEXT.*example.com/a.f.deferwrap1`)
Expand Down

0 comments on commit db99e8a

Please sign in to comment.