Lines Matching full:reg
99 void checkSaveRegister(uint64_t reg, PrologInfo &initialState) { in checkSaveRegister()
100 if (!savedRegisters[reg].initialStateSaved) { in checkSaveRegister()
101 initialState.savedRegisters[reg] = savedRegisters[reg]; in checkSaveRegister()
102 savedRegisters[reg].initialStateSaved = true; in checkSaveRegister()
105 void setRegister(uint64_t reg, RegisterSavedWhere newLocation, in setRegister()
107 checkSaveRegister(reg, initialState); in setRegister()
108 savedRegisters[reg].location = newLocation; in setRegister()
109 savedRegisters[reg].value = newValue; in setRegister()
111 void setRegisterLocation(uint64_t reg, RegisterSavedWhere newLocation, in setRegisterLocation()
113 checkSaveRegister(reg, initialState); in setRegisterLocation()
114 savedRegisters[reg].location = newLocation; in setRegisterLocation()
116 void setRegisterValue(uint64_t reg, int64_t newValue, in setRegisterValue()
118 checkSaveRegister(reg, initialState); in setRegisterValue()
119 savedRegisters[reg].value = newValue; in setRegisterValue()
121 void restoreRegisterToInitialState(uint64_t reg, PrologInfo &initialState) { in restoreRegisterToInitialState()
122 if (savedRegisters[reg].initialStateSaved) in restoreRegisterToInitialState()
123 savedRegisters[reg] = initialState.savedRegisters[reg]; in restoreRegisterToInitialState()
439 uint64_t reg; in parseFDEInstructions() local
475 reg = addressSpace.getULEB128(p, instructionsEnd); in parseFDEInstructions()
478 if (reg > kMaxRegisterNumber) { in parseFDEInstructions()
480 "malformed DW_CFA_offset_extended DWARF unwind, reg too big"); in parseFDEInstructions()
483 results->setRegister(reg, kRegisterInCFA, offset, initialState); in parseFDEInstructions()
484 _LIBUNWIND_TRACE_DWARF("DW_CFA_offset_extended(reg=%" PRIu64 ", " in parseFDEInstructions()
486 reg, offset); in parseFDEInstructions()
489 reg = addressSpace.getULEB128(p, instructionsEnd); in parseFDEInstructions()
490 if (reg > kMaxRegisterNumber) { in parseFDEInstructions()
492 "malformed DW_CFA_restore_extended DWARF unwind, reg too big"); in parseFDEInstructions()
495 results->restoreRegisterToInitialState(reg, initialState); in parseFDEInstructions()
496 _LIBUNWIND_TRACE_DWARF("DW_CFA_restore_extended(reg=%" PRIu64 ")\n", in parseFDEInstructions()
497 reg); in parseFDEInstructions()
500 reg = addressSpace.getULEB128(p, instructionsEnd); in parseFDEInstructions()
501 if (reg > kMaxRegisterNumber) { in parseFDEInstructions()
503 "malformed DW_CFA_undefined DWARF unwind, reg too big"); in parseFDEInstructions()
506 results->setRegisterLocation(reg, kRegisterUndefined, initialState); in parseFDEInstructions()
507 _LIBUNWIND_TRACE_DWARF("DW_CFA_undefined(reg=%" PRIu64 ")\n", reg); in parseFDEInstructions()
510 reg = addressSpace.getULEB128(p, instructionsEnd); in parseFDEInstructions()
511 if (reg > kMaxRegisterNumber) { in parseFDEInstructions()
513 "malformed DW_CFA_same_value DWARF unwind, reg too big"); in parseFDEInstructions()
520 results->setRegisterLocation(reg, kRegisterUnused, initialState); in parseFDEInstructions()
521 _LIBUNWIND_TRACE_DWARF("DW_CFA_same_value(reg=%" PRIu64 ")\n", reg); in parseFDEInstructions()
524 reg = addressSpace.getULEB128(p, instructionsEnd); in parseFDEInstructions()
526 if (reg > kMaxRegisterNumber) { in parseFDEInstructions()
528 "malformed DW_CFA_register DWARF unwind, reg too big"); in parseFDEInstructions()
536 results->setRegister(reg, kRegisterInRegister, (int64_t)reg2, in parseFDEInstructions()
539 "DW_CFA_register(reg=%" PRIu64 ", reg2=%" PRIu64 ")\n", reg, reg2); in parseFDEInstructions()
569 reg = addressSpace.getULEB128(p, instructionsEnd); in parseFDEInstructions()
571 if (reg > kMaxRegisterNumber) { in parseFDEInstructions()
572 _LIBUNWIND_LOG0("malformed DW_CFA_def_cfa DWARF unwind, reg too big"); in parseFDEInstructions()
575 results->cfaRegister = (uint32_t)reg; in parseFDEInstructions()
577 _LIBUNWIND_TRACE_DWARF("DW_CFA_def_cfa(reg=%" PRIu64 ", offset=%" PRIu64 in parseFDEInstructions()
579 reg, offset); in parseFDEInstructions()
582 reg = addressSpace.getULEB128(p, instructionsEnd); in parseFDEInstructions()
583 if (reg > kMaxRegisterNumber) { in parseFDEInstructions()
585 "malformed DW_CFA_def_cfa_register DWARF unwind, reg too big"); in parseFDEInstructions()
588 results->cfaRegister = (uint32_t)reg; in parseFDEInstructions()
589 _LIBUNWIND_TRACE_DWARF("DW_CFA_def_cfa_register(%" PRIu64 ")\n", reg); in parseFDEInstructions()
608 reg = addressSpace.getULEB128(p, instructionsEnd); in parseFDEInstructions()
609 if (reg > kMaxRegisterNumber) { in parseFDEInstructions()
611 "malformed DW_CFA_expression DWARF unwind, reg too big"); in parseFDEInstructions()
614 results->setRegister(reg, kRegisterAtExpression, (int64_t)p, in parseFDEInstructions()
619 _LIBUNWIND_TRACE_DWARF("DW_CFA_expression(reg=%" PRIu64 ", " in parseFDEInstructions()
622 reg, results->savedRegisters[reg].value, length); in parseFDEInstructions()
625 reg = addressSpace.getULEB128(p, instructionsEnd); in parseFDEInstructions()
626 if (reg > kMaxRegisterNumber) { in parseFDEInstructions()
628 "malformed DW_CFA_offset_extended_sf DWARF unwind, reg too big"); in parseFDEInstructions()
633 results->setRegister(reg, kRegisterInCFA, offset, initialState); in parseFDEInstructions()
634 _LIBUNWIND_TRACE_DWARF("DW_CFA_offset_extended_sf(reg=%" PRIu64 ", " in parseFDEInstructions()
636 reg, offset); in parseFDEInstructions()
639 reg = addressSpace.getULEB128(p, instructionsEnd); in parseFDEInstructions()
642 if (reg > kMaxRegisterNumber) { in parseFDEInstructions()
644 "malformed DW_CFA_def_cfa_sf DWARF unwind, reg too big"); in parseFDEInstructions()
647 results->cfaRegister = (uint32_t)reg; in parseFDEInstructions()
649 _LIBUNWIND_TRACE_DWARF("DW_CFA_def_cfa_sf(reg=%" PRIu64 ", " in parseFDEInstructions()
651 reg, offset); in parseFDEInstructions()
661 reg = addressSpace.getULEB128(p, instructionsEnd); in parseFDEInstructions()
662 if (reg > kMaxRegisterNumber) { in parseFDEInstructions()
664 "malformed DW_CFA_val_offset DWARF unwind, reg (%" PRIu64 in parseFDEInstructions()
666 reg); in parseFDEInstructions()
671 results->setRegister(reg, kRegisterOffsetFromCFA, offset, initialState); in parseFDEInstructions()
672 _LIBUNWIND_TRACE_DWARF("DW_CFA_val_offset(reg=%" PRIu64 ", " in parseFDEInstructions()
674 reg, offset); in parseFDEInstructions()
677 reg = addressSpace.getULEB128(p, instructionsEnd); in parseFDEInstructions()
678 if (reg > kMaxRegisterNumber) { in parseFDEInstructions()
680 "malformed DW_CFA_val_offset_sf DWARF unwind, reg too big"); in parseFDEInstructions()
685 results->setRegister(reg, kRegisterOffsetFromCFA, offset, initialState); in parseFDEInstructions()
686 _LIBUNWIND_TRACE_DWARF("DW_CFA_val_offset_sf(reg=%" PRIu64 ", " in parseFDEInstructions()
688 reg, offset); in parseFDEInstructions()
691 reg = addressSpace.getULEB128(p, instructionsEnd); in parseFDEInstructions()
692 if (reg > kMaxRegisterNumber) { in parseFDEInstructions()
694 "malformed DW_CFA_val_expression DWARF unwind, reg too big"); in parseFDEInstructions()
697 results->setRegister(reg, kRegisterIsExpression, (int64_t)p, in parseFDEInstructions()
702 _LIBUNWIND_TRACE_DWARF("DW_CFA_val_expression(reg=%" PRIu64 ", " in parseFDEInstructions()
705 reg, results->savedRegisters[reg].value, length); in parseFDEInstructions()
713 reg = addressSpace.getULEB128(p, instructionsEnd); in parseFDEInstructions()
714 if (reg > kMaxRegisterNumber) { in parseFDEInstructions()
716 "unwind, reg too big"); in parseFDEInstructions()
721 results->setRegister(reg, kRegisterInCFA, -offset, initialState); in parseFDEInstructions()
747 for (reg = UNW_SPARC_O0; reg <= UNW_SPARC_O7; reg++) { in parseFDEInstructions()
748 results->setRegister(reg, kRegisterInRegister, in parseFDEInstructions()
749 ((int64_t)reg - UNW_SPARC_O0) + UNW_SPARC_I0, in parseFDEInstructions()
753 for (reg = UNW_SPARC_L0; reg <= UNW_SPARC_I7; reg++) { in parseFDEInstructions()
754 results->setRegister(reg, kRegisterInCFA, in parseFDEInstructions()
755 ((int64_t)reg - UNW_SPARC_L0) * 4, in parseFDEInstructions()
770 reg = operand; in parseFDEInstructions()
771 if (reg > kMaxRegisterNumber) { in parseFDEInstructions()
772 _LIBUNWIND_LOG("malformed DW_CFA_offset DWARF unwind, reg (%" PRIu64 in parseFDEInstructions()
774 reg); in parseFDEInstructions()
779 results->setRegister(reg, kRegisterInCFA, offset, initialState); in parseFDEInstructions()
780 _LIBUNWIND_TRACE_DWARF("DW_CFA_offset(reg=%d, offset=%" PRId64 ")\n", in parseFDEInstructions()
789 reg = operand; in parseFDEInstructions()
790 if (reg > kMaxRegisterNumber) { in parseFDEInstructions()
792 "malformed DW_CFA_restore DWARF unwind, reg (%" PRIu64 in parseFDEInstructions()
794 reg); in parseFDEInstructions()
797 results->restoreRegisterToInitialState(reg, initialState); in parseFDEInstructions()
798 _LIBUNWIND_TRACE_DWARF("DW_CFA_restore(reg=%" PRIu64 ")\n", in parseFDEInstructions()