diff options
author | YamaArashi <shadow962@live.com> | 2016-06-09 01:32:19 -0700 |
---|---|---|
committer | YamaArashi <shadow962@live.com> | 2016-06-09 01:32:19 -0700 |
commit | a37de9f76364f3ed95c49ca1417ee01cd4d617b1 (patch) | |
tree | c8039e8fc47394076faad856abb859c5bb39fcf3 /tools/preproc/preproc.cpp | |
parent | 54c60e33cb69514228f4bfb3d65b2668c824e449 (diff) |
double-colon global labels in preproc; misc other stuff
Diffstat (limited to 'tools/preproc/preproc.cpp')
-rw-r--r-- | tools/preproc/preproc.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/tools/preproc/preproc.cpp b/tools/preproc/preproc.cpp index 38ae762ea..b51861580 100644 --- a/tools/preproc/preproc.cpp +++ b/tools/preproc/preproc.cpp @@ -84,9 +84,22 @@ void PreprocAsmFile(std::string filename) break; } case Directive::Unknown: - stack.top().OutputLine(); + { + std::string globalLabel = stack.top().GetGlobalLabel(); + + if (globalLabel.length() != 0) + { + printf("\t.global %s\n", globalLabel.c_str()); + printf("%s:\n", globalLabel.c_str()); + } + else + { + stack.top().OutputLine(); + } + break; } + } } } |