Merge pull request #1166 from ketsuban/tidying

Tidy up naked functions
This commit is contained in:
PikalaxALT
2020-09-04 19:41:18 -04:00
committed by GitHub
8 changed files with 115 additions and 120 deletions
+3 -4
View File
@@ -2852,8 +2852,8 @@ static int GetTypeEffectivenessPoints(int move, int targetSpecies, int arg2)
NAKED
static int GetTypeEffectivenessPoints(int move, int species, int arg2)
{
asm_unified("\n\
push {r4-r7,lr}\n\
asm_unified(
"push {r4-r7,lr}\n\
mov r7, r10\n\
mov r6, r9\n\
mov r5, r8\n\
@@ -3085,8 +3085,7 @@ _08190156:\n\
mov r10, r5\n\
pop {r4-r7}\n\
pop {r1}\n\
bx r1\n\
");
bx r1");
}
#endif // NONMATCHING
+3 -4
View File
@@ -3649,8 +3649,8 @@ static void BattleIntroOpponent1SendsOutMonAnimation(void)
NAKED
static void BattleIntroOpponent1SendsOutMonAnimation(void)
{
asm(".syntax unified\n\
push {r4-r6,lr}\n\
asm_unified(
"push {r4-r6,lr}\n\
ldr r0, =gBattleTypeFlags\n\
ldr r2, [r0]\n\
movs r0, 0x80\n\
@@ -3728,8 +3728,7 @@ _0803B2F2:\n\
pop {r4-r6}\n\
pop {r0}\n\
bx r0\n\
.pool\n\
.syntax divided");
.pool");
}
#endif // NONMATCHING
+2 -2
View File
@@ -1219,8 +1219,8 @@ static s32 DrawResultsTextWindow(const u8 *text, u8 spriteId)
NAKED
static s32 DrawResultsTextWindow(const u8 *text, u8 spriteId)
{
asm_unified("\n\
push {r4-r7,lr}\n\
asm_unified(
"push {r4-r7,lr}\n\
mov r7, r10\n\
mov r6, r9\n\
mov r5, r8\n\
+3 -4
View File
@@ -2539,8 +2539,8 @@ void CreateFrontierBrainPokemon(void)
NAKED
void CreateFrontierBrainPokemon(void)
{
asm_unified("\n\
push {r4-r7,lr}\n\
asm_unified(
"push {r4-r7,lr}\n\
mov r7, r10\n\
mov r6, r9\n\
mov r5, r8\n\
@@ -2768,8 +2768,7 @@ _081A4FD0:\n\
pop {r4-r7}\n\
pop {r0}\n\
bx r0\n\
.pool\n\
");
.pool");
}
#endif
+2 -1
View File
@@ -247,7 +247,8 @@ bool8 CheckBagHasSpace(u16 itemId, u16 count)
NAKED
bool8 CheckBagHasSpace(u16 itemId, u16 count)
{
asm_unified("push {r4-r7,lr}\n\
asm_unified(
"push {r4-r7,lr}\n\
mov r7, r10\n\
mov r6, r9\n\
mov r5, r8\n\
+3 -4
View File
@@ -762,8 +762,8 @@ static void sub_81BF2B8(u8* a, u16 b, u8 c, u8 d, u8 e)
NAKED
static void sub_81BF2B8(u8* a, u16 b, u8 c, u8 d, u8 e)
{
asm_unified("\n\
push {r4-r7,lr}\n\
asm_unified(
"push {r4-r7,lr}\n\
mov r7, r10\n\
mov r6, r9\n\
mov r5, r8\n\
@@ -861,7 +861,6 @@ static void sub_81BF2B8(u8* a, u16 b, u8 c, u8 d, u8 e)
pop {r4-r7}\n\
pop {r0}\n\
bx r0\n\
.pool\n\
");
.pool");
}
#endif // NONMATCHING
+4 -5
View File
@@ -5258,11 +5258,11 @@ void SetSearchRectHighlight(u8 flags, u8 x, u8 y, u8 width)
}
}
#else
__attribute__((naked))
NAKED
void SetSearchRectHighlight(u8 flags, u8 x, u8 y, u8 width)
{
asm(".syntax unified\n\
push {r4-r7,lr}\n\
asm_unified(
"push {r4-r7,lr}\n\
mov r7, r8\n\
push {r7}\n\
adds r4, r3, 0\n\
@@ -5310,8 +5310,7 @@ _080C1DEC:\n\
pop {r4-r7}\n\
pop {r0}\n\
bx r0\n\
.pool\n\
.syntax divided\n");
.pool");
}
#endif
+3 -4
View File
@@ -474,8 +474,8 @@ void sub_81C7990(u32 a0, u16 a1)
NAKED
void sub_81C79BC(const u16 *a0, const u16 *a1, u32 a2, u32 a3, u32 a4, u16 *a5)
{
asm(".syntax unified\n\
push {r4-r7,lr}\n\
asm_unified(
"push {r4-r7,lr}\n\
mov r7, r10\n\
mov r6, r9\n\
mov r5, r8\n\
@@ -603,8 +603,7 @@ _081C7AAE:\n\
mov r10, r5\n\
pop {r4-r7}\n\
pop {r0}\n\
bx r0\n\
.syntax divided");
bx r0");
}
void PokenavFadeScreen(s32 fadeType)