From 36fcd9156ff452502aa58a423aba34e39014eb1e Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Sun, 4 Nov 2018 18:41:31 +0300 Subject: [PATCH] test: nasm-t -- Add floattest Signed-off-by: Cyrill Gorcunov --- travis/test/floattest.asm | 26 ++++++++++++++++++++++++++ travis/test/floattest.json | 12 ++++++++++++ travis/test/floattest.o.t | Bin 0 -> 736 bytes 3 files changed, 38 insertions(+) create mode 100644 travis/test/floattest.asm create mode 100644 travis/test/floattest.json create mode 100644 travis/test/floattest.o.t 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 0000000000000000000000000000000000000000..6510a2a0a57fddc35d62badaa612242d3d19d095 GIT binary patch literal 736 zcmbVKy-LGS82u7kTSY-o&_U6mVnIla=-^}rb@CnbiVZC^Rg$adWT7w6M{#uQ;OY}- z!O_7%cOjnB+)EPN{NT$u=ljjg&BO8OiQ_n8&5EF3#ibb-3LLDt$B^ zkQlS`wxDNh5I92J29R@DL#)EBjk!qP%8U&@tK-#Lo9jM)k|Y^C&polne|_l#G8-K= zQ}KSd8O&yJGEcYew0M_FEAirXtRt;1!0y8ojgDH~w6fU!N7-{RQIhW@Ur_uL_R0 d(z^+LK6WJtwH?E|b#QTf2jZf^6`+d?{snOlKx_a2 literal 0 HcmV?d00001