test: nasm-t -- Add floattest

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
Cyrill Gorcunov 2018-11-04 18:41:31 +03:00
parent cd22ea42c3
commit 36fcd9156f
3 changed files with 38 additions and 0 deletions

26
travis/test/floattest.asm Normal file
View File

@ -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

View File

@ -0,0 +1,12 @@
[
{
"description": "Test float in elf32",
"id": "floattest",
"format": "elf32",
"source": "floattest.asm",
"option": "-Ox",
"target": [
{ "output": "floattest.o" }
]
}
]

BIN
travis/test/floattest.o.t Normal file

Binary file not shown.