Advertisement
Guest User

Untitled

a guest
Apr 14th, 2022
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.75 KB | None | 0 0
  1.  
  2. unsigned char
  3. svp64_record_in1_opsel(const struct svp64_record *record)
  4. {
  5. static const unsigned char table[] = {
  6. UNUSED , /* SVP64_IN1SEL_NONE */
  7. RA , /* SVP64_IN1SEL_RA */
  8. RA , /* SVP64_IN1SEL_RA_OR_ZERO */
  9. SPR , /* SVP64_IN1SEL_SPR */
  10. RS , /* SVP64_IN1SEL_RS */
  11. FRA , /* SVP64_IN1SEL_FRA */
  12. FRS , /* SVP64_IN1SEL_FRS */
  13. };
  14.  
  15. return table[record->in1];
  16. }
  17.  
  18. unsigned char
  19. svp64_record_in2_opsel(const struct svp64_record *record)
  20. {
  21. static const unsigned char table[] = {
  22. UNUSED , /* SVP64_IN2SEL_NONE */
  23. RB , /* SVP64_IN2SEL_RB */
  24. UNUSED , /* SVP64_IN2SEL_CONST_UI */
  25. UNUSED , /* SVP64_IN2SEL_CONST_SI */
  26. UNUSED , /* SVP64_IN2SEL_CONST_UI_HI */
  27. UNUSED , /* SVP64_IN2SEL_CONST_SI_HI */
  28. UNUSED , /* SVP64_IN2SEL_CONST_LI */
  29. UNUSED , /* SVP64_IN2SEL_CONST_BD */
  30. UNUSED , /* SVP64_IN2SEL_CONST_DS */
  31. UNUSED , /* SVP64_IN2SEL_CONST_M1 */
  32. UNUSED , /* SVP64_IN2SEL_CONST_SH */
  33. UNUSED , /* SVP64_IN2SEL_CONST_SH32 */
  34. SPR , /* SVP64_IN2SEL_SPR */
  35. RS , /* SVP64_IN2SEL_RS */
  36. FRB , /* SVP64_IN2SEL_FRB */
  37. UNUSED , /* SVP64_IN2SEL_CONST_SVD */
  38. UNUSED , /* SVP64_IN2SEL_CONST_SVDS */
  39. UNUSED , /* SVP64_IN2SEL_CONST_XBI */
  40. };
  41.  
  42. return table[record->in2];
  43. }
  44.  
  45. unsigned char
  46. svp64_record_in3_opsel(const struct svp64_record *record)
  47. {
  48. static const unsigned char table[] = {
  49. UNUSED , /* SVP64_IN3SEL_NONE */
  50. RS , /* SVP64_IN3SEL_RS */
  51. RB , /* SVP64_IN3SEL_RB */
  52. FRS , /* SVP64_IN3SEL_FRS */
  53. FRC , /* SVP64_IN3SEL_FRC */
  54. RC , /* SVP64_IN3SEL_RC */
  55. RT , /* SVP64_IN3SEL_RT */
  56. };
  57.  
  58. return table[record->in3];
  59. }
  60.  
  61. unsigned char
  62. svp64_record_out_opsel(const struct svp64_record *record)
  63. {
  64. static const unsigned char table[] = {
  65. UNUSED , /* SVP64_OUTSEL_NONE */
  66. RT , /* SVP64_OUTSEL_RT */
  67. RA , /* SVP64_OUTSEL_RA */
  68. SPR , /* SVP64_OUTSEL_SPR */
  69. RT , /* SVP64_OUTSEL_RT_OR_ZERO */
  70. FRT , /* SVP64_OUTSEL_FRT */
  71. FRS , /* SVP64_OUTSEL_FRS */
  72. };
  73.  
  74. return table[record->out];
  75. }
  76.  
  77. unsigned char
  78. svp64_record_out2_opsel(const struct svp64_record *record)
  79. {
  80. static const unsigned char table[] = {
  81. UNUSED , /* SVP64_OUTSEL_NONE */
  82. RT , /* SVP64_OUTSEL_RT */
  83. RA , /* SVP64_OUTSEL_RA */
  84. SPR , /* SVP64_OUTSEL_SPR */
  85. RT , /* SVP64_OUTSEL_RT_OR_ZERO */
  86. FRT , /* SVP64_OUTSEL_FRT */
  87. FRS , /* SVP64_OUTSEL_FRS */
  88. };
  89.  
  90. return table[record->out2];
  91. }
  92.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement