tcg: Prohibit incomplete extr[lh]_i64_i32() implementation
PATCH 1/1 tcg: Prohibit incomplete extr[lh]_i64_i32() implementation
extrl_i64_i32() and extrh_i64_i32() work in pair. Backends can not implement one without the other. Enforce that assumption.
Signed-off-by Philippe Mathieu-Daudé <[email protected]>
--- include/tcg/tcg.h | 3 +++ 1 file changed, 3 insertions(+)
include/tcg/tcg.h +3 -0
@@ -172,6 +172,9 @@ typedef uint64_t TCGRegSet;#define TCG_TARGET_HAS_v256 0#endif +QEMU_BUILD_BUG_MSG (TCG_TARGET_HAS_extrl_i64_i32 != TCG_TARGET_HAS_extrh_i64_i32, +"Both extrl_i64_i32()/extrh_i64_i32() must exist" ); + typedef enum TCGOpcode { #define DEF(name, oargs, iargs, cargs, flags) INDEX_op_ ## name,#include "tcg/tcg-opc.h"
Signature · 1 line
2.41.0
Quoted 14 lines · Philippe Mathieu-Daudé
extrl_i64_i32()andextrh_i64_i32()work in pair. Backends can not implement one without the other. Enforce that assumption.Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- include/tcg/tcg.h | 3 +++ 1 file changed, 3 insertions(+)include/tcg/tcg.h +0
-0
include/tcg/tcg.h typedef uint64_t TCGRegSet; · line 176
Quoted 5 lines
include/tcg/tcg.h +2
-0@@ -172,6 +172,9 @@ typedef uint64_t TCGRegSet;#define TCG_TARGET_HAS_v256 0#endif +QEMU_BUILD_BUG_MSG (TCG_TARGET_HAS_extrl_i64_i32 != TCG_TARGET_HAS_extrh_i64_i32, +"Both extrl_i64_i32()/extrh_i64_i32() must exist" );
Just rename them so they're the same symbol.
r~