@@ -508,15 +508,15 @@ class MCCFIInstruction {
508508 MCSymbol *Label;
509509 unsigned Register;
510510 union {
511- int Offset;
511+ int64_t Offset;
512512 unsigned Register2;
513513 };
514514 unsigned AddressSpace = ~0u ;
515515 SMLoc Loc;
516516 std::vector<char > Values;
517517 std::string Comment;
518518
519- MCCFIInstruction (OpType Op, MCSymbol *L, unsigned R, int O, SMLoc Loc,
519+ MCCFIInstruction (OpType Op, MCSymbol *L, unsigned R, int64_t O, SMLoc Loc,
520520 StringRef V = " " , StringRef Comment = " " )
521521 : Operation(Op), Label(L), Register(R), Offset(O), Loc(Loc),
522522 Values (V.begin(), V.end()), Comment(Comment) {
@@ -528,7 +528,7 @@ class MCCFIInstruction {
528528 assert (Op == OpRegister);
529529 }
530530
531- MCCFIInstruction (OpType Op, MCSymbol *L, unsigned R, int O, unsigned AS,
531+ MCCFIInstruction (OpType Op, MCSymbol *L, unsigned R, int64_t O, unsigned AS,
532532 SMLoc Loc)
533533 : Operation(Op), Label(L), Register(R), Offset(O), AddressSpace(AS),
534534 Loc(Loc) {
@@ -538,30 +538,30 @@ class MCCFIInstruction {
538538public:
539539 // / .cfi_def_cfa defines a rule for computing CFA as: take address from
540540 // / Register and add Offset to it.
541- static MCCFIInstruction cfiDefCfa (MCSymbol *L, unsigned Register, int Offset,
542- SMLoc Loc = {}) {
541+ static MCCFIInstruction cfiDefCfa (MCSymbol *L, unsigned Register,
542+ int64_t Offset, SMLoc Loc = {}) {
543543 return MCCFIInstruction (OpDefCfa, L, Register, Offset, Loc);
544544 }
545545
546546 // / .cfi_def_cfa_register modifies a rule for computing CFA. From now
547547 // / on Register will be used instead of the old one. Offset remains the same.
548548 static MCCFIInstruction createDefCfaRegister (MCSymbol *L, unsigned Register,
549549 SMLoc Loc = {}) {
550- return MCCFIInstruction (OpDefCfaRegister, L, Register, 0 , Loc);
550+ return MCCFIInstruction (OpDefCfaRegister, L, Register, INT64_C ( 0 ) , Loc);
551551 }
552552
553553 // / .cfi_def_cfa_offset modifies a rule for computing CFA. Register
554554 // / remains the same, but offset is new. Note that it is the absolute offset
555555 // / that will be added to a defined register to the compute CFA address.
556- static MCCFIInstruction cfiDefCfaOffset (MCSymbol *L, int Offset,
556+ static MCCFIInstruction cfiDefCfaOffset (MCSymbol *L, int64_t Offset,
557557 SMLoc Loc = {}) {
558558 return MCCFIInstruction (OpDefCfaOffset, L, 0 , Offset, Loc);
559559 }
560560
561561 // / .cfi_adjust_cfa_offset Same as .cfi_def_cfa_offset, but
562562 // / Offset is a relative value that is added/subtracted from the previous
563563 // / offset.
564- static MCCFIInstruction createAdjustCfaOffset (MCSymbol *L, int Adjustment,
564+ static MCCFIInstruction createAdjustCfaOffset (MCSymbol *L, int64_t Adjustment,
565565 SMLoc Loc = {}) {
566566 return MCCFIInstruction (OpAdjustCfaOffset, L, 0 , Adjustment, Loc);
567567 }
@@ -581,15 +581,15 @@ class MCCFIInstruction {
581581 // / .cfi_offset Previous value of Register is saved at offset Offset
582582 // / from CFA.
583583 static MCCFIInstruction createOffset (MCSymbol *L, unsigned Register,
584- int Offset, SMLoc Loc = {}) {
584+ int64_t Offset, SMLoc Loc = {}) {
585585 return MCCFIInstruction (OpOffset, L, Register, Offset, Loc);
586586 }
587587
588588 // / .cfi_rel_offset Previous value of Register is saved at offset
589589 // / Offset from the current CFA register. This is transformed to .cfi_offset
590590 // / using the known displacement of the CFA register from the CFA.
591591 static MCCFIInstruction createRelOffset (MCSymbol *L, unsigned Register,
592- int Offset, SMLoc Loc = {}) {
592+ int64_t Offset, SMLoc Loc = {}) {
593593 return MCCFIInstruction (OpRelOffset, L, Register, Offset, Loc);
594594 }
595595
@@ -602,44 +602,44 @@ class MCCFIInstruction {
602602
603603 // / .cfi_window_save SPARC register window is saved.
604604 static MCCFIInstruction createWindowSave (MCSymbol *L, SMLoc Loc = {}) {
605- return MCCFIInstruction (OpWindowSave, L, 0 , 0 , Loc);
605+ return MCCFIInstruction (OpWindowSave, L, 0 , INT64_C ( 0 ) , Loc);
606606 }
607607
608608 // / .cfi_negate_ra_state AArch64 negate RA state.
609609 static MCCFIInstruction createNegateRAState (MCSymbol *L, SMLoc Loc = {}) {
610- return MCCFIInstruction (OpNegateRAState, L, 0 , 0 , Loc);
610+ return MCCFIInstruction (OpNegateRAState, L, 0 , INT64_C ( 0 ) , Loc);
611611 }
612612
613613 // / .cfi_restore says that the rule for Register is now the same as it
614614 // / was at the beginning of the function, after all initial instructions added
615615 // / by .cfi_startproc were executed.
616616 static MCCFIInstruction createRestore (MCSymbol *L, unsigned Register,
617617 SMLoc Loc = {}) {
618- return MCCFIInstruction (OpRestore, L, Register, 0 , Loc);
618+ return MCCFIInstruction (OpRestore, L, Register, INT64_C ( 0 ) , Loc);
619619 }
620620
621621 // / .cfi_undefined From now on the previous value of Register can't be
622622 // / restored anymore.
623623 static MCCFIInstruction createUndefined (MCSymbol *L, unsigned Register,
624624 SMLoc Loc = {}) {
625- return MCCFIInstruction (OpUndefined, L, Register, 0 , Loc);
625+ return MCCFIInstruction (OpUndefined, L, Register, INT64_C ( 0 ) , Loc);
626626 }
627627
628628 // / .cfi_same_value Current value of Register is the same as in the
629629 // / previous frame. I.e., no restoration is needed.
630630 static MCCFIInstruction createSameValue (MCSymbol *L, unsigned Register,
631631 SMLoc Loc = {}) {
632- return MCCFIInstruction (OpSameValue, L, Register, 0 , Loc);
632+ return MCCFIInstruction (OpSameValue, L, Register, INT64_C ( 0 ) , Loc);
633633 }
634634
635635 // / .cfi_remember_state Save all current rules for all registers.
636636 static MCCFIInstruction createRememberState (MCSymbol *L, SMLoc Loc = {}) {
637- return MCCFIInstruction (OpRememberState, L, 0 , 0 , Loc);
637+ return MCCFIInstruction (OpRememberState, L, 0 , INT64_C ( 0 ) , Loc);
638638 }
639639
640640 // / .cfi_restore_state Restore the previously saved state.
641641 static MCCFIInstruction createRestoreState (MCSymbol *L, SMLoc Loc = {}) {
642- return MCCFIInstruction (OpRestoreState, L, 0 , 0 , Loc);
642+ return MCCFIInstruction (OpRestoreState, L, 0 , INT64_C ( 0 ) , Loc);
643643 }
644644
645645 // / .cfi_escape Allows the user to add arbitrary bytes to the unwind
@@ -650,7 +650,7 @@ class MCCFIInstruction {
650650 }
651651
652652 // / A special wrapper for .cfi_escape that indicates GNU_ARGS_SIZE
653- static MCCFIInstruction createGnuArgsSize (MCSymbol *L, int Size,
653+ static MCCFIInstruction createGnuArgsSize (MCSymbol *L, int64_t Size,
654654 SMLoc Loc = {}) {
655655 return MCCFIInstruction (OpGnuArgsSize, L, 0 , Size, Loc);
656656 }
@@ -677,7 +677,7 @@ class MCCFIInstruction {
677677 return AddressSpace;
678678 }
679679
680- int getOffset () const {
680+ int64_t getOffset () const {
681681 assert (Operation == OpDefCfa || Operation == OpOffset ||
682682 Operation == OpRelOffset || Operation == OpDefCfaOffset ||
683683 Operation == OpAdjustCfaOffset || Operation == OpGnuArgsSize ||
@@ -705,7 +705,7 @@ struct MCDwarfFrameInfo {
705705 unsigned CurrentCfaRegister = 0 ;
706706 unsigned PersonalityEncoding = 0 ;
707707 unsigned LsdaEncoding = 0 ;
708- uint32_t CompactUnwindEncoding = 0 ;
708+ uint64_t CompactUnwindEncoding = 0 ;
709709 bool IsSignalFrame = false ;
710710 bool IsSimple = false ;
711711 unsigned RAReg = static_cast <unsigned >(INT_MAX);
0 commit comments