mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-18 16:53:50 +08:00
sim: riscv: fix building on 32-bit hosts w/out int128
Check for __SIZEOF_INT128__ before trying to use the builtin type. This fixes building on some 32-bit systems like x86.
This commit is contained in:
@ -1,3 +1,7 @@
|
||||
2021-05-01 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* sim-main.c (mulhu): Check if __SIZEOF_INT128__ is defined.
|
||||
|
||||
2021-04-26 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* sim-main.c (MAX, MIN): Delete.
|
||||
|
@ -603,7 +603,7 @@ execute_i (SIM_CPU *cpu, unsigned_word iw, const struct riscv_opcode *op)
|
||||
static unsigned64
|
||||
mulhu (unsigned64 a, unsigned64 b)
|
||||
{
|
||||
#ifdef __GNUC__
|
||||
#if defined(__GNUC__) && defined(__SIZEOF_INT128__)
|
||||
return ((__int128)a * b) >> 64;
|
||||
#else
|
||||
uint64_t t;
|
||||
|
Reference in New Issue
Block a user