Say I have this:
Code: Select all
int a = (0.3f) * (1 << 12);
Thanks!!!
Code: Select all
int a = (0.3f) * (1 << 12);
Code: Select all
monalisa:test davem$ cat testconst.c
int testconst() {
int a = (0.3f) * (1<<12);
return a;
}
monalisa:test davem$ arm-eabi-gcc -c -O2 -march=armv5te -mtune=arm946e-s -mthumb -save-temps testconst.c
monalisa:test davem$ cat testconst.s
.arch armv5te
.fpu softvfp
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 1
.eabi_attribute 30, 2
.eabi_attribute 18, 4
.code 16
.file "testconst.c"
.text
.align 2
.global testconst
.code 16
.thumb_func
.type testconst, %function
testconst:
ldr r0, .L2
@ sp needed for prologue
bx lr
.L3:
.align 2
.L2:
.word 1228
.size testconst, .-testconst
Users browsing this forum: No registered users and 2 guests