seL4 / capdl

Capability Distribution Language tools for seL4
https://sel4.systems
35 stars 45 forks source link

capdl-loader-app: Suppress rv32 overflow warning #25

Closed kent-mcleod closed 3 years ago

kent-mcleod commented 3 years ago

The compiler can't tell that some code is dead under rv32 and emits a -Wshift-count-overflow warning. Use the preprocessor to remove the unused code when the page table hierarchy won't use it.

Fixes: https://github.com/seL4/capdl/issues/24

kent-mcleod commented 3 years ago

@ssrg-bamboo test

axel-h commented 3 years ago

I wonder if it might make sense to merge the different functions into on. At a brief look, the seem quite similar and a few define in there might keep the other code cleaner.

kent-mcleod commented 3 years ago

I wonder if it might make sense to merge the different functions into on. At a brief look, the seem quite similar and a few define in there might keep the other code cleaner.

I'm not sure whether this implementation is currently looking for cleanup/refactorings. I believe there is an ongoing project that is translating this loader to one implemented in CakeML. For now I'm going to merge this in order to suppress the warnings you identified in #24.