diff options
Diffstat (limited to 'target-tricore/op_helper.c')
-rw-r--r-- | target-tricore/op_helper.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/target-tricore/op_helper.c b/target-tricore/op_helper.c index 9919b5b17b..7aa1f8e40e 100644 --- a/target-tricore/op_helper.c +++ b/target-tricore/op_helper.c @@ -19,6 +19,7 @@ #include "qemu/host-utils.h" #include "exec/helper-proto.h" #include "exec/cpu_ldst.h" +#include <zlib.h> /* for crc32 */ /* Addressing mode helper */ @@ -2165,6 +2166,16 @@ uint32_t helper_mulr_h(uint32_t arg00, uint32_t arg01, return (result1 & 0xffff0000) | (result0 >> 16); } +uint32_t helper_crc32(uint32_t arg0, uint32_t arg1) +{ + uint8_t buf[4]; + uint32_t ret; + stl_be_p(buf, arg0); + + ret = crc32(arg1, buf, 4); + return ret; +} + /* context save area (CSA) related helpers */ static int cdc_increment(target_ulong *psw) |