Allow for unencoded instructions in the binemit tests.

If an instruction doesn't have an associated encoding, use the standard
TargetIsa hook to encode it.

The test still fails if an instruction can't be encoded. There is no
legalization step.
This commit is contained in:
Jakob Stoklund Olesen
2017-03-29 09:48:25 -07:00
parent f540cb0664
commit 6ad34f90aa
3 changed files with 28 additions and 4 deletions

View File

@@ -336,3 +336,11 @@ that instruction is compared to the directive::
[R#200c,%x8] v11 = isub v1, v2 ; bin: 40628433
return
}
If any instructions are unencoded (indicated with a `[-]` encoding field), they
will be encoded using the same mechanism as the legalizer uses. However,
illegal instructions for the ISA won't be expanded into other instruction
sequences. Instead the test will fail.
Value locations must be present if they are required to compute the binary
bits. Missing value locations will cause the test to crash.