-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
234 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,19 @@ | ||
#include "compiler.h" | ||
|
||
void native_test_function(struct generator *generator, | ||
struct native_function *func, struct vector *args) { | ||
generator->asm_push("; test"); | ||
struct datatype dtype; | ||
dtype.type = DATA_TYPE_INT; | ||
dtype.size = sizeof(int); | ||
generator->ret(&dtype, "42"); | ||
} | ||
|
||
void preprocessor_stdarg_include( | ||
struct preprocessor *preprocessor, | ||
struct preprocessor_included_file *included_file) { | ||
#warning "create va_list" | ||
native_create_function( | ||
preprocessor->compiler, "test", | ||
&(struct native_function_callbacks){.call = native_test_function}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,3 @@ | ||
#include <stddef.h> | ||
#include <stdarg_internal.h> | ||
|
||
struct abc { | ||
int a; | ||
int b; | ||
}; | ||
|
||
int main() { return offsetof(struct abc, b); } | ||
int main() { test(); } |