added libgcc_helper.S to retarget libgcc calls for 64 bit multiplication/division

This commit is contained in:
Markus Fröschle
2015-02-17 11:12:29 +00:00
parent 8a0a79f14f
commit cbeddaa621
5 changed files with 37 additions and 5 deletions

View File

@@ -0,0 +1,26 @@
/*
* needed for ELF compilation of x86emu which uses 64 bit multiplication and division. This
* is implemented in libgcc.a. However, the ELF compiler emits leading underscores and libgcc
* is not compiled like that - we must reimplement the symbols.
*
* FIXME: This is a quirk and should be replaced by BaS' own implementation later
*/
.global ___divdi3
.extern __divdi3
___divdi3: jmp __divdi3
.global ___muldi3
.extern __muldi3
___muldi3: jmp __muldi3
.global ___moddi3
.extern __moddi3
___moddi3: jmp __moddi3
.global ___udivdi3
.extern __udivdi3
___udivdi3: jmp __udivdi3
.global ___umoddi3
.extern __umoddi3
___umoddi3: jmp __umoddi3