Logo
Explore Help
Sign In
sysadmin/ipxe
1
0
Fork 0
You've already forked ipxe
mirror of https://github.com/ipxe/ipxe synced 2025-12-23 05:21:49 +03:00
Code Issues Packages Projects Releases Wiki Activity
Files
1e5c5a216351ffc18004e3e190f09fc04a110b52
ipxe/src/libgcc/__umoddi3.c

14 lines
185 B
C
Raw Normal View History

Import various libgcc functions from syslinux. Experimentation reveals that gcc ignores -mrtd for the implicit arithmetic functions (e.g. __udivdi3), but not for the implicit memcpy() and memset() functions. Mark the implicit arithmetic functions with __attribute__((cdecl)) to compensate for this. (Note: we cannot mark with with __cdecl, because we define __cdecl to incorporate regparm(0) as well.)
2007-07-30 02:37:42 +01:00
/*
* arch/i386/libgcc/__umoddi3.c
*/
#include "libgcc.h"
[libgcc] Make __libgcc architecture-specific
2008-11-18 16:37:15 -08:00
__libgcc uint64_t __umoddi3(uint64_t num, uint64_t den)
Import various libgcc functions from syslinux. Experimentation reveals that gcc ignores -mrtd for the implicit arithmetic functions (e.g. __udivdi3), but not for the implicit memcpy() and memset() functions. Mark the implicit arithmetic functions with __attribute__((cdecl)) to compensate for this. (Note: we cannot mark with with __cdecl, because we define __cdecl to incorporate regparm(0) as well.)
2007-07-30 02:37:42 +01:00
{
uint64_t v;
(void) __udivmoddi4(num, den, &v);
return v;
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.2 Page: 115ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API