ridiculousfish / libdivide

Official git repository for libdivide: optimized integer division
http://libdivide.com
Other
1.1k stars 79 forks source link

AVR support #69

Closed adbancroft closed 3 years ago

adbancroft commented 3 years ago

Support AVR platform (a.k.a. Arduino). E.g. ATMega2560

Tested on an AtMega2560: [u]int[32|64]_t, branchfull & branchfree

adbancroft commented 3 years ago

Do you have any advice on testing this, without needing to install on real hardware? I would like a way to test, I'm worried that I will inadvertently break it in the future.

I'm working on making DivideTest into an AVR program - future PR. Might be possible to run via a simulator - watch this space,

adbancroft commented 3 years ago

One other note: when compiling for AVR, LIBDIVIDE_ERROR & LIBDIVIDE_ASSERT resolve to nothing. On an embedded device, I haven't found a widely used pattern for assertions & error messages take up space. This could be improved I think - maybe later

ridiculousfish commented 3 years ago

Thank you!!