Printing floating point numbers from x86-64 seems to require %rbp to be saved
When I write a simple assembly language program, linked with the C library, using gcc 4.6.1 on Ubuntu, and I try to print an integer, it works fine: .global main .text main: mov $format, %rdi mov $5, %rsi mov $0, %rax call printf ret format: .asciz "%10d\n" This prints 5, as expected. But now if I make a small change, and try to print a floating point value: .global main .text main: mov $format, %rdi movsd x, %xmm0 mov $1, %rax call printf ret format: .asciz "%10.4f\n" x: .double 15.5 This program seg faults without printing anything . Just a sad segfault. But I can fix this by pushing and