mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Move 1-byte overflow check to out_AbsByte
This check is already performed in bulk by all functions calling it except `out_AbsByte`, adding extra overhead to those.
This commit is contained in:
@@ -201,7 +201,6 @@ void out_NewSection(char const *pzName, uint32_t secttype, int32_t org,
|
|||||||
*/
|
*/
|
||||||
static void absByteBypassCheck(int32_t b)
|
static void absByteBypassCheck(int32_t b)
|
||||||
{
|
{
|
||||||
checksectionoverflow(1);
|
|
||||||
b &= 0xFF;
|
b &= 0xFF;
|
||||||
pCurrentSection->tData[nPC] = b;
|
pCurrentSection->tData[nPC] = b;
|
||||||
pCurrentSection->nPC++;
|
pCurrentSection->nPC++;
|
||||||
@@ -214,6 +213,7 @@ static void absByteBypassCheck(int32_t b)
|
|||||||
void out_AbsByte(int32_t b)
|
void out_AbsByte(int32_t b)
|
||||||
{
|
{
|
||||||
checkcodesection();
|
checkcodesection();
|
||||||
|
checksectionoverflow(1);
|
||||||
absByteBypassCheck(b);
|
absByteBypassCheck(b);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user