Add an isa::StackRef type.

This contains encoding details for a stack reference: The base register
and offset to use in the specific instruction encoding.

Generate StackRef objects called in_stk0 etc for the binemit recipe
code. All binemit recipes need to compute base pointer offsets for stack
references, so have the automatically generated code do it.
This commit is contained in:
Jakob Stoklund Olesen
2017-09-22 11:16:07 -07:00
parent 2946cc54d3
commit 76eb7df9f0
6 changed files with 123 additions and 12 deletions

View File

@@ -2,7 +2,7 @@
use binemit::{CodeSink, Reloc, bad_encoding};
use ir::{Function, Inst, InstructionData};
use isa::RegUnit;
use isa::{RegUnit, StackRef, StackBaseMask};
use predicates::is_signed_int;
use regalloc::RegDiversions;