Differences From Artifact [50eac6751c]:
- File
src/runtime/exception.m
— part of check-in
[5b37fbeb82]
at
2020-12-20 21:26:08
on branch trunk
— Return error instead of using errno for threading
errno is problematic for Amiga libraries and is also not thread-safe on
some systems, even though it should. (user: js, size: 19890) [annotate] [blame] [check-ins using] [more...]
To Artifact [02f7c2294e]:
- File src/runtime/exception.m — part of check-in [029db9e275] at 2021-01-01 21:43:18 on branch trunk — runtime/exception.m: Implement DW_EH_PE_aligned (user: js, size: 20040) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
334 335 336 337 338 339 340 | } static uint64_t readValue(uint8_t enc, const uint8_t **ptr) { uint64_t value; | | > > | > > > > | 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 | } static uint64_t readValue(uint8_t enc, const uint8_t **ptr) { uint64_t value; if (enc == DW_EH_PE_aligned) { const uintptr_t *aligned = (const uintptr_t *) OF_ROUND_UP_POW2(sizeof(void *), (uintptr_t)*ptr); *ptr = (const uint8_t *)(aligned + 1); return *aligned; } #define READ(type) \ { \ type tmp; \ memcpy(&tmp, *ptr, sizeof(type)); \ value = tmp; \ *ptr += sizeForEncoding(enc); \ |
︙ | ︙ | |||
378 379 380 381 382 383 384 | return value; } #ifndef HAVE_ARM_EHABI_EXCEPTIONS static uint64_t resolveValue(uint64_t value, uint8_t enc, const uint8_t *start, uint64_t base) { | | | | 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 | return value; } #ifndef HAVE_ARM_EHABI_EXCEPTIONS static uint64_t resolveValue(uint64_t value, uint8_t enc, const uint8_t *start, uint64_t base) { if (value == 0 || enc == DW_EH_PE_aligned) return value; value += ((enc & 0x70) == DW_EH_PE_pcrel ? (uintptr_t)start : base); if (enc & DW_EH_PE_indirect) value = *(uintptr_t *)(uintptr_t)value; return value; |
︙ | ︙ |