Trailing space in opcodes/ generated files
HJ recently removed trailing space in binutils files, but unfortunately they return when regenerating files in opcodes. This fixes the regen process. * cgen.sh: Trim trailing space from cgen output. * ia64-gen.c (print_dependency_table): Don't generate trailing space. (print_dis_table): Likewise. * opc2c.c (dump_lines): Likewise. (orig_filename): Warning fix. * ia64-asmtab.c: Regenerate.
This commit is contained in:
parent
26a4b92c91
commit
919b75f7e2
5 changed files with 835 additions and 845 deletions
|
@ -1,3 +1,12 @@
|
|||
2015-08-17 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* cgen.sh: Trim trailing space from cgen output.
|
||||
* ia64-gen.c (print_dependency_table): Don't generate trailing space.
|
||||
(print_dis_table): Likewise.
|
||||
* opc2c.c (dump_lines): Likewise.
|
||||
(orig_filename): Warning fix.
|
||||
* ia64-asmtab.c: Regenerate.
|
||||
|
||||
2015-08-13 Andre Vieira <andre.simoesdiasvieira@arm.com>
|
||||
|
||||
* arm-dis.c (print_insn_arm): Disassembling for all targets V6
|
||||
|
|
|
@ -113,41 +113,48 @@ opcodes)
|
|||
${extrafile_args}
|
||||
|
||||
# Customise generated files for the particular architecture.
|
||||
sed -e "s/@ARCH@/${ARCH}/g" -e "s/@arch@/${arch}/g" < ${tmp}-desc.h1 > ${tmp}-desc.h
|
||||
sed -e "s/@ARCH@/${ARCH}/g" -e "s/@arch@/${arch}/g" \
|
||||
-e 's/[ ][ ]*$//' < ${tmp}-desc.h1 > ${tmp}-desc.h
|
||||
${rootdir}/move-if-change ${tmp}-desc.h ${srcdir}/${prefix}-desc.h
|
||||
|
||||
sed -e "s/@ARCH@/${ARCH}/g" -e "s/@arch@/${arch}/g" \
|
||||
-e "s/@prefix@/${prefix}/" < ${tmp}-desc.c1 > ${tmp}-desc.c
|
||||
-e "s/@prefix@/${prefix}/" -e 's/[ ][ ]*$//' \
|
||||
< ${tmp}-desc.c1 > ${tmp}-desc.c
|
||||
${rootdir}/move-if-change ${tmp}-desc.c ${srcdir}/${prefix}-desc.c
|
||||
|
||||
sed -e "s/@ARCH@/${ARCH}/g" -e "s/@arch@/${arch}/g" < ${tmp}-opc.h1 > ${tmp}-opc.h
|
||||
sed -e "s/@ARCH@/${ARCH}/g" -e "s/@arch@/${arch}/g" \
|
||||
-e 's/[ ][ ]*$//' < ${tmp}-opc.h1 > ${tmp}-opc.h
|
||||
${rootdir}/move-if-change ${tmp}-opc.h ${srcdir}/${prefix}-opc.h
|
||||
|
||||
sed -e "s/@ARCH@/${ARCH}/g" -e "s/@arch@/${arch}/g" \
|
||||
-e "s/@prefix@/${prefix}/" < ${tmp}-opc.c1 > ${tmp}-opc.c
|
||||
-e "s/@prefix@/${prefix}/" -e 's/[ ][ ]*$//' \
|
||||
< ${tmp}-opc.c1 > ${tmp}-opc.c
|
||||
${rootdir}/move-if-change ${tmp}-opc.c ${srcdir}/${prefix}-opc.c
|
||||
|
||||
case $extrafiles in
|
||||
*opinst*)
|
||||
sed -e "s/@ARCH@/${ARCH}/g" -e "s/@arch@/${arch}/g" \
|
||||
-e "s/@prefix@/${prefix}/" < ${tmp}-opinst.c1 >${tmp}-opinst.c
|
||||
-e "s/@prefix@/${prefix}/" -e 's/[ ][ ]*$//' \
|
||||
< ${tmp}-opinst.c1 >${tmp}-opinst.c
|
||||
${rootdir}/move-if-change ${tmp}-opinst.c ${srcdir}/${prefix}-opinst.c
|
||||
;;
|
||||
esac
|
||||
|
||||
cat ${srcdir}/cgen-ibld.in ${tmp}-ibld.in1 | \
|
||||
sed -e "s/@ARCH@/${ARCH}/g" -e "s/@arch@/${arch}/g" \
|
||||
-e "s/@prefix@/${prefix}/" > ${tmp}-ibld.c
|
||||
-e "s/@prefix@/${prefix}/" -e 's/[ ][ ]*$//' > ${tmp}-ibld.c
|
||||
${rootdir}/move-if-change ${tmp}-ibld.c ${srcdir}/${prefix}-ibld.c
|
||||
|
||||
sed -e "/ -- assembler routines/ r ${tmp}-asm.in1" ${srcdir}/cgen-asm.in \
|
||||
| sed -e "s/@ARCH@/${ARCH}/g" -e "s/@arch@/${arch}/g" \
|
||||
-e "s/@prefix@/${prefix}/" > ${tmp}-asm.c
|
||||
-e "s/@prefix@/${prefix}/" -e 's/[ ][ ]*$//' \
|
||||
> ${tmp}-asm.c
|
||||
${rootdir}/move-if-change ${tmp}-asm.c ${srcdir}/${prefix}-asm.c
|
||||
|
||||
sed -e "/ -- disassembler routines/ r ${tmp}-dis.in1" ${srcdir}/cgen-dis.in \
|
||||
| sed -e "s/@ARCH@/${ARCH}/g" -e "s/@arch@/${arch}/g" \
|
||||
-e "s/@prefix@/${prefix}/" > ${tmp}-dis.c
|
||||
-e "s/@prefix@/${prefix}/" -e 's/[ ][ ]*$//' \
|
||||
> ${tmp}-dis.c
|
||||
${rootdir}/move-if-change ${tmp}-dis.c ${srcdir}/${prefix}-dis.c
|
||||
|
||||
# Remove temporary files.
|
||||
|
|
|
@ -494,7 +494,6 @@ static const unsigned short dep15[] = {
|
|||
|
||||
static const unsigned short dep16[] = {
|
||||
1, 6, 41, 77, 100, 140, 199, 204, 245, 272, 288, 318, 2401, 28869, 29024,
|
||||
|
||||
};
|
||||
|
||||
static const unsigned short dep17[] = {
|
||||
|
@ -526,7 +525,6 @@ static const unsigned short dep22[] = {
|
|||
188, 191, 192, 194, 199, 245, 272, 288, 315, 316, 317, 318, 319, 320, 321,
|
||||
322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 336, 337,
|
||||
339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 28869, 29024,
|
||||
|
||||
};
|
||||
|
||||
static const unsigned short dep23[] = {
|
||||
|
@ -550,7 +548,6 @@ static const unsigned short dep26[] = {
|
|||
|
||||
static const unsigned short dep27[] = {
|
||||
25, 26, 100, 101, 104, 108, 111, 140, 141, 161, 165, 167, 178, 188, 288, 318,
|
||||
|
||||
};
|
||||
|
||||
static const unsigned short dep28[] = {
|
||||
|
@ -690,7 +687,6 @@ static const unsigned short dep53[] = {
|
|||
|
||||
static const unsigned short dep54[] = {
|
||||
15, 100, 213, 214, 288, 2139, 2331, 18604, 18605, 18767, 18768, 18770, 18771,
|
||||
|
||||
};
|
||||
|
||||
static const unsigned short dep55[] = {
|
||||
|
@ -712,7 +708,6 @@ static const unsigned short dep57[] = {
|
|||
|
||||
static const unsigned short dep58[] = {
|
||||
16, 100, 216, 217, 288, 2139, 2331, 18604, 18605, 18767, 18768, 18770, 18771,
|
||||
|
||||
};
|
||||
|
||||
static const unsigned short dep59[] = {
|
||||
|
@ -723,7 +718,6 @@ static const unsigned short dep59[] = {
|
|||
|
||||
static const unsigned short dep60[] = {
|
||||
17, 100, 219, 220, 288, 2139, 2331, 18604, 18605, 18767, 18768, 18770, 18771,
|
||||
|
||||
};
|
||||
|
||||
static const unsigned short dep61[] = {
|
||||
|
@ -734,7 +728,6 @@ static const unsigned short dep61[] = {
|
|||
|
||||
static const unsigned short dep62[] = {
|
||||
18, 100, 222, 223, 288, 2139, 2331, 18604, 18605, 18767, 18768, 18770, 18771,
|
||||
|
||||
};
|
||||
|
||||
static const unsigned short dep63[] = {
|
||||
|
@ -750,7 +743,6 @@ static const unsigned short dep64[] = {
|
|||
static const unsigned short dep65[] = {
|
||||
41, 42, 100, 161, 165, 178, 188, 288, 2138, 2139, 2140, 2169, 2170, 2173,
|
||||
2176, 2331, 4136, 16531, 16533, 16534, 16536, 18767, 18769, 18770, 18772,
|
||||
|
||||
};
|
||||
|
||||
static const unsigned short dep66[] = {
|
||||
|
@ -759,7 +751,6 @@ static const unsigned short dep66[] = {
|
|||
|
||||
static const unsigned short dep67[] = {
|
||||
11, 41, 42, 100, 161, 165, 178, 188, 209, 288, 2169, 2170, 2173, 2176, 4136,
|
||||
|
||||
};
|
||||
|
||||
static const unsigned short dep68[] = {
|
||||
|
@ -772,7 +763,6 @@ static const unsigned short dep69[] = {
|
|||
|
||||
static const unsigned short dep70[] = {
|
||||
11, 41, 42, 100, 161, 165, 178, 188, 210, 288, 2169, 2170, 2173, 2176, 4136,
|
||||
|
||||
};
|
||||
|
||||
static const unsigned short dep71[] = {
|
||||
|
@ -781,7 +771,6 @@ static const unsigned short dep71[] = {
|
|||
|
||||
static const unsigned short dep72[] = {
|
||||
11, 41, 42, 100, 161, 165, 178, 188, 211, 288, 2169, 2170, 2173, 2176, 4136,
|
||||
|
||||
};
|
||||
|
||||
static const unsigned short dep73[] = {
|
||||
|
@ -790,7 +779,6 @@ static const unsigned short dep73[] = {
|
|||
|
||||
static const unsigned short dep74[] = {
|
||||
11, 41, 42, 100, 161, 165, 178, 188, 212, 288, 2169, 2170, 2173, 2176, 4136,
|
||||
|
||||
};
|
||||
|
||||
static const unsigned short dep75[] = {
|
||||
|
@ -799,7 +787,6 @@ static const unsigned short dep75[] = {
|
|||
|
||||
static const unsigned short dep76[] = {
|
||||
41, 42, 100, 161, 165, 178, 188, 214, 215, 288, 2169, 2170, 2173, 2176, 4136,
|
||||
|
||||
};
|
||||
|
||||
static const unsigned short dep77[] = {
|
||||
|
@ -812,7 +799,6 @@ static const unsigned short dep78[] = {
|
|||
|
||||
static const unsigned short dep79[] = {
|
||||
41, 42, 100, 161, 165, 178, 188, 217, 218, 288, 2169, 2170, 2173, 2176, 4136,
|
||||
|
||||
};
|
||||
|
||||
static const unsigned short dep80[] = {
|
||||
|
@ -821,7 +807,6 @@ static const unsigned short dep80[] = {
|
|||
|
||||
static const unsigned short dep81[] = {
|
||||
41, 42, 100, 161, 165, 178, 188, 220, 221, 288, 2169, 2170, 2173, 2176, 4136,
|
||||
|
||||
};
|
||||
|
||||
static const unsigned short dep82[] = {
|
||||
|
@ -830,7 +815,6 @@ static const unsigned short dep82[] = {
|
|||
|
||||
static const unsigned short dep83[] = {
|
||||
41, 42, 100, 161, 165, 178, 188, 223, 224, 288, 2169, 2170, 2173, 2176, 4136,
|
||||
|
||||
};
|
||||
|
||||
static const unsigned short dep84[] = {
|
||||
|
@ -1034,7 +1018,6 @@ static const unsigned short dep121[] = {
|
|||
static const unsigned short dep122[] = {
|
||||
19, 20, 41, 42, 100, 161, 165, 178, 188, 288, 2138, 2139, 2140, 2169, 2170,
|
||||
2173, 2176, 2331, 4136, 16531, 16533, 16534, 16536, 18767, 18769, 18770, 18772,
|
||||
|
||||
};
|
||||
|
||||
static const unsigned short dep123[] = {
|
||||
|
@ -1082,7 +1065,6 @@ static const unsigned short dep131[] = {
|
|||
|
||||
static const unsigned short dep132[] = {
|
||||
41, 42, 100, 122, 125, 128, 161, 165, 178, 188, 288, 2333, 4136, 20619, 24697,
|
||||
|
||||
};
|
||||
|
||||
static const unsigned short dep133[] = {
|
||||
|
@ -1148,7 +1130,6 @@ static const unsigned short dep145[] = {
|
|||
|
||||
static const unsigned short dep146[] = {
|
||||
1, 2, 28, 29, 100, 161, 165, 178, 180, 181, 188, 200, 234, 288, 28869, 29024,
|
||||
|
||||
};
|
||||
|
||||
static const unsigned short dep147[] = {
|
||||
|
@ -1158,7 +1139,6 @@ static const unsigned short dep147[] = {
|
|||
|
||||
static const unsigned short dep148[] = {
|
||||
0, 41, 42, 100, 161, 165, 178, 188, 198, 288, 2169, 2170, 2173, 2176, 4136,
|
||||
|
||||
};
|
||||
|
||||
static const unsigned short dep149[] = {
|
||||
|
@ -1249,7 +1229,6 @@ static const unsigned short dep164[] = {
|
|||
41, 42, 44, 45, 47, 49, 50, 52, 53, 54, 55, 56, 58, 59, 62, 63, 65, 66, 67,
|
||||
68, 69, 71, 72, 73, 97, 98, 100, 140, 141, 161, 163, 164, 165, 178, 188, 193,
|
||||
194, 259, 287, 288, 2109, 2118, 2169, 2170, 2173, 2176, 2333, 4136, 20619,
|
||||
|
||||
};
|
||||
|
||||
static const unsigned short dep165[] = {
|
||||
|
@ -1502,13 +1481,11 @@ static const unsigned short dep213[] = {
|
|||
static const unsigned short dep214[] = {
|
||||
41, 42, 72, 80, 85, 87, 100, 140, 141, 156, 158, 161, 165, 178, 188, 193,
|
||||
194, 195, 288, 2141, 2142, 2143, 2169, 2170, 2173, 2176, 2333, 4136, 20619,
|
||||
|
||||
};
|
||||
|
||||
static const unsigned short dep215[] = {
|
||||
41, 42, 100, 161, 165, 167, 178, 188, 189, 191, 288, 2138, 2139, 2140, 2141,
|
||||
2142, 2143, 2169, 2170, 2173, 2176, 4136, 16531, 16533, 16534, 16536, 20619,
|
||||
|
||||
};
|
||||
|
||||
static const unsigned short dep216[] = {
|
||||
|
@ -1525,7 +1502,6 @@ static const unsigned short dep218[] = {
|
|||
41, 42, 72, 77, 79, 80, 85, 87, 100, 112, 114, 131, 132, 134, 135, 136, 138,
|
||||
140, 141, 142, 143, 145, 146, 156, 158, 161, 165, 174, 176, 178, 188, 193,
|
||||
194, 195, 288, 2141, 2142, 2143, 2169, 2170, 2173, 2176, 2333, 4136, 20619,
|
||||
|
||||
};
|
||||
|
||||
static const unsigned short dep219[] = {
|
||||
|
@ -1583,14 +1559,12 @@ static const unsigned short dep228[] = {
|
|||
0, 41, 42, 72, 77, 79, 80, 85, 87, 100, 114, 131, 132, 134, 135, 136, 138,
|
||||
140, 141, 142, 143, 145, 146, 156, 158, 161, 165, 174, 176, 178, 188, 193,
|
||||
194, 195, 198, 288, 295, 2141, 2142, 2143, 2169, 2170, 2173, 2176, 4136, 20619,
|
||||
|
||||
};
|
||||
|
||||
static const unsigned short dep229[] = {
|
||||
0, 5, 41, 42, 72, 77, 79, 80, 85, 87, 100, 114, 131, 132, 134, 135, 136, 138,
|
||||
140, 141, 142, 143, 145, 146, 156, 158, 161, 165, 174, 176, 178, 188, 193,
|
||||
194, 195, 198, 288, 295, 2141, 2142, 2143, 2169, 2170, 2173, 2176, 4136, 20619,
|
||||
|
||||
};
|
||||
|
||||
static const unsigned short dep230[] = {
|
||||
|
@ -1682,7 +1656,6 @@ static const unsigned short dep244[] = {
|
|||
136, 138, 140, 141, 142, 143, 145, 146, 156, 158, 159, 161, 165, 174, 176,
|
||||
178, 188, 193, 194, 195, 198, 288, 2141, 2142, 2143, 2169, 2170, 2173, 2176,
|
||||
2331, 4136, 16531, 16533, 16534, 16536, 18767, 18769, 18770, 18772, 20619,
|
||||
|
||||
};
|
||||
|
||||
static const unsigned short dep245[] = {
|
||||
|
@ -1691,7 +1664,6 @@ static const unsigned short dep245[] = {
|
|||
|
||||
static const unsigned short dep246[] = {
|
||||
100, 288, 2139, 2143, 2331, 2333, 18604, 18605, 18767, 18768, 18770, 18771,
|
||||
|
||||
};
|
||||
|
||||
static const unsigned short dep247[] = {
|
||||
|
@ -1785,7 +1757,6 @@ static const unsigned short dep260[] = {
|
|||
209, 210, 211, 212, 214, 215, 217, 218, 220, 221, 223, 224, 225, 226, 227,
|
||||
228, 230, 232, 234, 235, 236, 237, 238, 272, 288, 2071, 2082, 2141, 2142,
|
||||
2143, 2169, 2170, 2173, 2176, 2277, 2288, 2333, 4136, 20619, 28869, 29024,
|
||||
|
||||
};
|
||||
|
||||
#define NELS(X) (sizeof(X)/sizeof(X[0]))
|
||||
|
|
|
@ -1610,16 +1610,16 @@ print_dependency_table (void)
|
|||
/* And dependency lists. */
|
||||
for (i=0;i < dlistlen;i++)
|
||||
{
|
||||
int len = 2;
|
||||
printf ("static const unsigned short dep%d[] = {\n ", i);
|
||||
unsigned int len = (unsigned) -1;
|
||||
printf ("static const unsigned short dep%d[] = {", i);
|
||||
for (j=0;j < dlists[i]->len; j++)
|
||||
{
|
||||
len += printf ("%d, ", dlists[i]->deps[j]);
|
||||
if (len > 75)
|
||||
if (len > 74)
|
||||
{
|
||||
printf("\n ");
|
||||
len = 2;
|
||||
len = 1;
|
||||
}
|
||||
len += printf (" %d,", dlists[i]->deps[j]);
|
||||
}
|
||||
printf ("\n};\n\n");
|
||||
}
|
||||
|
@ -2124,10 +2124,10 @@ print_dis_table (void)
|
|||
int x;
|
||||
struct disent *cent = disinsntable;
|
||||
|
||||
printf ("static const char dis_table[] = {\n");
|
||||
printf ("static const char dis_table[] = {");
|
||||
for (x = 0; x < insn_list_len; x++)
|
||||
{
|
||||
if ((x > 0) && ((x % 12) == 0))
|
||||
if (x % 12 == 0)
|
||||
printf ("\n ");
|
||||
|
||||
printf (" 0x%02x,", insn_list[x]);
|
||||
|
|
|
@ -121,7 +121,7 @@ int n_varies = 0;
|
|||
|
||||
unsigned char cur_bits[MAX_BYTES + 1];
|
||||
|
||||
char * orig_filename;
|
||||
const char * orig_filename;
|
||||
|
||||
FILE * sim_log = NULL;
|
||||
#define lprintf if (sim_log) fprintf
|
||||
|
@ -339,6 +339,9 @@ dump_lines (opcode * op, int level, Indirect * ind)
|
|||
printf ("#line %d \"%s\"\n", op->lineno + 1, orig_filename);
|
||||
|
||||
for (i = 0; i < op->nlines; i++)
|
||||
if (op->lines[i][0] == '\n')
|
||||
printf ("%s", op->lines[i]);
|
||||
else
|
||||
printf ("%*s%s", level, "", op->lines[i]);
|
||||
|
||||
if (op->comment)
|
||||
|
|
Loading…
Reference in a new issue