Skip to content
This repository was archived by the owner on Jun 26, 2020. It is now read-only.

Commit eae9359

Browse files
committed
trusty rustfmt
1 parent 8e8891b commit eae9359

File tree

2 files changed

+32
-13
lines changed

2 files changed

+32
-13
lines changed

cranelift-codegen/src/isa/x86/abi.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,12 +1047,9 @@ fn insert_common_epilogue(
10471047
pos.func.locations[stack_addr] = ir::ValueLoc::Reg(RU::rbp as u16);
10481048

10491049
for reg in csrs.iter(FPR) {
1050-
let value = pos.ins().load(
1051-
types::F64,
1052-
ir::MemFlags::trusted(),
1053-
stack_addr,
1054-
fpr_offset,
1055-
);
1050+
let value = pos
1051+
.ins()
1052+
.load(types::F64, ir::MemFlags::trusted(), stack_addr, fpr_offset);
10561053
fpr_offset += types::F64X2.bytes() as i32;
10571054

10581055
if let Some(ref mut cfa_state) = cfa_state.as_mut() {

cranelift-codegen/src/isa/x86/unwind.rs

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,23 @@ fn write_u32<T: ByteOrder>(sink: &mut dyn FrameUnwindSink, v: u32) {
3535
/// Note: the Cranelift x86 ISA RU enum matches the Windows unwind GPR encoding values.
3636
#[derive(Debug, PartialEq, Eq)]
3737
enum UnwindCode {
38-
PushRegister { offset: u8, reg: RegUnit },
39-
SaveXmm { offset: u8, reg: RegUnit, stack_offset: u32 },
40-
StackAlloc { offset: u8, size: u32 },
41-
SetFramePointer { offset: u8, sp_offset: u8 },
38+
PushRegister {
39+
offset: u8,
40+
reg: RegUnit,
41+
},
42+
SaveXmm {
43+
offset: u8,
44+
reg: RegUnit,
45+
stack_offset: u32,
46+
},
47+
StackAlloc {
48+
offset: u8,
49+
size: u32,
50+
},
51+
SetFramePointer {
52+
offset: u8,
53+
sp_offset: u8,
54+
},
4255
}
4356

4457
impl UnwindCode {
@@ -60,7 +73,11 @@ impl UnwindCode {
6073
((*reg as u8) << 4) | (UnwindOperation::PushNonvolatileRegister as u8),
6174
);
6275
}
63-
Self::SaveXmm { offset, reg, stack_offset } => {
76+
Self::SaveXmm {
77+
offset,
78+
reg,
79+
stack_offset,
80+
} => {
6481
write_u8(sink, *offset);
6582
if *stack_offset <= core::u16::MAX as u32 {
6683
write_u8(
@@ -123,7 +140,7 @@ impl UnwindCode {
123140
} else {
124141
3
125142
}
126-
},
143+
}
127144
_ => 1,
128145
}
129146
}
@@ -228,7 +245,12 @@ impl UnwindInfo {
228245
_ => {}
229246
}
230247
}
231-
InstructionData::Store { opcode: Opcode::Store, args: [arg1, arg2], flags, offset } => {
248+
InstructionData::Store {
249+
opcode: Opcode::Store,
250+
args: [arg1, _arg2],
251+
_flags,
252+
offset,
253+
} => {
232254
if let ValueLoc::Reg(ru) = func.locations[arg1] {
233255
let offset_int: i32 = offset.into();
234256
assert!(offset_int >= 0);

0 commit comments

Comments
 (0)