* Rename size to base_size and introduce a compute_size function; * Add infra to inspect in/outs registers when computing the size of an instruction; * Remove the GPR_SAFE_DEREF and GPR_ZERO_DEREF_SAFE register classes on x86 (fixes #335);
This commit is contained in:
committed by
Dan Gohman
parent
c2069762ef
commit
9d6821d6d9
@@ -149,7 +149,8 @@ impl SubTest for TestBinEmit {
|
||||
|
||||
if opt_level == OptLevel::Best {
|
||||
// Get the smallest legal encoding
|
||||
legal_encodings.min_by_key(|&e| encinfo.bytes(e))
|
||||
legal_encodings
|
||||
.min_by_key(|&e| encinfo.byte_size(e, inst, &divert, &func))
|
||||
} else {
|
||||
// If not optimizing, just use the first encoding.
|
||||
legal_encodings.next()
|
||||
@@ -204,7 +205,7 @@ impl SubTest for TestBinEmit {
|
||||
"Inconsistent {} header offset",
|
||||
ebb
|
||||
);
|
||||
for (offset, inst, enc_bytes) in func.inst_offsets(ebb, &encinfo) {
|
||||
for (offset, inst, enc_bytes) in func.inst_offsets(&func, ebb, &encinfo) {
|
||||
assert_eq!(sink.offset, offset);
|
||||
sink.text.clear();
|
||||
let enc = func.encodings[inst];
|
||||
|
||||
Reference in New Issue
Block a user