From aa90a53f34042b9839c6480efc61314c8af03574 Mon Sep 17 00:00:00 2001 From: ISSOtm Date: Sun, 9 Feb 2020 15:40:10 +0100 Subject: [PATCH] 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. --- src/asm/section.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/asm/section.c b/src/asm/section.c index a1eaea44..16057716 100644 --- a/src/asm/section.c +++ b/src/asm/section.c @@ -201,7 +201,6 @@ void out_NewSection(char const *pzName, uint32_t secttype, int32_t org, */ static void absByteBypassCheck(int32_t b) { - checksectionoverflow(1); b &= 0xFF; pCurrentSection->tData[nPC] = b; pCurrentSection->nPC++; @@ -214,6 +213,7 @@ static void absByteBypassCheck(int32_t b) void out_AbsByte(int32_t b) { checkcodesection(); + checksectionoverflow(1); absByteBypassCheck(b); }