| ... | ... | @@ -247,10 +247,15 @@ fn evalInstructions( |
| 247 | 247 | .val_expr => |len| .{ .val_expression = try takeExprBlock(&fr, len) }, |
| 248 | 248 | }; |
| 249 | 249 | }, |
| 250 | | .def_cfa => |cfa| vm.current_row.cfa = .{ .reg_off = .{ |
| 251 | | .register = cfa.register, |
| 252 | | .offset = @intCast(cfa.offset), |
| 253 | | } }, |
| 250 | .def_cfa => |cfa| vm.current_row.cfa = .{ |
| 251 | .reg_off = .{ |
| 252 | .register = cfa.register, |
| 253 | // Unfortunately, LLVM emits negative CFI directives as their unsigned variants |
| 254 | // rather than the signed variants that DWARF has for exactly that purpose, hence |
| 255 | // `@bitCast` instead of `@intCast`. |
| 256 | .offset = @bitCast(cfa.offset), |
| 257 | }, |
| 258 | }, |
| 254 | 259 | .def_cfa_sf => |cfa| vm.current_row.cfa = .{ .reg_off = .{ |
| 255 | 260 | .register = cfa.register, |
| 256 | 261 | .offset = cfa.offset_sf * cie.data_alignment_factor, |
| ... | ... | @@ -272,7 +277,8 @@ fn evalInstructions( |
| 272 | 277 | }, |
| 273 | 278 | .def_cfa_offset => |offset| switch (vm.current_row.cfa) { |
| 274 | 279 | .none, .expression => return error.InvalidOperation, |
| 275 | | .reg_off => |*ro| ro.offset = @intCast(offset), |
| 280 | // See the comment for `def_cfa` above. |
| 281 | .reg_off => |*ro| ro.offset = @bitCast(offset), |
| 276 | 282 | }, |
| 277 | 283 | .def_cfa_offset_sf => |offset_sf| switch (vm.current_row.cfa) { |
| 278 | 284 | .none, .expression => return error.InvalidOperation, |