mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-11-23 20:33:05 +00:00
-flegacy-vector-maths, enabled by default
This commit is contained in:
parent
d7f4e981a3
commit
d12e6e15c9
3 changed files with 9 additions and 0 deletions
7
ir.c
7
ir.c
|
@ -600,6 +600,13 @@ bool ir_function_pass_peephole(ir_function *self)
|
|||
if (!instr_is_operation(oper->opcode))
|
||||
continue;
|
||||
|
||||
if (OPTS_FLAG(LEGACY_VECTOR_MATHS)) {
|
||||
if (oper->opcode == INSTR_MUL_VF && oper->_ops[2]->memberof == oper->_ops[1])
|
||||
continue;
|
||||
if (oper->opcode == INSTR_MUL_FV && oper->_ops[1]->memberof == oper->_ops[2])
|
||||
continue;
|
||||
}
|
||||
|
||||
value = oper->_ops[0];
|
||||
|
||||
/* only do it for SSA values */
|
||||
|
|
1
opts.c
1
opts.c
|
@ -66,6 +66,7 @@ static void opts_setdefault() {
|
|||
opts_set(opts.flags, FTEPP_PREDEFS, false);
|
||||
opts_set(opts.flags, CORRECT_TERNARY, true);
|
||||
opts_set(opts.flags, BAIL_ON_WERROR, true);
|
||||
opts_set(opts.flags, LEGACY_VECTOR_MATHS, true);
|
||||
}
|
||||
|
||||
void opts_backup_non_Wall() {
|
||||
|
|
1
opts.def
1
opts.def
|
@ -49,6 +49,7 @@
|
|||
GMQCC_DEFINE_FLAG(UNTYPED_NIL)
|
||||
GMQCC_DEFINE_FLAG(PERMISSIVE)
|
||||
GMQCC_DEFINE_FLAG(VARIADIC_ARGS)
|
||||
GMQCC_DEFINE_FLAG(LEGACY_VECTOR_MATHS)
|
||||
#endif
|
||||
|
||||
/* warning flags */
|
||||
|
|
Loading…
Reference in a new issue