In the following code, if I look at the ASM output seems to be using 32 bit ints not matter whether I use u_int64 or long long int.
It looks OK to me. Can you be more specific?
bit64 = bit64 + log((unsigned long long int) i);
That's a bit useless, since log() takes a double as the argument.
Here's what I get after a bit of editing, and adding comments...
00080148 <setup>:
void setup() {
unsigned long long int *a2;
int i;
;;; Prologue
80148: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr}
bit64 = 5000000000ULL;
;;; load a 64bit constant. Note the use of ldrd - a 64bit move.
8014c: a717 add r7, pc, #92 ; (adr r7, 801ac <setup+0x64>)
8014e: e9d7 6700 ldrd r6, r7, [r7]
for (i = 0; i < 10; i++) {
80152: 2400 movs r4, #0
80154: 2500 movs r5, #0
i64 = i;
bit64 = bit64 + log((unsigned long long int) i);
80156: 4620 mov r0, r4
80158: 4629 mov r1, r5
;;; __eaabi_ul2d is 64bit int to double float.
8015a: f002 f987 bl 8246c <__aeabi_ul2d>
8015e: f001 fd91 bl 81c84 <log>
80162: 4680 mov r8, r0
80164: 4689 mov r9, r1
80166: 4630 mov r0, r6
80168: 4639 mov r1, r7
8016a: f002 f97f bl 8246c <__aeabi_ul2d>
8016e: 4642 mov r2, r8
80170: 464b mov r3, r9
;;; Still dealing with doubles at this point, for the add/
80172: f001 ffff bl 82174 <__adddf3>
;;; convert double back to 64bit int
80176: f002 fc69 bl 82a4c <__aeabi_d2ulz>
bit64++;
;;; 64bit add - note use of two registers, and adc instruction
8017a: 1c46 adds r6, r0, #1
8017c: f141 0700 adc.w r7, r1, #0
;;; Um. Looks like the compiler has "optimized" the loop counter to 64bits too?
80180: 3401 adds r4, #1
80182: f145 0500 adc.w r5, r5, #0
80186: 2d00 cmp r5, #0
80188: bf08 it eq
8018a: 2c0a cmpeq r4, #10
8018c: d1e3 bne.n 80156 <setup+0xe>
}