Skip to content

Commit

Permalink
Try dotnet#2
Browse files Browse the repository at this point in the history
Revert "Try dotnet#2"

This reverts commit 479548733c2b215e085eafd519b8f304d63925d5.

ldr instead of mov
  • Loading branch information
franksinankaya committed Dec 30, 2019
1 parent ccd4dbd commit 0c6e672
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
13 changes: 7 additions & 6 deletions src/coreclr/src/utilcode/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2602,12 +2602,13 @@ void PutThumb2Mov32(UINT16 * p, UINT32 imm32)
//*****************************************************************************
void PutArmMov(UINT16 * p, UINT32 imm32)
{
printf("%s:%d p[0] = 0x%x \n", __func__, __LINE__, p[0]);
printf("%s:%d p[1] = 0x%x \n", __func__, __LINE__, p[1]);
printf("%s:%d p[2] = 0x%x \n", __func__, __LINE__, p[2]);
printf("%s:%d p[3] = 0x%x \n", __func__, __LINE__, p[3]);
p[0] = (UINT16)imm32;
p[1] = (UINT16)(imm32 >> 16);
#ifdef __thumb__
p[1] = (UINT16)imm32;
p[2] = (UINT16)(imm32 >> 16);
#else
p[2] = (UINT16)imm32;
p[3] = (UINT16)(imm32 >> 16);
#endif
}

//*****************************************************************************
Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/src/vm/arm/asmhelpers.S
Original file line number Diff line number Diff line change
Expand Up @@ -1170,10 +1170,10 @@ LOCAL_LABEL(DoWrite):
.macro LOAD_GC_GLOBAL name, regName, globalName
\name\()__\globalName\()_offset:
__\name\()__\globalName\()_offset = (\name\()__\globalName\()_offset - \name)

b \name\()__\globalName\()_load
\name\()__\globalName\()_value:
.word 0

\name\()__\globalName\()_load:
ldr \regName, \name\()__\globalName\()_value
.endm

Expand Down

0 comments on commit 0c6e672

Please sign in to comment.