[PATCH] D28849: [compiler-rt] [test] Fix page address logic in clear_cache_test

2017-01-21 Thread Michał Górny via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL292729: [test] Fix page address logic in clear_cache_test (authored by mgorny). Changed prior to commit: https://reviews.llvm.org/D28849?vs=85208=85248#toc Repository: rL LLVM

[PATCH] D28849: [compiler-rt] [test] Fix page address logic in clear_cache_test

2017-01-21 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd accepted this revision. compnerd added a comment. This revision is now accepted and ready to land. Would be nice to clang-format those lines, but its no worse than before. https://reviews.llvm.org/D28849 ___ cfe-commits mailing list

[PATCH] D28849: [compiler-rt] [test] Fix page address logic in clear_cache_test

2017-01-20 Thread Michał Górny via Phabricator via cfe-commits
mgorny updated this revision to Diff 85208. mgorny marked an inline comment as done. mgorny added a comment. Fixed the missing change. Also created a local variable to avoid calling the sysconf three times. https://reviews.llvm.org/D28849 Files: test/builtins/Unit/clear_cache_test.c

[PATCH] D28849: [compiler-rt] [test] Fix page address logic in clear_cache_test

2017-01-19 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: test/builtins/Unit/clear_cache_test.c:71 +char* start = (char*)((uintptr_t)execution_buffer & (-get_page_size())); +char* end = (char*)((uintptr_t)(_buffer[128+4096]) & (-get_page_size())); #if defined(_WIN32)

[PATCH] D28849: [compiler-rt] [test] Fix page address logic in clear_cache_test

2017-01-19 Thread Michał Górny via Phabricator via cfe-commits
mgorny updated this revision to Diff 84947. mgorny retitled this revision from "[compiler-rt] [test] Fix page address logic in clear_cache_test to use binary negation" to "[compiler-rt] [test] Fix page address logic in clear_cache_test". mgorny edited the summary of this revision. mgorny added a

[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