View difference between Paste ID: jc5SHR9y and D8Q8yYJs
SHOW: | | - or go back to the newest paste.
1-
#include <stdio.h>
1+
        .arch armv6
2-
2+
        .eabi_attribute 27, 3
3-
int main()
3+
        .eabi_attribute 28, 1
4-
{
4+
        .fpu vfp
5-
    float x, y;
5+
        .eabi_attribute 20, 1
6-
    int z;
6+
        .eabi_attribute 21, 1
7-
    
7+
        .eabi_attribute 23, 3
8-
    x = 4.0f;
8+
        .eabi_attribute 24, 1
9-
    y = 2.0f;
9+
        .eabi_attribute 25, 1
10-
    z = (int)(x/y);
10+
        .eabi_attribute 26, 2
11-
    printf("%d\n", z);
11+
        .eabi_attribute 30, 6
12-
}
12+
        .eabi_attribute 18, 4
13
        .file   "hfpt.c"
14
        .section        .rodata
15
        .align  2
16
.LC0:
17
        .ascii  "%d\012\000"
18
        .text
19
        .align  2
20
        .global main
21
        .type   main, %function
22
main:
23
        @ args = 0, pretend = 0, frame = 16
24
        @ frame_needed = 1, uses_anonymous_args = 0
25
        stmfd   sp!, {fp, lr}
26
        add     fp, sp, #4
27
        sub     sp, sp, #16
28
        ldr     r3, .L2 @ float
29
        str     r3, [fp, #-8]   @ float
30
        ldr     r3, .L2+4       @ float
31
        str     r3, [fp, #-12]  @ float
32
        flds    s14, [fp, #-8]
33
        flds    s15, [fp, #-12]
34
        fdivs   s15, s14, s15
35
        ftosizs s15, s15
36
        fmrs    r3, s15 @ int
37
        str     r3, [fp, #-16]
38
        ldr     r3, .L2+8
39
        mov     r0, r3
40
        ldr     r1, [fp, #-16]
41
        bl      printf
42
        mov     r0, r3
43
        sub     sp, fp, #4
44
        ldmfd   sp!, {fp, pc}
45
.L3:
46
        .align  2
47
.L2:
48
        .word   1082130432
49
        .word   1073741824
50
        .word   .LC0
51
        .size   main, .-main
52
        .ident  "GCC: (Debian 4.6.3-8+rpi1) 4.6.3"
53
        .section        .note.GNU-stack,"",%progbits