summaryrefslogtreecommitdiff
path: root/test/perf/label.pl
diff options
context:
space:
mode:
Diffstat (limited to 'test/perf/label.pl')
-rwxr-xr-xtest/perf/label.pl18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/perf/label.pl b/test/perf/label.pl
new file mode 100755
index 0000000..9b59768
--- /dev/null
+++ b/test/perf/label.pl
@@ -0,0 +1,18 @@
+#!/usr/bin/perl
+#
+# Generate a test case for label 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 "l$i:\n";
+ for ($j = 0; $j < 8; $j++) {
+ print "\tdd l", int(rand($i+1)), "\n";
+ }
+}