557 Address pc = fp.getAddressAt(VM.getVM().getAddressSize() * PC_OFFSET_IN_GREGSET); |
557 Address pc = fp.getAddressAt(VM.getVM().getAddressSize() * PC_OFFSET_IN_GREGSET); |
558 return new SPARCFrame(raw_sp, pc); |
558 return new SPARCFrame(raw_sp, pc); |
559 } |
559 } |
560 } |
560 } |
561 |
561 |
562 if (!VM.getVM().isCore()) { |
562 // Note: The version of this operation on any platform with callee-save |
563 // Note: The version of this operation on any platform with callee-save |
563 // registers must update the register map (if not null). |
564 // registers must update the register map (if not null). |
564 // In order to do this correctly, the various subtypes of |
565 // In order to do this correctly, the various subtypes of |
565 // of frame (interpreted, compiled, glue, native), |
566 // of frame (interpreted, compiled, glue, native), |
566 // must be distinguished. There is no need on SPARC for |
567 // must be distinguished. There is no need on SPARC for |
567 // such distinctions, because all callee-save registers are |
568 // such distinctions, because all callee-save registers are |
568 // preserved for all frames via SPARC-specific mechanisms. |
569 // preserved for all frames via SPARC-specific mechanisms. |
569 // |
570 // |
570 // *** HOWEVER, *** if and when we make any floating-point |
571 // *** HOWEVER, *** if and when we make any floating-point |
571 // registers callee-saved, then we will have to copy over |
572 // registers callee-saved, then we will have to copy over |
572 // the RegisterMap update logic from the Intel code. |
573 // the RegisterMap update logic from the Intel code. |
573 |
574 |
574 if (isRicochetFrame()) return senderForRicochetFrame(map); |
575 |
575 |
576 // The constructor of the sender must know whether this frame is interpreted so it can set the |
576 // The constructor of the sender must know whether this frame is interpreted so it can set the |
577 // sender's _interpreter_sp_adjustment field. |
577 // sender's _interpreter_sp_adjustment field. |
578 if (VM.getVM().getInterpreter().contains(pc)) { |
578 if (VM.getVM().getInterpreter().contains(pc)) { |
579 isInterpreted = true; |
579 isInterpreted = true; |
580 map.makeIntegerRegsUnsaved(); |
580 map.makeIntegerRegsUnsaved(); |
|
581 map.shiftWindow(sp, youngerSP); |
|
582 } else { |
|
583 // Find a CodeBlob containing this frame's pc or elide the lookup and use the |
|
584 // supplied blob which is already known to be associated with this frame. |
|
585 cb = VM.getVM().getCodeCache().findBlob(pc); |
|
586 if (cb != null) { |
|
587 // Update the location of all implicitly saved registers |
|
588 // as the address of these registers in the register save |
|
589 // area (for %o registers we use the address of the %i |
|
590 // register in the next younger frame) |
581 map.shiftWindow(sp, youngerSP); |
591 map.shiftWindow(sp, youngerSP); |
582 } else { |
592 if (map.getUpdateMap()) { |
583 // Find a CodeBlob containing this frame's pc or elide the lookup and use the |
593 if (cb.callerMustGCArguments()) { |
584 // supplied blob which is already known to be associated with this frame. |
|
585 cb = VM.getVM().getCodeCache().findBlob(pc); |
|
586 if (cb != null) { |
|
587 |
|
588 if (cb.callerMustGCArguments(map.getThread())) { |
|
589 map.setIncludeArgumentOops(true); |
594 map.setIncludeArgumentOops(true); |
590 } |
595 } |
591 |
596 if (cb.getOopMaps() != null) { |
592 // Update the location of all implicitly saved registers |
597 OopMapSet.updateRegisterMap(this, cb, map, VM.getVM().isDebugging()); |
593 // as the address of these registers in the register save |
|
594 // area (for %o registers we use the address of the %i |
|
595 // register in the next younger frame) |
|
596 map.shiftWindow(sp, youngerSP); |
|
597 if (map.getUpdateMap()) { |
|
598 if (cb.getOopMaps() != null) { |
|
599 OopMapSet.updateRegisterMap(this, cb, map, VM.getVM().isDebugging()); |
|
600 } |
|
601 } |
598 } |
602 } |
599 } |
603 } |
600 } |
604 } // #ifndef CORE |
601 } |
605 |
602 |
606 return new SPARCFrame(biasSP(sp), biasSP(youngerSP), isInterpreted); |
603 return new SPARCFrame(biasSP(sp), biasSP(youngerSP), isInterpreted); |
607 } |
604 } |
608 |
605 |
609 protected boolean hasSenderPD() { |
606 protected boolean hasSenderPD() { |
946 |
943 |
947 return (a1.equals(a2)); |
944 return (a1.equals(a2)); |
948 } |
945 } |
949 |
946 |
950 |
947 |
|
948 private Frame senderForRicochetFrame(SPARCRegisterMap map) { |
|
949 if (DEBUG) { |
|
950 System.out.println("senderForRicochetFrame"); |
|
951 } |
|
952 //RicochetFrame* f = RicochetFrame::from_frame(fr); |
|
953 // Cf. is_interpreted_frame path of frame::sender |
|
954 Address youngerSP = getSP(); |
|
955 Address sp = getSenderSP(); |
|
956 map.makeIntegerRegsUnsaved(); |
|
957 map.shiftWindow(sp, youngerSP); |
|
958 boolean thisFrameAdjustedStack = true; // I5_savedSP is live in this RF |
|
959 return new SPARCFrame(sp, youngerSP, thisFrameAdjustedStack); |
|
960 } |
|
961 |
951 private Frame senderForEntryFrame(RegisterMap regMap) { |
962 private Frame senderForEntryFrame(RegisterMap regMap) { |
952 SPARCRegisterMap map = (SPARCRegisterMap) regMap; |
963 SPARCRegisterMap map = (SPARCRegisterMap) regMap; |
953 |
964 |
954 if (Assert.ASSERTS_ENABLED) { |
965 if (Assert.ASSERTS_ENABLED) { |
955 Assert.that(map != null, "map must be set"); |
966 Assert.that(map != null, "map must be set"); |