Commit 79ec1833 authored by Inphi's avatar Inphi Committed by GitHub

cannon: Update opcode sanitizer for 64-bits (#12733)

parent 2780ad1f
...@@ -15,6 +15,9 @@ endif ...@@ -15,6 +15,9 @@ endif
.DEFAULT_GOAL := cannon .DEFAULT_GOAL := cannon
# The MIPS64 r1 opcodes not supported by cannon. This list does not include coprocess-specific opcodes.
UNSUPPORTED_OPCODES := (dclo|dclz)
cannon32-impl: cannon32-impl:
env GO111MODULE=on GOOS=$(TARGETOS) GOARCH=$(TARGETARCH) go build --tags=cannon32 -v $(LDFLAGS) -o ./bin/cannon32-impl . env GO111MODULE=on GOOS=$(TARGETOS) GOARCH=$(TARGETARCH) go build --tags=cannon32 -v $(LDFLAGS) -o ./bin/cannon32-impl .
...@@ -43,7 +46,7 @@ elf: ...@@ -43,7 +46,7 @@ elf:
make -C ./testdata/example elf make -C ./testdata/example elf
sanitize-program: sanitize-program:
@if ! { mips-linux-gnu-objdump -d -j .text $$GUEST_PROGRAM | awk '{print $3}' | grep -Ew -m1 '(bltzal)'; }; then \ @if ! { mips-linux-gnu-objdump -d -j .text $$GUEST_PROGRAM | awk '{print $3}' | grep -Ew -m1 "$(UNSUPPORTED_OPCODES)"; }; then \
echo "guest program is sanitized for unsupported instructions"; \ echo "guest program is sanitized for unsupported instructions"; \
else \ else \
echo "found unsupported instructions in the guest program"; \ echo "found unsupported instructions in the guest program"; \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment