@@ -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 ) ]
3737enum 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
4457impl 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