Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LoongArch64] Fix the clr build error on Alpine. #107669

Merged
merged 1 commit into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/coreclr/vm/loongarch64/stubs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ void LazyMachState::unwindLazyState(LazyMachState* baseState,
context.S8 = unwoundstate->captureCalleeSavedRegisters[8] = baseState->captureCalleeSavedRegisters[8];
context.Fp = unwoundstate->captureCalleeSavedRegisters[9] = baseState->captureCalleeSavedRegisters[9];
context.Tp = unwoundstate->captureCalleeSavedRegisters[10] = baseState->captureCalleeSavedRegisters[10];
context.Ra = NULL; // Filled by the unwinder
context.Ra = 0; // Filled by the unwinder

context.Sp = baseState->captureSp;
context.Pc = baseState->captureIp;
Expand All @@ -340,7 +340,7 @@ void LazyMachState::unwindLazyState(LazyMachState* baseState,
nonVolContextPtrs.S8 = &unwoundstate->captureCalleeSavedRegisters[8];
nonVolContextPtrs.Fp = &unwoundstate->captureCalleeSavedRegisters[9];
nonVolContextPtrs.Tp = &unwoundstate->captureCalleeSavedRegisters[10];
nonVolContextPtrs.Ra = NULL; // Filled by the unwinder
nonVolContextPtrs.Ra = 0; // Filled by the unwinder

#endif // DACCESS_COMPILE

Expand Down Expand Up @@ -487,7 +487,7 @@ void HelperMethodFrame::UpdateRegDisplay(const PREGDISPLAY pRD, bool updateFloat
pRD->pCurrentContext->S8 = (DWORD64)(pUnwoundState->captureCalleeSavedRegisters[8]);
pRD->pCurrentContext->Fp = (DWORD64)(pUnwoundState->captureCalleeSavedRegisters[9]);
pRD->pCurrentContext->Tp = (DWORD64)(pUnwoundState->captureCalleeSavedRegisters[10]);
pRD->pCurrentContext->Ra = NULL; // Unwind again to get Caller's PC
pRD->pCurrentContext->Ra = 0; // Unwind again to get Caller's PC

pRD->pCurrentContextPointers->S0 = pUnwoundState->ptrCalleeSavedRegisters[0];
pRD->pCurrentContextPointers->S1 = pUnwoundState->ptrCalleeSavedRegisters[1];
Expand Down Expand Up @@ -525,7 +525,7 @@ void HelperMethodFrame::UpdateRegDisplay(const PREGDISPLAY pRD, bool updateFloat
pRD->pCurrentContext->S8 = m_MachState.ptrCalleeSavedRegisters[8] ? *m_MachState.ptrCalleeSavedRegisters[8] : m_MachState.captureCalleeSavedRegisters[8];
pRD->pCurrentContext->Fp = m_MachState.ptrCalleeSavedRegisters[9] ? *m_MachState.ptrCalleeSavedRegisters[9] : m_MachState.captureCalleeSavedRegisters[9];
pRD->pCurrentContext->Tp = m_MachState.ptrCalleeSavedRegisters[10] ? *m_MachState.ptrCalleeSavedRegisters[10] : m_MachState.captureCalleeSavedRegisters[10];
pRD->pCurrentContext->Ra = NULL; // Unwind again to get Caller's PC
pRD->pCurrentContext->Ra = 0; // Unwind again to get Caller's PC
#else // TARGET_UNIX
pRD->pCurrentContext->S0 = *m_MachState.ptrCalleeSavedRegisters[0];
pRD->pCurrentContext->S1 = *m_MachState.ptrCalleeSavedRegisters[1];
Expand All @@ -538,7 +538,7 @@ void HelperMethodFrame::UpdateRegDisplay(const PREGDISPLAY pRD, bool updateFloat
pRD->pCurrentContext->S8 = *m_MachState.ptrCalleeSavedRegisters[8];
pRD->pCurrentContext->Fp = *m_MachState.ptrCalleeSavedRegisters[9];
pRD->pCurrentContext->Tp = *m_MachState.ptrCalleeSavedRegisters[10];
pRD->pCurrentContext->Ra = NULL; // Unwind again to get Caller's PC
pRD->pCurrentContext->Ra = 0; // Unwind again to get Caller's PC
#endif

#if !defined(DACCESS_COMPILE)
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/vm/loongarch64/virtualcallstubcpu.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ struct ResolveHolder
_stub._resolveWorkerTarget = resolveWorkerTarget;

_ASSERTE(resolveWorkerTarget == (PCODE)ResolveWorkerChainLookupAsmStub);
_ASSERTE(patcherTarget == NULL);
_ASSERTE(patcherTarget == (PCODE)NULL);

#undef DATA_OFFSET
#undef PC_REL_OFFSET
Expand Down
1 change: 1 addition & 0 deletions src/native/external/libunwind-version.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ Apply https://github.com/libunwind/libunwind/pull/714
Revert https://github.com/libunwind/libunwind/commit/ec03043244082b8f552881ba9fb790aa49c85468 and follow up changes in the same file # issue: https://github.com/libunwind/libunwind/issues/715
Apply https://github.com/libunwind/libunwind/pull/734
Apply https://github.com/libunwind/libunwind/pull/758
Apply https://github.com/libunwind/libunwind/pull/741
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */

#include "offsets.h"
#include <endian.h>
.text

#define SREG(X) st.d $r##X, $r4, (LINUX_UC_MCONTEXT_GREGS + 8 * X)
Expand Down
Loading