summaryrefslogtreecommitdiff
path: root/test/perf/macro.pl
diff options
context:
space:
mode:
authorHyungKyu Song <hk76.song@samsung.com>2013-02-16 00:52:20 +0900
committerHyungKyu Song <hk76.song@samsung.com>2013-02-16 00:52:20 +0900
commite6c15f0e49b4ea41b5c5eb36457db0127ec901fc (patch)
tree996be9095a97ff2aac0d98963b6044d47a0ec60c /test/perf/macro.pl
parent65c26d26fb72cec0d43d199c72ed27513d17f4c9 (diff)
downloadnasm-tizen_2.0.tar.gz
nasm-tizen_2.0.tar.bz2
nasm-tizen_2.0.zip
Diffstat (limited to 'test/perf/macro.pl')
-rwxr-xr-xtest/perf/macro.pl18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/perf/macro.pl b/test/perf/macro.pl
new file mode 100755
index 0000000..b729805
--- /dev/null
+++ b/test/perf/macro.pl
@@ -0,0 +1,18 @@
+#!/usr/bin/perl
+#
+# Generate a test case for macro lookup performance
+#
+
+($len) = @ARGV;
+$len = 100000 unless ($len);
+
+print "\tbits 32\n";
+print "\tsection .data\n";
+print "\n";
+
+for ($i = 0; $i < $len; $i++) {
+ print "%define m$i $i\n";
+ for ($j = 0; $j < 8; $j++) {
+ print "\tdd m", int(rand($i+1)), "\n";
+ }
+}