Skip to content

Commit

Permalink
fixed: fastcall for MS 32-bit
Browse files Browse the repository at this point in the history
  • Loading branch information
Baron-von-Riedesel committed Mar 2, 2024
1 parent 034d6af commit eb83cf3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions History.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
see vararg1.asm.
- don't add "assume cs:dgroup" in tiny model if format is coff/elf or
model is flat; see tiny3.asm.
- default fastcall for 32-bit (MS style) caused a GPF for non-proc
symbols; see fastcms.asm.
Other changes:
- output format -djgpp: support added for 16-bit offset fixups.
- in listings, for directives, offset of 16-bit segments displayed with
Expand Down
7 changes: 5 additions & 2 deletions src/mangle.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,10 @@ static int StdcallMangler( const struct asym *sym, char *buffer )
static int ms32_decorate( const struct asym *sym, char *buffer )
/**************************************************************/
{
return ( sprintf( buffer, "@%s@%u", sym->name, ((struct dsym *)sym)->e.procinfo->parasize ) );
/* v2.18: don't assume all symbols are PROCs */
if ( sym->isproc )
return ( sprintf( buffer, "@%s@%u", sym->name, ((struct dsym *)sym)->e.procinfo->parasize ) );
return( UScoreMangler( sym, buffer ) );
}

#if OWFC_SUPPORT
Expand Down Expand Up @@ -248,7 +251,7 @@ int Mangle( struct asym *sym, char *buffer )
}

/* the "mangle_type" is an extension inherited from OW Wasm
* accepted are "C" and "N". It's NULL if MANGLESUPP == 0 (standard)
* accepted are "C" and "N". It's NULL if MANGLERSUPP == 0 (standard)
*/
void SetMangler( struct asym *sym, int langtype, const char *mangle_type )
/************************************************************************/
Expand Down

0 comments on commit eb83cf3

Please sign in to comment.