diff options
author | Mariam Arutunian <mariamarutunian@gmail.com> | 2022-12-09 16:55:18 +0400 |
---|---|---|
committer | Jeff Law <jlaw@ventanamicro> | 2023-03-21 09:03:19 -0600 |
commit | 1c76a5f50d28e0ca91fef42884a5b9068a8ad61e (patch) | |
tree | b0ca40811c5a3268b146a9f6e2fb48f9e9d2b389 /gcc/symb-execute-all-paths.h | |
parent | df027ba3d8c790b05678f7c4a6f8c8f42efa08f3 (diff) | |
download | gcc-1c76a5f50d28e0ca91fef42884a5b9068a8ad61e.zip gcc-1c76a5f50d28e0ca91fef42884a5b9068a8ad61e.tar.gz gcc-1c76a5f50d28e0ca91fef42884a5b9068a8ad61e.tar.bz2 |
Added LFSR matching v1:
- Added functions to check whether LFSR and returned states match (it's not complete).
Changes in Traverse and execute CRC function v7:
- Pass correct tree to do_mem_ref function
Changes in Sym_exec v8:
- Added get_first_value () function in state class to get state's first value.
Diffstat (limited to 'gcc/symb-execute-all-paths.h')
-rw-r--r-- | gcc/symb-execute-all-paths.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/symb-execute-all-paths.h b/gcc/symb-execute-all-paths.h index 7177a3f..4d07498 100644 --- a/gcc/symb-execute-all-paths.h +++ b/gcc/symb-execute-all-paths.h @@ -94,7 +94,11 @@ class crc_symb_execution { to calculate the polynomial. */ bool execute_crc_loop (loop *, gphi *, gphi *, bool); + /* Returns true if the state matches the LFSR, otherwise - false. */ + bool state_matches_lfsr (const vec<value*> &, const vec<value*> &); + public: + /* Symbolically execute the function and keep final states. */ bool execute_function (function *); @@ -102,6 +106,9 @@ class crc_symb_execution { with concrete values. */ vec<value*> * extract_poly_and_create_lfsr (loop *, gphi *, gphi *, bool); + /* Returns true if all states match the LFSR, otherwise - false. */ + bool states_match_lfsr (vec<value*> *lfsr); + crc_symb_execution () { /* Reserve memory for the vectors of states. */ |