square-x86.S.in 528 B

1234567891011121314151617181920212223242526272829303132333435
  1. #include "symbol-underscore.h"
  2. #ifdef _MSC_VER
  3. .386
  4. .MODEL FLAT, C
  5. PUBLIC square_unsigned
  6. _TEXT SEGMENT
  7. square_unsigned PROC var1:DWORD
  8. mov eax, var1
  9. imul eax, eax
  10. ret
  11. square_unsigned ENDP
  12. _TEXT ENDS
  13. END
  14. #else
  15. .text
  16. .globl SYMBOL_NAME(square_unsigned)
  17. /* Only supported with GAS */
  18. # if defined(__linux__) || defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__)
  19. .type square_unsigned,@function
  20. # endif
  21. SYMBOL_NAME(square_unsigned):
  22. movl 4(%esp), %eax
  23. imull %eax, %eax
  24. retl
  25. #endif