mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-25 05:01:24 +00:00
[qfcc] Use the ruamoko test_expr for spirv
The two back-ends are mostly compatible for bools (just lbool is a minor problem) so reusing the code makes sense.
This commit is contained in:
parent
1e88fec72c
commit
93991ce30d
3 changed files with 5 additions and 8 deletions
|
@ -71,5 +71,6 @@ const expr_t *ruamoko_proc_switch (const expr_t *expr, rua_ctx_t *ctx);
|
||||||
const expr_t *ruamoko_proc_caselabel (const expr_t *expr, rua_ctx_t *ctx);
|
const expr_t *ruamoko_proc_caselabel (const expr_t *expr, rua_ctx_t *ctx);
|
||||||
const expr_t *ruamoko_field_array (const expr_t *e);
|
const expr_t *ruamoko_field_array (const expr_t *e);
|
||||||
const expr_t *ruamoko_proc_address (const expr_t *expr, rua_ctx_t *ctx);
|
const expr_t *ruamoko_proc_address (const expr_t *expr, rua_ctx_t *ctx);
|
||||||
|
const expr_t *ruamoko_test_expr (const expr_t *expr);
|
||||||
|
|
||||||
#endif//__target_h
|
#endif//__target_h
|
||||||
|
|
|
@ -407,7 +407,7 @@ ruamoko_shift_op (int op, const expr_t *e1, const expr_t *e2)
|
||||||
return fold_constants (e);
|
return fold_constants (e);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const expr_t *
|
const expr_t *
|
||||||
ruamoko_test_expr (const expr_t *expr)
|
ruamoko_test_expr (const expr_t *expr)
|
||||||
{
|
{
|
||||||
scoped_src_loc (expr);
|
scoped_src_loc (expr);
|
||||||
|
|
|
@ -2241,12 +2241,6 @@ spirv_shift_op (int op, const expr_t *e1, const expr_t *e2)
|
||||||
return fold_constants (e);
|
return fold_constants (e);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const expr_t *
|
|
||||||
spirv_test_expr (const expr_t *expr)
|
|
||||||
{
|
|
||||||
return error (expr, "not implemented");
|
|
||||||
}
|
|
||||||
|
|
||||||
target_t spirv_target = {
|
target_t spirv_target = {
|
||||||
.value_too_large = spirv_value_too_large,
|
.value_too_large = spirv_value_too_large,
|
||||||
.build_scope = spirv_build_scope,
|
.build_scope = spirv_build_scope,
|
||||||
|
@ -2257,5 +2251,7 @@ target_t spirv_target = {
|
||||||
.setup_intrinsic_symtab = spirv_setup_intrinsic_symtab,
|
.setup_intrinsic_symtab = spirv_setup_intrinsic_symtab,
|
||||||
.vector_compare = spirv_vector_compare,
|
.vector_compare = spirv_vector_compare,
|
||||||
.shift_op = spirv_shift_op,
|
.shift_op = spirv_shift_op,
|
||||||
.test_expr = spirv_test_expr,
|
// ruamoko and spirv are mostly compatible for bools other than lbool
|
||||||
|
// but that's handled by spirv_mirror_bool
|
||||||
|
.test_expr = ruamoko_test_expr,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue