-
Notifications
You must be signed in to change notification settings - Fork 390
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix x86_64/i386 gfunc_call, when arg is VT_STRUCT, need fetch cpu fla…
…g before generating any code
- Loading branch information
Showing
4 changed files
with
31 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// https://lists.nongnu.org/archive/html/tinycc-devel/2024-12/msg00019.html | ||
// x86_64/i386 void gfunc_call(int nb_args), when push struct args, need fetch cpu flag before generating any code | ||
|
||
#include <stdio.h> | ||
|
||
struct string { | ||
char *str; | ||
int len; | ||
}; | ||
|
||
void dummy(struct string fpath, int dump_arg) { | ||
} | ||
|
||
int main() { | ||
int a = 1; | ||
struct string x; | ||
x.str = "gg.v"; | ||
x.len = 4; | ||
dummy(x, a == 0); | ||
printf("done\n"); | ||
return 0; | ||
} | ||
|
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
done |
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