Skip to content

Commit 666cc79

Browse files
committed
tcg: Optimize inline dup_const for MO_64
Avoid the out-of-line function call for immediate MO_64. In addition, diagnose all invalid constants at compile-time. Reviewed-by: David Hildenbrand <[email protected]> Signed-off-by: Richard Henderson <[email protected]>
1 parent c52ea11 commit 666cc79

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

include/tcg/tcg.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1325,7 +1325,8 @@ uint64_t dup_const(unsigned vece, uint64_t c);
13251325
? ( (VECE) == MO_8 ? 0x0101010101010101ull * (uint8_t)(C) \
13261326
: (VECE) == MO_16 ? 0x0001000100010001ull * (uint16_t)(C) \
13271327
: (VECE) == MO_32 ? 0x0000000100000001ull * (uint32_t)(C) \
1328-
: dup_const(VECE, C)) \
1328+
: (VECE) == MO_64 ? (uint64_t)(C) \
1329+
: (qemu_build_not_reached_always(), 0)) \
13291330
: dup_const(VECE, C))
13301331

13311332

0 commit comments

Comments
 (0)