br3066383.asm 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. ;Testname=br3066383; Arguments=-Ox -fbin -obr3066383.bin; Files=stdout stderr br3066383.bin
  2. ;
  3. ; this is a for BR3005117
  4. ; http://sourceforge.net/tracker/?func=detail&aid=3005117&group_id=6208&atid=106208
  5. ;
  6. %macro b_struc 1-*
  7. %push foo
  8. %define %$strucname %1
  9. %%top_%$strucname:
  10. %rep %0 - 1
  11. %rotate 1
  12. resb %{$strucname}%1 - ($ - %%top_%$strucname)
  13. %1:
  14. %endrep
  15. resb %{$strucname}_size - ($ - %%top_%$strucname)
  16. %pop
  17. %endmacro
  18. struc timeval
  19. .tv_sec resd 1
  20. .tv_usec resd 1
  21. endstruc
  22. section .text
  23. mov [timeval_struct.tv_sec], eax
  24. section .bss
  25. timeval_struct b_struc timeval, .tv_sec, .tv_usec
  26. timeval_struct_len equ $ - timeval_struct
  27. section .text
  28. ;
  29. ; this is a test for BR3026808
  30. ; http://sourceforge.net/tracker/?func=detail&aid=3026808&group_id=6208&atid=106208
  31. ;
  32. %imacro proc 1
  33. %push proc
  34. %assign %$arg 1
  35. %endmacro
  36. %imacro arg 0-1 1
  37. %assign %$arg %1+%$arg
  38. %endmacro
  39. %imacro endproc 0
  40. %pop
  41. %endmacro
  42. proc Test
  43. %$ARG arg
  44. endproc
  45. ;
  46. ; this is a test for BR3066383
  47. ; http://sourceforge.net/tracker/?func=detail&aid=3066383&group_id=6208&atid=106208
  48. ;
  49. %macro pp_local 1
  50. %push
  51. %assign %$_uses 0
  52. %rep 4
  53. %assign %$_ur%$_uses %$_uses
  54. mov ecx, %$_ur%$_uses
  55. %assign %$_uses %$_uses+1
  56. %endrep
  57. %pop
  58. %endmacro
  59. pp_local 1