mirror of
https://git.planet-casio.com/Lephenixnoir/gint.git
synced 2024-12-29 13:03:36 +01:00
ld: merge XRAM and YRAM into a single 16-kiB section
This commit is contained in:
parent
26c5b76037
commit
8210524152
4 changed files with 20 additions and 47 deletions
28
fx9860g.ld
28
fx9860g.ld
|
@ -35,8 +35,7 @@ MEMORY
|
||||||
/* On-chip IL memory */
|
/* On-chip IL memory */
|
||||||
ilram (rwx): o = 0xe5200000, l = 4k
|
ilram (rwx): o = 0xe5200000, l = 4k
|
||||||
/* On-chip X and Y memory */
|
/* On-chip X and Y memory */
|
||||||
xram (rwx): o = 0xe5007000, l = 8k
|
xyram (rwx): o = 0xe500e000, l = 16k
|
||||||
yram (rwx): o = 0xe5017000, l = 8k
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SECTIONS
|
SECTIONS
|
||||||
|
@ -188,29 +187,18 @@ SECTIONS
|
||||||
. = ALIGN(16);
|
. = ALIGN(16);
|
||||||
} > ilram AT> rom
|
} > ilram AT> rom
|
||||||
|
|
||||||
. = ORIGIN(xram);
|
. = ORIGIN(xyram);
|
||||||
.xram ALIGN(4) : ALIGN(4) {
|
.xyram ALIGN(4) : ALIGN(4) {
|
||||||
_lxram = LOADADDR(.xram);
|
_lxyram = LOADADDR(.xyram);
|
||||||
_rxram = . ;
|
_rxyram = . ;
|
||||||
|
|
||||||
*(.xram)
|
*(.xram .yram .xyram)
|
||||||
|
|
||||||
. = ALIGN(16);
|
. = ALIGN(16);
|
||||||
} > xram AT> rom
|
} > xyram AT> rom
|
||||||
|
|
||||||
. = ORIGIN(yram);
|
|
||||||
.yram ALIGN(4) : ALIGN(4) {
|
|
||||||
_lyram = LOADADDR(.yram);
|
|
||||||
_ryram = . ;
|
|
||||||
|
|
||||||
*(.yram)
|
|
||||||
|
|
||||||
. = ALIGN(16);
|
|
||||||
} > yram AT> rom
|
|
||||||
|
|
||||||
_silram = SIZEOF(.ilram);
|
_silram = SIZEOF(.ilram);
|
||||||
_sxram = SIZEOF(.xram);
|
_sxyram = SIZEOF(.xyram);
|
||||||
_syram = SIZEOF(.yram);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
29
fxcg50.ld
29
fxcg50.ld
|
@ -21,8 +21,7 @@ MEMORY
|
||||||
/* On-chip IL memory */
|
/* On-chip IL memory */
|
||||||
ilram (rwx): o = 0xe5200000, l = 4k
|
ilram (rwx): o = 0xe5200000, l = 4k
|
||||||
/* On-chip X and Y memory */
|
/* On-chip X and Y memory */
|
||||||
xram (rwx): o = 0xe5007000, l = 8k
|
xyram (rwx): o = 0xe500e000, l = 16k
|
||||||
yram (rwx): o = 0xe5017000, l = 8k
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SECTIONS
|
SECTIONS
|
||||||
|
@ -102,7 +101,6 @@ SECTIONS
|
||||||
.bss (NOLOAD) : {
|
.bss (NOLOAD) : {
|
||||||
_rbss = . ;
|
_rbss = . ;
|
||||||
|
|
||||||
*(.bss.vram)
|
|
||||||
*(.bss COMMON)
|
*(.bss COMMON)
|
||||||
|
|
||||||
. = ALIGN(16);
|
. = ALIGN(16);
|
||||||
|
@ -144,29 +142,18 @@ SECTIONS
|
||||||
. = ALIGN(16);
|
. = ALIGN(16);
|
||||||
} > ilram AT> rom
|
} > ilram AT> rom
|
||||||
|
|
||||||
. = ORIGIN(xram);
|
. = ORIGIN(xyram);
|
||||||
.xram ALIGN(4) : ALIGN(4) {
|
.xyram ALIGN(4) : ALIGN(4) {
|
||||||
_lxram = LOADADDR(.xram);
|
_lxyram = LOADADDR(.xyram);
|
||||||
_rxram = . ;
|
_rxyram = . ;
|
||||||
|
|
||||||
*(.xram)
|
*(.xram .yram .xyram)
|
||||||
|
|
||||||
. = ALIGN(16);
|
. = ALIGN(16);
|
||||||
} > xram AT> rom
|
} > xyram AT> rom
|
||||||
|
|
||||||
. = ORIGIN(yram);
|
|
||||||
.yram ALIGN(4) : ALIGN(4) {
|
|
||||||
_lyram = LOADADDR(.yram);
|
|
||||||
_ryram = . ;
|
|
||||||
|
|
||||||
*(.yram)
|
|
||||||
|
|
||||||
. = ALIGN(16);
|
|
||||||
} > yram AT> rom
|
|
||||||
|
|
||||||
_silram = SIZEOF(.ilram);
|
_silram = SIZEOF(.ilram);
|
||||||
_sxram = SIZEOF(.xram);
|
_sxyram = SIZEOF(.xyram);
|
||||||
_syram = SIZEOF(.yram);
|
|
||||||
|
|
||||||
/* gint's uninitialized BSS section, going to static RAM. All the large
|
/* gint's uninitialized BSS section, going to static RAM. All the large
|
||||||
data arrays will be located here */
|
data arrays will be located here */
|
||||||
|
|
|
@ -14,8 +14,8 @@
|
||||||
#define GBSS3 __attribute__((section(".gint.bss.sh3")))
|
#define GBSS3 __attribute__((section(".gint.bss.sh3")))
|
||||||
/* Objects for the ILRAM, XRAM and YRAM regions */
|
/* Objects for the ILRAM, XRAM and YRAM regions */
|
||||||
#define GILRAM __attribute__((section(".ilram")))
|
#define GILRAM __attribute__((section(".ilram")))
|
||||||
#define GXRAM __attribute__((section(".xram")))
|
#define GXRAM __attribute__((section(".xyram")))
|
||||||
#define GYRAM __attribute__((section(".yram")))
|
#define GYRAM __attribute__((section(".xyram")))
|
||||||
|
|
||||||
/* Unused parameters or variables */
|
/* Unused parameters or variables */
|
||||||
#define GUNUSED __attribute__((unused))
|
#define GUNUSED __attribute__((unused))
|
||||||
|
|
|
@ -23,8 +23,7 @@ extern uint32_t
|
||||||
brom, srom, /* Limits of ROM mappings */
|
brom, srom, /* Limits of ROM mappings */
|
||||||
ldata, sdata, rdata, /* User's data section */
|
ldata, sdata, rdata, /* User's data section */
|
||||||
lilram, silram, rilram, /* IL memory section */
|
lilram, silram, rilram, /* IL memory section */
|
||||||
lxram, sxram, rxram, /* X memory section */
|
lxyram, sxyram, rxyram, /* X and Y memory section */
|
||||||
lyram, syram, ryram, /* Y memory section */
|
|
||||||
sbss, rbss; /* User's BSS section */
|
sbss, rbss; /* User's BSS section */
|
||||||
#ifdef FX9860G
|
#ifdef FX9860G
|
||||||
extern uint32_t
|
extern uint32_t
|
||||||
|
@ -151,8 +150,7 @@ int start(int isappli, int optnum)
|
||||||
if(!isSH3())
|
if(!isSH3())
|
||||||
{
|
{
|
||||||
regcpy(&lilram, &silram, &rilram);
|
regcpy(&lilram, &silram, &rilram);
|
||||||
regcpy(&lxram, &sxram, &rxram);
|
regcpy(&lxyram, &sxyram, &rxyram);
|
||||||
regcpy(&lyram, &syram, &ryram);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef FX9860G
|
#ifdef FX9860G
|
||||||
|
|
Loading…
Reference in a new issue