mirror of
https://github.com/frida/tinycc
synced 2025-01-01 17:44:26 +03:00
Optimize arithmetic with pointer to value on stack + constant
This commit is contained in:
parent
e263ee3cbf
commit
5a92536cea
5
tcc.c
5
tcc.c
@ -5596,8 +5596,9 @@ void gen_opic(int op)
|
||||
}
|
||||
goto general_case;
|
||||
} else if (c2 && (op == '+' || op == '-') &&
|
||||
(vtop[-1].r & (VT_VALMASK | VT_LVAL | VT_SYM)) ==
|
||||
(VT_CONST | VT_SYM)) {
|
||||
((vtop[-1].r & (VT_VALMASK | VT_LVAL | VT_SYM)) ==
|
||||
(VT_CONST | VT_SYM) ||
|
||||
(vtop[-1].r & (VT_VALMASK | VT_LVAL)) == VT_LOCAL)) {
|
||||
/* symbol + constant case */
|
||||
if (op == '-')
|
||||
l2 = -l2;
|
||||
|
Loading…
Reference in New Issue
Block a user