summaryrefslogtreecommitdiff
path: root/tools/d2c/d2c.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-05-28 20:34:24 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-05-28 20:34:24 (GMT)
commit5311a943dffcc410739509b9215ca464f6d1e54c (patch)
tree9c34b5176606aa7bb3dcfb5970a20e3f9b27f1c3 /tools/d2c/d2c.c
parent9f5ed46de568d3db882c939c8ca9d0117bff3369 (diff)
Included support for ARMv7 system instructions.
Diffstat (limited to 'tools/d2c/d2c.c')
-rw-r--r--tools/d2c/d2c.c40
1 files changed, 27 insertions, 13 deletions
diff --git a/tools/d2c/d2c.c b/tools/d2c/d2c.c
index 1d9b5b6..9cb2df4 100644
--- a/tools/d2c/d2c.c
+++ b/tools/d2c/d2c.c
@@ -89,6 +89,14 @@ static void show_usage(const char *argv0)
printf("\n");
+ printf("Raw specific options:\n");
+
+ printf("\n");
+
+ printf("\t--filename-reuse <length>\t\tSet the length of filename to include in identifiers (default = 0).\n");
+
+ printf("\n");
+
printf("Format specific options:\n");
printf("\n");
@@ -133,21 +141,23 @@ int main(int argc, char **argv)
static struct option long_options[] = {
- { "help", no_argument, NULL, 'h' },
- { "exec", required_argument, NULL, 'x' },
- { "outdir", required_argument, NULL, 'o' },
- { "type", required_argument, NULL, 't' },
- { "arch", required_argument, NULL, 'a' },
- { "name", required_argument, NULL, 'n' },
- { "guard", required_argument, NULL, 'G' },
- { "encoding", required_argument, NULL, 'e' },
+ { "help", no_argument, NULL, 'h' },
+ { "exec", required_argument, NULL, 'x' },
+ { "outdir", required_argument, NULL, 'o' },
+ { "type", required_argument, NULL, 't' },
+ { "arch", required_argument, NULL, 'a' },
+ { "name", required_argument, NULL, 'n' },
+ { "guard", required_argument, NULL, 'G' },
+ { "encoding", required_argument, NULL, 'e' },
+
+ { "id-prefix", required_argument, NULL, 0x100 },
+ { "id-expected", required_argument, NULL, 0x101 },
- { "id-prefix", required_argument, NULL, 0x100 },
- { "id-expected",required_argument, NULL, 0x101 },
+ { "filename-reuse", required_argument, NULL, 0x200 },
- { "op-prefix", required_argument, NULL, 0x200 },
+ { "op-prefix", required_argument, NULL, 0x300 },
- { NULL, 0, NULL, 0 }
+ { NULL, 0, NULL, 0 }
};
@@ -163,7 +173,7 @@ int main(int argc, char **argv)
while (!has_error)
{
- ret = getopt_long(argc, argv, "hx:o:t:a:n:e:G:", long_options, &index);
+ ret = getopt_long(argc, argv, "hx:o:t:a:n:G:e:", long_options, &index);
if (ret == -1) break;
switch (ret)
@@ -244,6 +254,10 @@ int main(int argc, char **argv)
break;
case 0x200:
+ info.filename_reuse = strtoul(optarg, NULL, 10);
+ break;
+
+ case 0x300:
info.fmt_prefix = optarg;
break;