ia16-elf-gcc: eliminate DOSDATA, DOSTEXT and C use of TGROUP.

Now that it understands relocations those are no longer necessary.
This commit is contained in:
Bart Oldeman 2018-07-12 14:27:03 -04:00
parent 1bb9496c48
commit 5ff361314c
5 changed files with 2 additions and 32 deletions

View File

@ -160,14 +160,7 @@ extern struct dhdr FAR ASM clk_dev; /* Clock device driver */
extern struct dhdr FAR ASM con_dev; /* Console device driver */
extern struct dhdr FAR ASM prn_dev; /* Generic printer device driver */
extern struct dhdr FAR ASM aux_dev; /* Generic aux device driver */
#ifndef __GNUC__
extern struct dhdr FAR ASM blk_dev; /* Block device (Disk) driver */
#else
extern struct dhdr ASM blk_dev;
#define DosTextSeg 0x70
#define DOSTEXT(x) (*(typeof(x) FAR *)MK_FP(DosTextSeg, (size_t)&(x)))
#define blk_dev DOSTEXT(blk_dev)
#endif
extern COUNT *error_tos, /* error stack */
disk_api_tos, /* API handler stack - disk fns */
char_api_tos; /* API handler stack - char fns */

View File

@ -1,7 +1,5 @@
#undef DOSFAR
#undef DOSTEXTFAR
#define DOSDATA(x) (x)
#define DOSTEXT(x) (x)
/* Included by initialisation functions */
@ -27,13 +25,8 @@ extern __segment DosTextSeg;
#elif defined(__GNUC__)
#define DosTextSeg 0x70
#define DOSFAR FAR
#define DOSTEXTFAR FAR
#undef DOSDATA
#undef DOSTEXT
#define DOSDATA(x) (*(typeof(x) FAR *)MK_FP(DosDataSeg, (size_t)&(x)))
#define DOSTEXT(x) (*(typeof(x) FAR *)MK_FP(DosTextSeg, (size_t)&(x)))
#elif !defined(I86)

View File

@ -218,9 +218,6 @@ VOID ASMCFUNC FAR int2a_handler(void);
VOID ASMCFUNC FAR int2f_handler(void);
VOID ASMCFUNC FAR cpm_entry(void);
#define cpm_entry DOSDATA(cpm_entry)
#define int29_handler DOSTEXT(int29_handler)
/* kernel.asm */
#ifdef __GNUC__
VOID ASMCFUNC init_call_p_0(struct config FAR *Config) FAR __attribute__((noreturn));
@ -240,7 +237,6 @@ int VA_CDECL init_sprintf(char * buff, CONST char * fmt, ...);
/* procsupt.asm */
VOID ASMCFUNC FAR got_cbreak(void);
#define got_cbreak DOSTEXT(got_cbreak)
/* initclk.c */
extern void Init_clk_driver(void);
@ -248,12 +244,7 @@ extern void Init_clk_driver(void);
extern UWORD HMAFree; /* first byte in HMA not yet used */
extern unsigned CurrentKernelSegment;
#ifdef __GNUC__
extern struct _KernelConfig ASM LowKernelConfig;
#define LowKernelConfig *(typeof(LowKernelConfig) FAR *)MK_FP(DOS_PSP, &LowKernelConfig)
#else
extern struct _KernelConfig FAR ASM LowKernelConfig;
#endif
extern WORD days[2][13];
extern BYTE FAR *lpTop;
extern BYTE ASM _ib_start[], ASM _ib_end[], ASM _init_end[];

View File

@ -312,14 +312,7 @@ void MoveKernel(unsigned NewKernelSegment)
unsigned jmpseg = CurrentKernelSegment;
if (CurrentKernelSegment == 0)
#ifdef __GNUC__
{
extern char TGROUP[] asm("TGROUP");
CurrentKernelSegment = (unsigned)TGROUP;
}
#else
CurrentKernelSegment = FP_SEG(_HMATextEnd);
#endif
if (CurrentKernelSegment == 0xffff)
return;

View File

@ -263,10 +263,10 @@ STATIC void setup_int_vectors(void)
for (plvec = intvec_table; plvec < intvec_table + 5; plvec++)
plvec->isv = getvec(plvec->intno);
for (i = 0x23; i <= 0x3f; i++)
setvec(i, DOSDATA(empty_handler));
setvec(i, empty_handler);
HaltCpuWhileIdle = 0;
for (pvec = vectors; pvec < vectors + (sizeof vectors/sizeof *pvec); pvec++)
setvec(pvec->intno, (intvec)MK_FP(FP_SEG(DOSDATA(empty_handler)), pvec->handleroff));
setvec(pvec->intno, (intvec)MK_FP(FP_SEG(empty_handler), pvec->handleroff));
pokeb(0, 0x30 * 4, 0xea);
pokel(0, 0x30 * 4 + 1, (ULONG)cpm_entry);