#include "simstruc.h"
#include <stdint.h>
-#include <malloc.h>
#ifndef WITHOUT_HW
#include "mf624_SIMULINK.h"
#endif /*WITHOUT_HW*/
- #ifdef __GNUC__
- #define my_popcount __builtin_popcount
- #else
- int my_popcount(uint32_t patt)
- {
- int pops = 0;
- while (patt) {
- if (patt & 1)
- pops++;
- patt >>= 1;
- }
- return pops;
+#ifdef __GNUC__
+ #include <alloca.h>
+ #define my_popcount __builtin_popcount
+#else
+ #include <malloc.h>
+ int my_popcount(uint32_t patt)
+ {
+ int pops = 0;
+ while (patt) {
+ if (patt & 1)
+ pops++;
+ patt >>= 1;
}
- #endif
+ return pops;
+ }
+#endif
/* Error handling