tkchia / gcc-ia16

Fork of Lambertsen & Jenner (& al.)'s IA-16 (Intel 16-bit x86) port of GNU compilers ― added far pointers & more • use https://github.com/tkchia/build-ia16 to build • Ubuntu binaries at https://launchpad.net/%7Etkchia/+archive/ubuntu/build-ia16/ • DJGPP/MS-DOS binaries at https://gitlab.com/tkchia/build-ia16/-/releases • mirror of https://gitlab.com/tkchia/gcc-ia16
GNU General Public License v2.0
168 stars 12 forks source link

All functions called as if cdecl with `-mrtd` #20

Closed bartoldeman closed 6 years ago

bartoldeman commented 6 years ago

In the following:

extern char *strdup(const char *);
char *Estrdup(const char * const str)
{
    return strdup(str);
}

compiling with -mrtd -S, you see a addw $2, %sp generated that should not be there. This seems to be a regression in c97e8cc; 95fbd1fdb still works properly.

tkchia commented 6 years ago

Hello @bartoldeman ,

Ugh --- I made a mistake while implementing support for __attribute__ ((stdcall)) and __attribute__ ((cdecl)). Thank you for spotting it!