[PATCH] D28849: [compiler-rt] [test] Fix page address logic in clear_cache_test to use binary negation

2017-01-18 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. I wonder if we should take this a bit further. Use something like a `PAGE_SIZE` constant to avoid this confusion entirely. Furthremore, different targets could use different page sizes. IIRC, SPARC has a 8K page size by default. Repository: rL LLVM

[PATCH] D28849: [compiler-rt] [test] Fix page address logic in clear_cache_test to use binary negation

2017-01-18 Thread Michał Górny via Phabricator via cfe-commits
mgorny created this revision. Herald added a subscriber: dberris. Fix the logic used to calculate page address in clear_cache_test to use the binary negation of 4095 rather than arithmetic. The latter gives incorrect result since: -4095 -> 0xf001 ~4095 -> 0xf000 Alternatively, -4096