| commit | 565c20fa81d1bbc56264c30331e2afdef5cc94d1 | [log] [tgz] |
|---|---|---|
| author | Maciej Żenczykowski <maze@google.com> | Sun Sep 03 15:56:15 2023 +0000 |
| committer | Maciej Żenczykowski <maze@google.com> | Sun Sep 03 16:04:33 2023 +0000 |
| tree | 4acd8c538dc782baa4f0fd1dfa03ee1efab5dd19 | |
| parent | f3cb92f1523b5261b93968a4e7d09f439908567f [diff] |
ApfGenerator - addAdd/Mul/Div use unsigned immediates See apf interpreter implementation: https://source.corp.google.com/h/android/platform/superproject/+/main:hardware/google/apf/apf_interpreter.c;l=219 & 222 & 225 which use 'imm' not 'signed_imm'. See also: http://cs/h/android/platform/superproject/+/main:hardware/google/apf/apf.h?l=146 where only LI, LDDW, STDW mention 'signed' or 'simm'. (and SH by mentioning -5 directly) addAdd - seems to only be called with non-negative values from non-test code, while the tests do use negatives, they only do so with 32-bit values at which point it no longer matters (there is likely a bug this fixes in Bpf2Apf.java, but I don't think we use it) addMul - only called from test with 2 addDiv - only called from test with 0 or 2 Bug: 298842151 Test: TreeHugger Signed-off-by: Maciej Żenczykowski <maze@google.com> Change-Id: Id641774b01bbbc9f4bbcbb0d232faabb745634b2