summaryrefslogtreecommitdiff
path: root/tools/preproc/preproc.cpp
diff options
context:
space:
mode:
authorYamaArashi <shadow962@live.com>2016-06-09 01:32:19 -0700
committerYamaArashi <shadow962@live.com>2016-06-09 01:32:19 -0700
commita37de9f76364f3ed95c49ca1417ee01cd4d617b1 (patch)
treec8039e8fc47394076faad856abb859c5bb39fcf3 /tools/preproc/preproc.cpp
parent54c60e33cb69514228f4bfb3d65b2668c824e449 (diff)
double-colon global labels in preproc; misc other stuff
Diffstat (limited to 'tools/preproc/preproc.cpp')
-rw-r--r--tools/preproc/preproc.cpp15
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;
}
+ }
}
}