mvp_compiler.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * Linux 2.6.32 and later Kernel module for VMware MVP Hypervisor Support
  3. *
  4. * Copyright (C) 2010-2013 VMware, Inc. All rights reserved.
  5. *
  6. * This program is free software; you can redistribute it and/or modify it
  7. * under the terms of the GNU General Public License version 2 as published by
  8. * the Free Software Foundation.
  9. *
  10. * This program is distributed in the hope that it will be useful, but WITHOUT
  11. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  13. * more details.
  14. *
  15. * You should have received a copy of the GNU General Public License along with
  16. * this program; see the file COPYING. If not, write to the Free Software
  17. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  18. */
  19. #line 5
  20. /**
  21. * @file
  22. *
  23. * @brief Compiler-related definitions and directives.
  24. */
  25. #ifndef _MVP_COMPILER_H_
  26. #define _MVP_COMPILER_H_
  27. #define INCLUDE_ALLOW_MVPD
  28. #define INCLUDE_ALLOW_VMX
  29. #define INCLUDE_ALLOW_MODULE
  30. #define INCLUDE_ALLOW_MONITOR
  31. #define INCLUDE_ALLOW_PV
  32. #define INCLUDE_ALLOW_HOSTUSER
  33. #define INCLUDE_ALLOW_GUESTUSER
  34. #define INCLUDE_ALLOW_WORKSTATION
  35. #define INCLUDE_ALLOW_GPL
  36. #include "include_check.h"
  37. #ifdef __GNUC__
  38. #include "mvp_compiler_gcc.h"
  39. #else /* __GNUC__ */
  40. #include "mvp_compiler_other.h"
  41. #endif /* __GNUC__ */
  42. /**
  43. * @brief Find last set bit.
  44. *
  45. * @param n unsigned 32-bit integer.
  46. *
  47. * @return 0 if n == 0 otherwise 32 - the number of leading zeroes in n.
  48. */
  49. #define FLS(n) (32 - CLZ(n))
  50. #endif /* ifndef _MVP_COMPILER_H_ */