Skip to content

Commit

Permalink
Run rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcrichton committed Apr 17, 2020
1 parent cf372df commit 3cc664f
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions cranelift/codegen/src/isa/x86/abi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -836,13 +836,20 @@ fn insert_common_prologue(
/// bit over time!
fn interpret_gv(pos: &mut EncCursor, gv: ir::GlobalValue, scratch: ir::ValueLoc) -> ir::Value {
match pos.func.global_values[gv] {
ir::GlobalValueData::VMContext => {
pos.func.special_param(ir::ArgumentPurpose::VMContext)
.expect("no vmcontext parameter found")
}
ir::GlobalValueData::Load { base, offset, global_type, readonly: _ } => {
ir::GlobalValueData::VMContext => pos
.func
.special_param(ir::ArgumentPurpose::VMContext)
.expect("no vmcontext parameter found"),
ir::GlobalValueData::Load {
base,
offset,
global_type,
readonly: _,
} => {
let base = interpret_gv(pos, base, scratch);
let ret = pos.ins().load(global_type, ir::MemFlags::trusted(), base, offset);
let ret = pos
.ins()
.load(global_type, ir::MemFlags::trusted(), base, offset);
pos.func.locations[ret] = scratch;
return ret;
}
Expand Down

0 comments on commit 3cc664f

Please sign in to comment.