Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
1.8 KiB

  1. /*
  2. * Copyright (c) 2000, Intel Corporation
  3. * All rights reserved.
  4. *
  5. * WARRANTY DISCLAIMER
  6. *
  7. * THESE MATERIALS ARE PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  8. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  9. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  10. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS
  11. * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  12. * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  13. * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  14. * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
  15. * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING
  16. * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THESE
  17. * MATERIALS, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  18. *
  19. * Intel Corporation is the author of the Materials, and requests that all
  20. * problem reports or change requests be submitted to it directly at
  21. * http://developer.intel.com/opensource.
  22. */
  23. #ifndef _DECISION_TREE_H
  24. #define _DECISION_TREE_H
  25. typedef enum
  26. {
  27. EM_TEMP_ROLE_NONE = 0,
  28. EM_TEMP_ROLE_INT = EM_TEMP_ROLE_NONE,
  29. EM_TEMP_ROLE_MEM,
  30. EM_TEMP_ROLE_FP,
  31. EM_TEMP_ROLE_BR,
  32. EM_TEMP_ROLE_LONG,
  33. EM_TEMP_ROLE_LAST
  34. } Temp_role_t;
  35. typedef struct Node_s
  36. {
  37. unsigned short next_node;
  38. char pos;
  39. char size;
  40. } Node_t;
  41. #define GET_NODE_POS(node) \
  42. ((node).pos)
  43. #define GET_NODE_SIZE(node) \
  44. ((node).size)
  45. #define GET_NEXT_NODE_INDEX(node) \
  46. ((node).next_node)
  47. #define SQUARE(opcode, template_role) \
  48. (((opcode) * EM_TEMP_ROLE_LAST) + (template_role))
  49. #define NODE_IS_LEAF(node) \
  50. ((unsigned char)((node).pos) == 0xff)
  51. extern Node_t em_decision_tree[];
  52. #endif /*_DECISION_TREE_H*/