aboutsummaryrefslogtreecommitdiff
path: root/target/xtensa
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2018-05-21 10:50:32 +0100
committerPeter Maydell <peter.maydell@linaro.org>2018-05-21 10:50:32 +0100
commit9802316ed6c19fd45b4c498523df02ca370d0586 (patch)
tree6918d4c2da4436223e6a66ab4d1941b9b47f870a /target/xtensa
parentdfa93a0b6ef51fd8e0285a9991704b51cf884c33 (diff)
parent9a232487aab8a7640ff8853d7d8d7c27106b44f8 (diff)
Merge remote-tracking branch 'remotes/mjt/tags/trivial-patches-fetch' into staging
trivial patches for 2018-05-20 # gpg: Signature made Sun 20 May 2018 07:13:20 BST # gpg: using RSA key 701B4F6B1A693E59 # gpg: Good signature from "Michael Tokarev <mjt@tls.msk.ru>" # gpg: aka "Michael Tokarev <mjt@corpit.ru>" # gpg: aka "Michael Tokarev <mjt@debian.org>" # Primary key fingerprint: 6EE1 95D1 886E 8FFB 810D 4324 457C E0A0 8044 65C5 # Subkey fingerprint: 7B73 BAD6 8BE7 A2C2 8931 4B22 701B 4F6B 1A69 3E59 * remotes/mjt/tags/trivial-patches-fetch: (22 commits) acpi: fix a comment about aml_call0() qapi/net.json: Fix the version number of the "vlan" removal gdbstub: Handle errors in gdb_accept() gdbstub: Use qemu_set_cloexec() replace functions which are only available in glib-2.24 typedefs: Remove PcGuestInfo from qemu/typedefs.h qemu-options: Allow -no-user-config again hw/timer/mt48t59: Fix bit-rotten NVRAM_PRINTF format strings Remove unnecessary variables for function return value trivial: Do not include pci.h if it is not necessary tests: fix tpm-crb tpm-tis tests race hw/ide/ahci: Keep ALLWINNER_AHCI() macro internal qemu-img-cmds.hx: add passive-aggressive note qemu-img: Make documentation between .texi and .hx consistent qemu-img: remove references to GEN_DOCS qemu-img.texi: fix command ordering qemu-img-commands.hx: argument ordering fixups HACKING: document preference for g_new instead of g_malloc qemu-option-trace: -trace enable= is a pattern, not a file slirp/debug: Print IP addresses in human readable form ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target/xtensa')
-rw-r--r--target/xtensa/core-dc232b/xtensa-modules.inc.c56
-rw-r--r--target/xtensa/core-dc233c/xtensa-modules.inc.c56
-rw-r--r--target/xtensa/core-de212/xtensa-modules.inc.c48
-rw-r--r--target/xtensa/core-fsf/xtensa-modules.inc.c32
-rw-r--r--target/xtensa/core-sample_controller/xtensa-modules.inc.c24
-rw-r--r--target/xtensa/translate.c7
6 files changed, 56 insertions, 167 deletions
diff --git a/target/xtensa/core-dc232b/xtensa-modules.inc.c b/target/xtensa/core-dc232b/xtensa-modules.inc.c
index d322c3f52a..164df3b1a4 100644
--- a/target/xtensa/core-dc232b/xtensa-modules.inc.c
+++ b/target/xtensa/core-dc232b/xtensa-modules.inc.c
@@ -1736,9 +1736,7 @@ Operand_arr_decode (uint32 *valp ATTRIBUTE_UNUSED)
static int
Operand_arr_encode (uint32 *valp)
{
- int error;
- error = (*valp & ~0xf) != 0;
- return error;
+ return (*valp & ~0xf) != 0;
}
static int
@@ -1750,9 +1748,7 @@ Operand_ars_decode (uint32 *valp ATTRIBUTE_UNUSED)
static int
Operand_ars_encode (uint32 *valp)
{
- int error;
- error = (*valp & ~0xf) != 0;
- return error;
+ return (*valp & ~0xf) != 0;
}
static int
@@ -1764,9 +1760,7 @@ Operand_art_decode (uint32 *valp ATTRIBUTE_UNUSED)
static int
Operand_art_encode (uint32 *valp)
{
- int error;
- error = (*valp & ~0xf) != 0;
- return error;
+ return (*valp & ~0xf) != 0;
}
static int
@@ -1778,9 +1772,7 @@ Operand_ar0_decode (uint32 *valp ATTRIBUTE_UNUSED)
static int
Operand_ar0_encode (uint32 *valp)
{
- int error;
- error = (*valp & ~0x1f) != 0;
- return error;
+ return (*valp & ~0x1f) != 0;
}
static int
@@ -1792,9 +1784,7 @@ Operand_ar4_decode (uint32 *valp ATTRIBUTE_UNUSED)
static int
Operand_ar4_encode (uint32 *valp)
{
- int error;
- error = (*valp & ~0x1f) != 0;
- return error;
+ return (*valp & ~0x1f) != 0;
}
static int
@@ -1806,9 +1796,7 @@ Operand_ar8_decode (uint32 *valp ATTRIBUTE_UNUSED)
static int
Operand_ar8_encode (uint32 *valp)
{
- int error;
- error = (*valp & ~0x1f) != 0;
- return error;
+ return (*valp & ~0x1f) != 0;
}
static int
@@ -1820,9 +1808,7 @@ Operand_ar12_decode (uint32 *valp ATTRIBUTE_UNUSED)
static int
Operand_ar12_encode (uint32 *valp)
{
- int error;
- error = (*valp & ~0x1f) != 0;
- return error;
+ return (*valp & ~0x1f) != 0;
}
static int
@@ -1834,9 +1820,7 @@ Operand_ars_entry_decode (uint32 *valp ATTRIBUTE_UNUSED)
static int
Operand_ars_entry_encode (uint32 *valp)
{
- int error;
- error = (*valp & ~0x1f) != 0;
- return error;
+ return (*valp & ~0x1f) != 0;
}
static int
@@ -2406,9 +2390,7 @@ Operand_mx_decode (uint32 *valp ATTRIBUTE_UNUSED)
static int
Operand_mx_encode (uint32 *valp)
{
- int error;
- error = (*valp & ~0x3) != 0;
- return error;
+ return (*valp & ~0x3) != 0;
}
static int
@@ -2436,9 +2418,7 @@ Operand_mw_decode (uint32 *valp ATTRIBUTE_UNUSED)
static int
Operand_mw_encode (uint32 *valp)
{
- int error;
- error = (*valp & ~0x3) != 0;
- return error;
+ return (*valp & ~0x3) != 0;
}
static int
@@ -2450,9 +2430,7 @@ Operand_mr0_decode (uint32 *valp ATTRIBUTE_UNUSED)
static int
Operand_mr0_encode (uint32 *valp)
{
- int error;
- error = (*valp & ~0x3) != 0;
- return error;
+ return (*valp & ~0x3) != 0;
}
static int
@@ -2464,9 +2442,7 @@ Operand_mr1_decode (uint32 *valp ATTRIBUTE_UNUSED)
static int
Operand_mr1_encode (uint32 *valp)
{
- int error;
- error = (*valp & ~0x3) != 0;
- return error;
+ return (*valp & ~0x3) != 0;
}
static int
@@ -2478,9 +2454,7 @@ Operand_mr2_decode (uint32 *valp ATTRIBUTE_UNUSED)
static int
Operand_mr2_encode (uint32 *valp)
{
- int error;
- error = (*valp & ~0x3) != 0;
- return error;
+ return (*valp & ~0x3) != 0;
}
static int
@@ -2492,9 +2466,7 @@ Operand_mr3_decode (uint32 *valp ATTRIBUTE_UNUSED)
static int
Operand_mr3_encode (uint32 *valp)
{
- int error;
- error = (*valp & ~0x3) != 0;
- return error;
+ return (*valp & ~0x3) != 0;
}
static int
diff --git a/target/xtensa/core-dc233c/xtensa-modules.inc.c b/target/xtensa/core-dc233c/xtensa-modules.inc.c
index 7c20f82349..0f32f0804a 100644
--- a/target/xtensa/core-dc233c/xtensa-modules.inc.c
+++ b/target/xtensa/core-dc233c/xtensa-modules.inc.c
@@ -1817,9 +1817,7 @@ Operand_arr_decode (uint32 *valp ATTRIBUTE_UNUSED)
static int
Operand_arr_encode (uint32 *valp)
{
- int error;
- error = (*valp & ~0xf) != 0;
- return error;
+ return (*valp & ~0xf) != 0;
}
static int
@@ -1831,9 +1829,7 @@ Operand_ars_decode (uint32 *valp ATTRIBUTE_UNUSED)
static int
Operand_ars_encode (uint32 *valp)
{
- int error;
- error = (*valp & ~0xf) != 0;
- return error;
+ return (*valp & ~0xf) != 0;
}
static int
@@ -1845,9 +1841,7 @@ Operand_art_decode (uint32 *valp ATTRIBUTE_UNUSED)
static int
Operand_art_encode (uint32 *valp)
{
- int error;
- error = (*valp & ~0xf) != 0;
- return error;
+ return (*valp & ~0xf) != 0;
}
static int
@@ -1859,9 +1853,7 @@ Operand_ar0_decode (uint32 *valp ATTRIBUTE_UNUSED)
static int
Operand_ar0_encode (uint32 *valp)
{
- int error;
- error = (*valp & ~0x1f) != 0;
- return error;
+ return (*valp & ~0x1f) != 0;
}
static int
@@ -1873,9 +1865,7 @@ Operand_ar4_decode (uint32 *valp ATTRIBUTE_UNUSED)
static int
Operand_ar4_encode (uint32 *valp)
{
- int error;
- error = (*valp & ~0x1f) != 0;
- return error;
+ return (*valp & ~0x1f) != 0;
}
static int
@@ -1887,9 +1877,7 @@ Operand_ar8_decode (uint32 *valp ATTRIBUTE_UNUSED)
static int
Operand_ar8_encode (uint32 *valp)
{
- int error;
- error = (*valp & ~0x1f) != 0;
- return error;
+ return (*valp & ~0x1f) != 0;
}
static int
@@ -1901,9 +1889,7 @@ Operand_ar12_decode (uint32 *valp ATTRIBUTE_UNUSED)
static int
Operand_ar12_encode (uint32 *valp)
{
- int error;
- error = (*valp & ~0x1f) != 0;
- return error;
+ return (*valp & ~0x1f) != 0;
}
static int
@@ -1915,9 +1901,7 @@ Operand_ars_entry_decode (uint32 *valp ATTRIBUTE_UNUSED)
static int
Operand_ars_entry_encode (uint32 *valp)
{
- int error;
- error = (*valp & ~0x1f) != 0;
- return error;
+ return (*valp & ~0x1f) != 0;
}
static int
@@ -2487,9 +2471,7 @@ Operand_mx_decode (uint32 *valp ATTRIBUTE_UNUSED)
static int
Operand_mx_encode (uint32 *valp)
{
- int error;
- error = (*valp & ~0x3) != 0;
- return error;
+ return (*valp & ~0x3) != 0;
}
static int
@@ -2517,9 +2499,7 @@ Operand_mw_decode (uint32 *valp ATTRIBUTE_UNUSED)
static int
Operand_mw_encode (uint32 *valp)
{
- int error;
- error = (*valp & ~0x3) != 0;
- return error;
+ return (*valp & ~0x3) != 0;
}
static int
@@ -2531,9 +2511,7 @@ Operand_mr0_decode (uint32 *valp ATTRIBUTE_UNUSED)
static int
Operand_mr0_encode (uint32 *valp)
{
- int error;
- error = (*valp & ~0x3) != 0;
- return error;
+ return (*valp & ~0x3) != 0;
}
static int
@@ -2545,9 +2523,7 @@ Operand_mr1_decode (uint32 *valp ATTRIBUTE_UNUSED)
static int
Operand_mr1_encode (uint32 *valp)
{
- int error;
- error = (*valp & ~0x3) != 0;
- return error;
+ return (*valp & ~0x3) != 0;
}
static int
@@ -2559,9 +2535,7 @@ Operand_mr2_decode (uint32 *valp ATTRIBUTE_UNUSED)
static int
Operand_mr2_encode (uint32 *valp)
{
- int error;
- error = (*valp & ~0x3) != 0;
- return error;
+ return (*valp & ~0x3) != 0;
}
static int
@@ -2573,9 +2547,7 @@ Operand_mr3_decode (uint32 *valp ATTRIBUTE_UNUSED)
static int
Operand_mr3_encode (uint32 *valp)
{
- int error;
- error = (*valp & ~0x3) != 0;
- return error;
+ return (*valp & ~0x3) != 0;
}
static int
diff --git a/target/xtensa/core-de212/xtensa-modules.inc.c b/target/xtensa/core-de212/xtensa-modules.inc.c
index ef7674de3a..480c68d3c6 100644
--- a/target/xtensa/core-de212/xtensa-modules.inc.c
+++ b/target/xtensa/core-de212/xtensa-modules.inc.c
@@ -1798,9 +1798,7 @@ OperandSem_opnd_sem_AR_decode (uint32 *valp ATTRIBUTE_UNUSED)
static int
OperandSem_opnd_sem_AR_encode (uint32 *valp)
{
- int error;
- error = (*valp >= 32);
- return error;
+ return (*valp >= 32);
}
static int
@@ -1812,9 +1810,7 @@ OperandSem_opnd_sem_AR_0_decode (uint32 *valp ATTRIBUTE_UNUSED)
static int
OperandSem_opnd_sem_AR_0_encode (uint32 *valp)
{
- int error;
- error = (*valp >= 32);
- return error;
+ return (*valp >= 32);
}
static int
@@ -1826,9 +1822,7 @@ OperandSem_opnd_sem_AR_1_decode (uint32 *valp ATTRIBUTE_UNUSED)
static int
OperandSem_opnd_sem_AR_1_encode (uint32 *valp)
{
- int error;
- error = (*valp >= 32);
- return error;
+ return (*valp >= 32);
}
static int
@@ -1840,9 +1834,7 @@ OperandSem_opnd_sem_AR_2_decode (uint32 *valp ATTRIBUTE_UNUSED)
static int
OperandSem_opnd_sem_AR_2_encode (uint32 *valp)
{
- int error;
- error = (*valp >= 32);
- return error;
+ return (*valp >= 32);
}
static int
@@ -1854,9 +1846,7 @@ OperandSem_opnd_sem_AR_3_decode (uint32 *valp ATTRIBUTE_UNUSED)
static int
OperandSem_opnd_sem_AR_3_encode (uint32 *valp)
{
- int error;
- error = (*valp >= 32);
- return error;
+ return (*valp >= 32);
}
static int
@@ -1868,9 +1858,7 @@ OperandSem_opnd_sem_AR_4_decode (uint32 *valp ATTRIBUTE_UNUSED)
static int
OperandSem_opnd_sem_AR_4_encode (uint32 *valp)
{
- int error;
- error = (*valp >= 32);
- return error;
+ return (*valp >= 32);
}
static int
@@ -2464,9 +2452,7 @@ OperandSem_opnd_sem_MR_decode (uint32 *valp ATTRIBUTE_UNUSED)
static int
OperandSem_opnd_sem_MR_encode (uint32 *valp)
{
- int error;
- error = (*valp >= 4);
- return error;
+ return (*valp >= 4);
}
static int
@@ -2478,9 +2464,7 @@ OperandSem_opnd_sem_MR_1_decode (uint32 *valp ATTRIBUTE_UNUSED)
static int
OperandSem_opnd_sem_MR_1_encode (uint32 *valp)
{
- int error;
- error = (*valp >= 4);
- return error;
+ return (*valp >= 4);
}
static int
@@ -2492,9 +2476,7 @@ OperandSem_opnd_sem_MR_2_decode (uint32 *valp ATTRIBUTE_UNUSED)
static int
OperandSem_opnd_sem_MR_2_encode (uint32 *valp)
{
- int error;
- error = (*valp >= 4);
- return error;
+ return (*valp >= 4);
}
static int
@@ -2506,9 +2488,7 @@ OperandSem_opnd_sem_MR_3_decode (uint32 *valp ATTRIBUTE_UNUSED)
static int
OperandSem_opnd_sem_MR_3_encode (uint32 *valp)
{
- int error;
- error = (*valp >= 4);
- return error;
+ return (*valp >= 4);
}
static int
@@ -2520,9 +2500,7 @@ OperandSem_opnd_sem_MR_4_decode (uint32 *valp ATTRIBUTE_UNUSED)
static int
OperandSem_opnd_sem_MR_4_encode (uint32 *valp)
{
- int error;
- error = (*valp >= 4);
- return error;
+ return (*valp >= 4);
}
static int
@@ -2534,9 +2512,7 @@ OperandSem_opnd_sem_MR_5_decode (uint32 *valp ATTRIBUTE_UNUSED)
static int
OperandSem_opnd_sem_MR_5_encode (uint32 *valp)
{
- int error;
- error = (*valp >= 4);
- return error;
+ return (*valp >= 4);
}
static int
diff --git a/target/xtensa/core-fsf/xtensa-modules.inc.c b/target/xtensa/core-fsf/xtensa-modules.inc.c
index f7de2dec15..c32683ff77 100644
--- a/target/xtensa/core-fsf/xtensa-modules.inc.c
+++ b/target/xtensa/core-fsf/xtensa-modules.inc.c
@@ -1379,9 +1379,7 @@ Operand_arr_decode (uint32 *valp ATTRIBUTE_UNUSED)
static int
Operand_arr_encode (uint32 *valp)
{
- int error;
- error = (*valp & ~0xf) != 0;
- return error;
+ return (*valp & ~0xf) != 0;
}
static int
@@ -1393,9 +1391,7 @@ Operand_ars_decode (uint32 *valp ATTRIBUTE_UNUSED)
static int
Operand_ars_encode (uint32 *valp)
{
- int error;
- error = (*valp & ~0xf) != 0;
- return error;
+ return (*valp & ~0xf) != 0;
}
static int
@@ -1407,9 +1403,7 @@ Operand_art_decode (uint32 *valp ATTRIBUTE_UNUSED)
static int
Operand_art_encode (uint32 *valp)
{
- int error;
- error = (*valp & ~0xf) != 0;
- return error;
+ return (*valp & ~0xf) != 0;
}
static int
@@ -1421,9 +1415,7 @@ Operand_ar0_decode (uint32 *valp ATTRIBUTE_UNUSED)
static int
Operand_ar0_encode (uint32 *valp)
{
- int error;
- error = (*valp & ~0x3f) != 0;
- return error;
+ return (*valp & ~0x3f) != 0;
}
static int
@@ -1435,9 +1427,7 @@ Operand_ar4_decode (uint32 *valp ATTRIBUTE_UNUSED)
static int
Operand_ar4_encode (uint32 *valp)
{
- int error;
- error = (*valp & ~0x3f) != 0;
- return error;
+ return (*valp & ~0x3f) != 0;
}
static int
@@ -1449,9 +1439,7 @@ Operand_ar8_decode (uint32 *valp ATTRIBUTE_UNUSED)
static int
Operand_ar8_encode (uint32 *valp)
{
- int error;
- error = (*valp & ~0x3f) != 0;
- return error;
+ return (*valp & ~0x3f) != 0;
}
static int
@@ -1463,9 +1451,7 @@ Operand_ar12_decode (uint32 *valp ATTRIBUTE_UNUSED)
static int
Operand_ar12_encode (uint32 *valp)
{
- int error;
- error = (*valp & ~0x3f) != 0;
- return error;
+ return (*valp & ~0x3f) != 0;
}
static int
@@ -1477,9 +1463,7 @@ Operand_ars_entry_decode (uint32 *valp ATTRIBUTE_UNUSED)
static int
Operand_ars_entry_encode (uint32 *valp)
{
- int error;
- error = (*valp & ~0x3f) != 0;
- return error;
+ return (*valp & ~0x3f) != 0;
}
static int
diff --git a/target/xtensa/core-sample_controller/xtensa-modules.inc.c b/target/xtensa/core-sample_controller/xtensa-modules.inc.c
index fba41b99ae..7e87d216bd 100644
--- a/target/xtensa/core-sample_controller/xtensa-modules.inc.c
+++ b/target/xtensa/core-sample_controller/xtensa-modules.inc.c
@@ -1570,9 +1570,7 @@ OperandSem_opnd_sem_AR_decode (uint32 *valp ATTRIBUTE_UNUSED)
static int
OperandSem_opnd_sem_AR_encode (uint32 *valp)
{
- int error;
- error = (*valp >= 32);
- return error;
+ return (*valp >= 32);
}
static int
@@ -1584,9 +1582,7 @@ OperandSem_opnd_sem_AR_0_decode (uint32 *valp ATTRIBUTE_UNUSED)
static int
OperandSem_opnd_sem_AR_0_encode (uint32 *valp)
{
- int error;
- error = (*valp >= 32);
- return error;
+ return (*valp >= 32);
}
static int
@@ -1598,9 +1594,7 @@ OperandSem_opnd_sem_AR_1_decode (uint32 *valp ATTRIBUTE_UNUSED)
static int
OperandSem_opnd_sem_AR_1_encode (uint32 *valp)
{
- int error;
- error = (*valp >= 32);
- return error;
+ return (*valp >= 32);
}
static int
@@ -1612,9 +1606,7 @@ OperandSem_opnd_sem_AR_2_decode (uint32 *valp ATTRIBUTE_UNUSED)
static int
OperandSem_opnd_sem_AR_2_encode (uint32 *valp)
{
- int error;
- error = (*valp >= 32);
- return error;
+ return (*valp >= 32);
}
static int
@@ -1626,9 +1618,7 @@ OperandSem_opnd_sem_AR_3_decode (uint32 *valp ATTRIBUTE_UNUSED)
static int
OperandSem_opnd_sem_AR_3_encode (uint32 *valp)
{
- int error;
- error = (*valp >= 32);
- return error;
+ return (*valp >= 32);
}
static int
@@ -1640,9 +1630,7 @@ OperandSem_opnd_sem_AR_4_decode (uint32 *valp ATTRIBUTE_UNUSED)
static int
OperandSem_opnd_sem_AR_4_encode (uint32 *valp)
{
- int error;
- error = (*valp >= 32);
- return error;
+ return (*valp >= 32);
}
static int
diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c
index 53f6f5db8f..720bc592e1 100644
--- a/target/xtensa/translate.c
+++ b/target/xtensa/translate.c
@@ -1272,11 +1272,8 @@ XtensaOpcodeOps *
xtensa_find_opcode_ops(const XtensaOpcodeTranslators *t,
const char *name)
{
- XtensaOpcodeOps *ops;
-
- ops = bsearch(name, t->opcode, t->num_opcodes,
- sizeof(XtensaOpcodeOps), compare_opcode_ops);
- return ops;
+ return bsearch(name, t->opcode, t->num_opcodes,
+ sizeof(XtensaOpcodeOps), compare_opcode_ops);
}
static void translate_abs(DisasContext *dc, const uint32_t arg[],