mirror of https://github.com/FDOS/kernel.git
ia16-elf-gcc: remove need for far function wrappers
This commit is contained in:
parent
fd770f50df
commit
49d1939ed7
|
@ -41,7 +41,7 @@ Linux 16.04 LTS (Xenial Xerus) or Ubuntu Linux 14.04 LTS (Trusty
|
|||
Tahr), there are precompiled ia16-elf-gcc packages at
|
||||
https://launchpad.net/~tkchia/+archive/ubuntu/build-ia16/.
|
||||
Otherwise, for now ia16-elf-gcc needs to be compiled from source.
|
||||
Only releases 20180419 and later are supported.
|
||||
Only releases 20180708 and later are supported.
|
||||
|
||||
Notes:
|
||||
======
|
||||
|
|
|
@ -337,7 +337,11 @@ typedef signed long LONG;
|
|||
#define FP_SEG(fp) ((unsigned)((ULONG)(VOID FAR *)(fp)>>16))
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && defined(__BUILTIN_IA16_FP_OFF)
|
||||
#define FP_OFF(fp) __builtin_ia16_FP_OFF(fp)
|
||||
#else
|
||||
#define FP_OFF(fp) ((unsigned)(fp))
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -938,18 +938,6 @@ global %1lshrsi3
|
|||
; reserve space for far jump to cp/m routine
|
||||
times 5 db 0
|
||||
|
||||
%ifdef gcc
|
||||
blk_driver_wrap:mov ax, _blk_driver
|
||||
jmp short blkclk
|
||||
clk_driver_wrap:mov ax, _clk_driver
|
||||
blkclk: pop si
|
||||
pop di
|
||||
call ax
|
||||
push di
|
||||
push si
|
||||
retf
|
||||
%endif
|
||||
|
||||
;End of HMA segment
|
||||
segment HMA_TEXT_END
|
||||
global __HMATextEnd
|
||||
|
@ -1042,21 +1030,13 @@ _cpm_entry: jmp 0:reloc_call_cpm_entry
|
|||
global _reloc_call_blk_driver
|
||||
extern _blk_driver
|
||||
_reloc_call_blk_driver:
|
||||
%ifdef gcc
|
||||
jmp 0:blk_driver_wrap
|
||||
%else
|
||||
jmp 0:_blk_driver
|
||||
%endif
|
||||
call near forceEnableA20
|
||||
|
||||
global _reloc_call_clk_driver
|
||||
extern _clk_driver
|
||||
_reloc_call_clk_driver:
|
||||
%ifdef gcc
|
||||
jmp 0:clk_driver_wrap
|
||||
%else
|
||||
jmp 0:_clk_driver
|
||||
%endif
|
||||
call near forceEnableA20
|
||||
|
||||
global _CharMapSrvc ; in _DATA (see AARD)
|
||||
|
|
|
@ -54,8 +54,9 @@ CFLAGSC=
|
|||
# -Wno-pointer-to-int-cast do not warn about FP_OFF
|
||||
# -Wno-pragmas do not warn about #pragma pack
|
||||
# -Werror treat all warnings as errors
|
||||
# -mfar-function-if-far-return-type treat `int __far f ();' as a far function
|
||||
|
||||
ALLCFLAGS+=-I../hdr $(TARGETOPT) -mcmodel=small -fleading-underscore -fno-common -fpack-struct -ffreestanding -fcall-used-es -mrtd -Wno-pointer-to-int-cast -Wno-pragmas -Werror -Os -fno-strict-aliasing
|
||||
ALLCFLAGS+=-I../hdr $(TARGETOPT) -mcmodel=small -fleading-underscore -fno-common -fpack-struct -ffreestanding -fcall-used-es -mrtd -Wno-pointer-to-int-cast -Wno-pragmas -Werror -Os -fno-strict-aliasing -mfar-function-if-far-return-type
|
||||
INITCFLAGS=$(ALLCFLAGS) -o $@
|
||||
CFLAGS=$(ALLCFLAGS) -o $@
|
||||
|
||||
|
|
Loading…
Reference in New Issue