public
/
FUZIX.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
811f7e7
)
binmunge: allow relocations for function vector register loads
author
Alan Cox
<alan@linux.intel.com>
Wed, 21 Nov 2018 00:32:21 +0000
(
00:32
+0000)
committer
Alan Cox
<alan@linux.intel.com>
Wed, 21 Nov 2018 00:32:21 +0000
(
00:32
+0000)
sdcc can generate this kind of code, so we need to generate stubs for
16bit register load fixups in code space
cp #1
jr z, 1f
ld hl,#func
jr 2f
1f: ld hl,#func2
2f:
push de
push bc
jp callhl
pop bc
pop de
Kernel/tools/binmunge.c
patch
|
blob
|
history
diff --git
a/Kernel/tools/binmunge.c
b/Kernel/tools/binmunge.c
index
b7f9ebe
..
c52aa86
100644
(file)
--- a/
Kernel/tools/binmunge.c
+++ b/
Kernel/tools/binmunge.c
@@
-153,6
+153,9
@@
void code_reloc(uint8_t sbank, uint16_t ptr, uint8_t dbank)
}
switch(buf[sbank][ptr-1]) {
+ case 0x01: /* LD BC, */
+ case 0x11: /* LD DE, */
+ case 0x21: /* LD HL/IX/IY, */
case 0xC3: /* JP - needs stub */
if (v)
printf("Converting JP at %04x to stub\n", ptr);