This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[sim] Patch to sim/sh/gencode.c
- To: gdb-patches at sources dot redhat dot com
- Subject: [sim] Patch to sim/sh/gencode.c
- From: Ben Elliston <bje at redhat dot com>
- Date: Sun, 10 Sep 2000 18:52:05 -0400 (EDT)
The following patch corrects some errors in `op' struct entries. Okay
to commit?
2000-09-10 Ben Elliston <bje@redhat.com>
* gencode.c (tab): Delimit all string array elements with commas.
--- /home/bje/sources.redhat.com/src/sim/sh/gencode.c Tue May 16 07:12:42 2000
+++ /u2/comp-tools-lite-devo/devo/sim/sh/gencode.c Thu Sep 7 14:56:35 2000
@@ -41,9 +41,7 @@
char *code;
char *stuff[MAX_NR_STUFF];
int index;
-}
-
-op;
+} op;
op tab[] =
@@ -1321,7 +1319,7 @@
" res = Sz << i;",
"else if (i >= 128 - 16)",
" res = Sz >> 128 - i;",
- "else"
+ "else",
" {",
" RAISE_EXCEPTION (SIGILL);",
" return;",
@@ -1336,7 +1334,7 @@
"",
"if (i < 32)",
" {",
- " if (i == 32)"
+ " if (i == 32)",
" {",
" res = 0;",
" res_grd = Sz;",
@@ -1352,7 +1350,7 @@
"else if (i >= 96)",
" {",
" i = 128 - i;",
- " if (i == 32)"
+ " if (i == 32)",
" {",
" res_grd = SIGN32 (Sz_grd);",
" res = Sz_grd;",
@@ -1364,7 +1362,7 @@
" }",
" carry = Sz >> (i - 1) & 1;",
" }",
- "else"
+ "else",
" {",
" RAISE_EXCEPTION (SIGILL);",
" return;",
@@ -1540,7 +1538,7 @@
" res = Sx << Sy;",
"else if (Sy >= 128 - 16)",
" res = Sx >> 128 - Sy;",
- "else"
+ "else",
" {",
" RAISE_EXCEPTION (SIGILL);",
" return;",
@@ -1554,7 +1552,7 @@
"",
"if (Sy < 32)",
" {",
- " if (Sy == 32)"
+ " if (Sy == 32)",
" {",
" res = 0;",
" res_grd = Sx;",
@@ -1570,7 +1568,7 @@
"else if (Sy >= 96)",
" {",
" Sy = 128 - Sy;",
- " if (Sy == 32)"
+ " if (Sy == 32)",
" {",
" res_grd = SIGN32 (Sx_grd);",
" res = Sx_grd;",
@@ -1582,7 +1580,7 @@
" }",
" carry = Sx >> (Sy - 1) & 1;",
" }",
- "else"
+ "else",
" {",
" RAISE_EXCEPTION (SIGILL);",
" return;",
@@ -1694,7 +1692,7 @@
{ "","", "(if cc) pdmsb Sx,Dz", "100111ccxx..zzzz",
"unsigned Sx = DSP_R (x);",
"int Sx_grd = GET_DSP_GRD (x);",
- "int i = 16;"
+ "int i = 16;",
"",
"if (Sx_grd < 0)",
" {",
@@ -1710,7 +1708,7 @@
" res = 30;",
"else",
" res = 31;",
- "do"
+ "do",
" {",
" if (Sx & ~0 << i)",
" {",
@@ -1727,13 +1725,13 @@
},
{ "","", "(if cc) pdmsb Sy,Dz", "101111cc..yyzzzz",
"unsigned Sy = DSP_R (y);",
- "int i;"
+ "int i;",
"",
"if (Sy < 0)",
" Sy = ~Sy;",
"Sy <<= 1;",
"res = 31;",
- "do"
+ "do",
" {",
" if (Sy & ~0 << i)",
" {",