mirror of
https://github.com/netwide-assembler/nasm.git
synced 2024-12-15 09:09:58 +08:00
4402af0c59
Not all covered but still worth to put in Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
27 lines
504 B
NASM
27 lines
504 B
NASM
;Testname=br3005117; Arguments=-Ox -felf -obr3005117.o; Files=stdout stderr br3005117.o
|
|
|
|
%macro B_STRUC 1-*
|
|
%push foo
|
|
%define %$strucname %1
|
|
%%top_%$strucname:
|
|
%rep %0 - 1
|
|
%rotate 1
|
|
resb %{$strucname}%1 - ($ - %%top_%$strucname)
|
|
%1:
|
|
%endrep
|
|
resb %{$strucname}_size - ($ - %%top_%$strucname)
|
|
%pop
|
|
%endmacro
|
|
|
|
struc timeval
|
|
.tv_sec resd 1
|
|
.tv_usec resd 1
|
|
endstruc
|
|
|
|
mov [timeval_struct.tv_sec], eax
|
|
|
|
section .bss
|
|
|
|
timeval_struct B_STRUC timeval, .tv_sec, .tv_usec
|
|
timeval_struct_len equ $ - timeval_struct
|