aboutsummaryrefslogtreecommitdiff
path: root/backendC/CleanCompilerSources
diff options
context:
space:
mode:
Diffstat (limited to 'backendC/CleanCompilerSources')
-rw-r--r--backendC/CleanCompilerSources/backend.c3
-rw-r--r--backendC/CleanCompilerSources/backend.h4
-rw-r--r--backendC/CleanCompilerSources/instructions.c3
-rw-r--r--backendC/CleanCompilerSources/syntaxtr.t1
4 files changed, 8 insertions, 3 deletions
diff --git a/backendC/CleanCompilerSources/backend.c b/backendC/CleanCompilerSources/backend.c
index 5c6705e..6571c4b 100644
--- a/backendC/CleanCompilerSources/backend.c
+++ b/backendC/CleanCompilerSources/backend.c
@@ -3072,7 +3072,7 @@ BEDefineImportedObjsAndLibs (BEStringListP objs, BEStringListP libs)
gBEState.be_icl.beicl_module->im_imported_libs = libs;
} /* BEDefineRules */
-void BEInsertForeignExport (BESymbolP symbol_p)
+void BEInsertForeignExport (BESymbolP symbol_p,int stdcall)
{
ImpMod icl_mod_p;
struct foreign_export_list *foreign_export_list_p;
@@ -3082,6 +3082,7 @@ void BEInsertForeignExport (BESymbolP symbol_p)
icl_mod_p=gBEState.be_icl.beicl_module;
foreign_export_list_p->fe_symbol_p=symbol_p;
+ foreign_export_list_p->fe_stdcall=stdcall;
foreign_export_list_p->fe_next=icl_mod_p->im_foreign_exports;
icl_mod_p->im_foreign_exports=foreign_export_list_p;
}
diff --git a/backendC/CleanCompilerSources/backend.h b/backendC/CleanCompilerSources/backend.h
index f16e6c1..8fd0e01 100644
--- a/backendC/CleanCompilerSources/backend.h
+++ b/backendC/CleanCompilerSources/backend.h
@@ -532,8 +532,8 @@ Clean (BEExportFunction :: Int BackEnd -> BackEnd)
void BEDefineImportedObjsAndLibs (BEStringListP objs, BEStringListP libs);
Clean (BEDefineImportedObjsAndLibs :: BEStringListP BEStringListP BackEnd -> BackEnd)
-void BEInsertForeignExport (BESymbolP symbol_p);
-Clean (BEInsertForeignExport :: BESymbolP BackEnd -> BackEnd)
+void BEInsertForeignExport (BESymbolP symbol_p,int stdcall);
+Clean (BEInsertForeignExport :: BESymbolP Int BackEnd -> BackEnd)
void BESetMainDclModuleN (int main_dcl_module_n_parameter);
Clean (BESetMainDclModuleN :: Int BackEnd -> BackEnd)
diff --git a/backendC/CleanCompilerSources/instructions.c b/backendC/CleanCompilerSources/instructions.c
index 459f0f7..9ed5958 100644
--- a/backendC/CleanCompilerSources/instructions.c
+++ b/backendC/CleanCompilerSources/instructions.c
@@ -3574,6 +3574,9 @@ void GenerateForeignExports (struct foreign_export_list *foreign_export_list)
FPrintF (OutFile,"\n\tcentry %s e_%s_s%s \"",function_sdef->sdef_ident->ident_name,CurrentModule,function_sdef->sdef_ident->ident_name);
+ if (foreign_export_list->fe_stdcall)
+ FPutC ('P',OutFile);
+
rule_type_p=function_sdef->sdef_rule->rule_type;
for_l (type_arg_p,rule_type_p->type_alt_lhs->type_node_arguments,type_arg_next)
diff --git a/backendC/CleanCompilerSources/syntaxtr.t b/backendC/CleanCompilerSources/syntaxtr.t
index 0583ea8..e7d6964 100644
--- a/backendC/CleanCompilerSources/syntaxtr.t
+++ b/backendC/CleanCompilerSources/syntaxtr.t
@@ -817,6 +817,7 @@ struct string_list {
struct foreign_export_list {
SymbolP fe_symbol_p;
+ int fe_stdcall;
struct foreign_export_list *fe_next;
};