diff --git a/travis/test/floattest.asm b/travis/test/floattest.asm new file mode 100644 index 00000000..dcaac2e1 --- /dev/null +++ b/travis/test/floattest.asm @@ -0,0 +1,26 @@ +; nasm -O99 -f elf32 floattest.asm +; ld -m elf_i386 -o floattest floattest.o -I/lib/ld-linux.so.2 -lc + + global _start + extern printf + + section .text +_start: + + fld qword [num1] + fadd qword [num2] + sub esp, 8 + fstp qword [esp] + push fmt + call printf + add esp, 4*3 + + mov eax, 1 + xor ebx, ebx + int 80h + + section .data +num1 dq 41.5 +num2 dq 0.5 + +fmt db "%f", 10, 0 diff --git a/travis/test/floattest.json b/travis/test/floattest.json new file mode 100644 index 00000000..99d11441 --- /dev/null +++ b/travis/test/floattest.json @@ -0,0 +1,12 @@ +[ + { + "description": "Test float in elf32", + "id": "floattest", + "format": "elf32", + "source": "floattest.asm", + "option": "-Ox", + "target": [ + { "output": "floattest.o" } + ] + } +] diff --git a/travis/test/floattest.o.t b/travis/test/floattest.o.t new file mode 100644 index 00000000..6510a2a0 Binary files /dev/null and b/travis/test/floattest.o.t differ