Eksperymenty z asemblerem ARMv7
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930
  1. #include <stdio.h>
  2. // Jan Potocki 2020
  3. unsigned long fibb(unsigned long n);
  4. unsigned long timestamp();
  5. int main()
  6. {
  7. unsigned long term, result;
  8. unsigned long tstamp1, tstamp2;
  9. scanf("%lu", &term);
  10. tstamp1 = timestamp();
  11. result = fibb(term);
  12. tstamp2 = timestamp();
  13. printf("%lu\n", result);
  14. if(tstamp2 > tstamp1)
  15. {
  16. printf("Cycles: %lu\n", tstamp2-tstamp1);
  17. }
  18. else
  19. {
  20. printf("Cycles: invalid measure\n");
  21. }
  22. return 0;
  23. }