github.com/cilium/ebpf@v0.16.0/asm/alu_string.go (about) 1 // Code generated by "stringer -output alu_string.go -type=Source,Endianness,ALUOp"; DO NOT EDIT. 2 3 package asm 4 5 import "strconv" 6 7 func _() { 8 // An "invalid array index" compiler error signifies that the constant values have changed. 9 // Re-run the stringer command to generate them again. 10 var x [1]struct{} 11 _ = x[InvalidSource-65535] 12 _ = x[ImmSource-0] 13 _ = x[RegSource-8] 14 } 15 16 const ( 17 _Source_name_0 = "ImmSource" 18 _Source_name_1 = "RegSource" 19 _Source_name_2 = "InvalidSource" 20 ) 21 22 func (i Source) String() string { 23 switch { 24 case i == 0: 25 return _Source_name_0 26 case i == 8: 27 return _Source_name_1 28 case i == 65535: 29 return _Source_name_2 30 default: 31 return "Source(" + strconv.FormatInt(int64(i), 10) + ")" 32 } 33 } 34 func _() { 35 // An "invalid array index" compiler error signifies that the constant values have changed. 36 // Re-run the stringer command to generate them again. 37 var x [1]struct{} 38 _ = x[InvalidEndian-255] 39 _ = x[LE-0] 40 _ = x[BE-8] 41 } 42 43 const ( 44 _Endianness_name_0 = "LE" 45 _Endianness_name_1 = "BE" 46 _Endianness_name_2 = "InvalidEndian" 47 ) 48 49 func (i Endianness) String() string { 50 switch { 51 case i == 0: 52 return _Endianness_name_0 53 case i == 8: 54 return _Endianness_name_1 55 case i == 255: 56 return _Endianness_name_2 57 default: 58 return "Endianness(" + strconv.FormatInt(int64(i), 10) + ")" 59 } 60 } 61 func _() { 62 // An "invalid array index" compiler error signifies that the constant values have changed. 63 // Re-run the stringer command to generate them again. 64 var x [1]struct{} 65 _ = x[InvalidALUOp-65535] 66 _ = x[Add-0] 67 _ = x[Sub-16] 68 _ = x[Mul-32] 69 _ = x[Div-48] 70 _ = x[SDiv-304] 71 _ = x[Or-64] 72 _ = x[And-80] 73 _ = x[LSh-96] 74 _ = x[RSh-112] 75 _ = x[Neg-128] 76 _ = x[Mod-144] 77 _ = x[SMod-400] 78 _ = x[Xor-160] 79 _ = x[Mov-176] 80 _ = x[MovSX8-432] 81 _ = x[MovSX16-688] 82 _ = x[MovSX32-944] 83 _ = x[ArSh-192] 84 _ = x[Swap-208] 85 } 86 87 const _ALUOp_name = "AddSubMulDivOrAndLShRShNegModXorMovArShSwapSDivSModMovSX8MovSX16MovSX32InvalidALUOp" 88 89 var _ALUOp_map = map[ALUOp]string{ 90 0: _ALUOp_name[0:3], 91 16: _ALUOp_name[3:6], 92 32: _ALUOp_name[6:9], 93 48: _ALUOp_name[9:12], 94 64: _ALUOp_name[12:14], 95 80: _ALUOp_name[14:17], 96 96: _ALUOp_name[17:20], 97 112: _ALUOp_name[20:23], 98 128: _ALUOp_name[23:26], 99 144: _ALUOp_name[26:29], 100 160: _ALUOp_name[29:32], 101 176: _ALUOp_name[32:35], 102 192: _ALUOp_name[35:39], 103 208: _ALUOp_name[39:43], 104 304: _ALUOp_name[43:47], 105 400: _ALUOp_name[47:51], 106 432: _ALUOp_name[51:57], 107 688: _ALUOp_name[57:64], 108 944: _ALUOp_name[64:71], 109 65535: _ALUOp_name[71:83], 110 } 111 112 func (i ALUOp) String() string { 113 if str, ok := _ALUOp_map[i]; ok { 114 return str 115 } 116 return "ALUOp(" + strconv.FormatInt(int64(i), 10) + ")" 117 }