Unified · Split
| @@ -1080,6 +1080,12 @@ ST_FUNC int tcc_add_file_internal(TCCState *s1, const char *filename, int flags) · 1079 unmodified lines | |||
| 1080 | if (ext[0]) | 1080 | if (ext[0]) |
| 1081 | ext++; | 1081 | ext++; |
| 1082 | 1082 | ||
| 1083 | #ifdef CONFIG_TCC_ASM | ||
| 1084 | /* if .S file, define __ASSEMBLER__ like gcc does */ | ||
| 1085 | if (!strcmp(ext, "S")) | ||
| 1086 | tcc_define_symbol(s1, "__ASSEMBLER__", NULL); | ||
| 1087 | #endif | ||
| 1088 | |||
| 1083 | /* open the file */ | 1089 | /* open the file */ |
| 1084 | ret = tcc_open(s1, filename); | 1090 | ret = tcc_open(s1, filename); |
| 1085 | if (ret < 0) { | 1091 | if (ret < 0) { |
| @@ -564,3 +564,7 @@ int $0x10 · 563 unmodified lines | |||
| 564 | pushl $1 | 564 | pushl $1 |
| 565 | pushw $1 | 565 | pushw $1 |
| 566 | push $1 | 566 | push $1 |
| 567 | |||
| 568 | #ifdef __ASSEMBLER__ // should be defined, for S files | ||
| 569 | inc %eax | ||
| 570 | #endif | ||