Skip to content

Commit

Permalink
chore(patches): make luajit patches apply cleanly
Browse files Browse the repository at this point in the history
Without this I get:
```
Hunk #1 succeeded at 121 (offset 8 lines).
Hunk #2 succeeded at 143 (offset 8 lines).
```

When applying the `ldp_stp_fusion` patch.

Signed-off-by: Aapo Talvensaari <[email protected]>
  • Loading branch information
bungle authored and samugi committed Nov 9, 2023
1 parent 2acd9d2 commit 3747231
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ Reported and analyzed by Zhongwei Yao. Fix by Peter Cawley. #1075

diff --git a/bundle/LuaJIT-2.1-20220411/src/lj_emit_arm64.h b/bundle/LuaJIT-2.1-20220411/src/lj_emit_arm64.h
index d4c542557..9161c9582 100644
--- a/bundle/LuaJIT-2.1-20220411/src/lj_emit_arm64.h
+++ b/bundle/LuaJIT-2.1-20220411/src/lj_emit_arm64.h
@@ -113,6 +113,17 @@ static int emit_checkofs(A64Ins ai, int64_t ofs)
--- a/bundle/LuaJIT-2.1-20230410/src/lj_emit_arm64.h
+++ b/bundle/LuaJIT-2.1-20230410/src/lj_emit_arm64.h
@@ -121,6 +121,17 @@ static int emit_checkofs(A64Ins ai, int64_t ofs)
}
}

Expand All @@ -30,7 +30,7 @@ index d4c542557..9161c9582 100644
static void emit_lso(ASMState *as, A64Ins ai, Reg rd, Reg rn, int64_t ofs)
{
int ot = emit_checkofs(ai, ofs), sc = (ai >> 30) & 3;
@@ -124,11 +135,9 @@ static void emit_lso(ASMState *as, A64Ins ai, Reg rd, Reg rn, int64_t ofs)
@@ -132,11 +143,9 @@ static void emit_lso(ASMState *as, A64Ins ai, Reg rd, Reg rn, int64_t ofs)
uint32_t prev = *as->mcp & ~A64F_D(31);
int ofsm = ofs - (1<<sc), ofsp = ofs + (1<<sc);
A64Ins aip;
Expand Down

0 comments on commit 3747231

Please sign in to comment.