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:
ISSOtm
2020-02-09 15:40:10 +01:00
parent 598c923506
commit aa90a53f34

View File

@@ -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);
} }