From 01a710a47d6a5f21f8cfda72f7cfc6d23563a090 Mon Sep 17 00:00:00 2001 From: AntonioND Date: Sun, 2 Apr 2017 00:38:09 +0100 Subject: [PATCH] Remove Zero Page linker patch `RPN_PCEZP` This patch isn't used because it's meant to be an optimization for labels in the memory region 0x2000-0x20FF. That memory region doesn't have anything special on the Game Boy, and there are no instructions optimized to read or write from there, so it was probably meant for another hardware that was supported by ASMotor in the past. Signed-off-by: AntonioND --- include/asm/mylink.h | 5 ++++- include/link/mylink.h | 5 ++++- src/link/patch.c | 9 --------- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/include/asm/mylink.h b/include/asm/mylink.h index 14f548c6..b72e2ead 100644 --- a/include/asm/mylink.h +++ b/include/asm/mylink.h @@ -86,7 +86,10 @@ enum { RPN_HRAM, - RPN_PCEZP, + /* TODO: This hasn't been removed in order not to break compatibility + * with the existing object files, but it will be removed in a future + * version. */ + RPN_unused, RPN_RANGECHECK, diff --git a/include/link/mylink.h b/include/link/mylink.h index 22793d29..6343defb 100644 --- a/include/link/mylink.h +++ b/include/link/mylink.h @@ -44,7 +44,10 @@ enum eRpnData { RPN_HRAM, - RPN_PCEZP, + /* TODO: This hasn't been removed in order not to break compatibility + * with the existing object files, but it will be removed in a future + * version. */ + RPN_unused, RPN_RANGECHECK, diff --git a/src/link/patch.c b/src/link/patch.c index edb227bb..afdcead7 100644 --- a/src/link/patch.c +++ b/src/link/patch.c @@ -175,15 +175,6 @@ calcrpn(struct sPatch * pPatch) pPatch->pzFilename, pPatch->nLineNo); } break; - case RPN_PCEZP: - t = rpnpop(); - rpnpush(t & 0xFF); - if (t < 0x2000 || t > 0x20FF) { - errx(1, - "%s(%ld) : Value must be in the ZP area", - pPatch->pzFilename, pPatch->nLineNo); - } - break; case RPN_CONST: /* constant */ t = (*rpn++);