github.com/cilium/ebpf@v0.15.1-0.20240517100537-8079b37aa138/asm/load_store_string.go (about) 1 // Code generated by "stringer -output load_store_string.go -type=Mode,Size"; 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[InvalidMode-255] 12 _ = x[ImmMode-0] 13 _ = x[AbsMode-32] 14 _ = x[IndMode-64] 15 _ = x[MemMode-96] 16 _ = x[MemSXMode-128] 17 _ = x[XAddMode-192] 18 } 19 20 const ( 21 _Mode_name_0 = "ImmMode" 22 _Mode_name_1 = "AbsMode" 23 _Mode_name_2 = "IndMode" 24 _Mode_name_3 = "MemMode" 25 _Mode_name_4 = "MemSXMode" 26 _Mode_name_5 = "XAddMode" 27 _Mode_name_6 = "InvalidMode" 28 ) 29 30 func (i Mode) String() string { 31 switch { 32 case i == 0: 33 return _Mode_name_0 34 case i == 32: 35 return _Mode_name_1 36 case i == 64: 37 return _Mode_name_2 38 case i == 96: 39 return _Mode_name_3 40 case i == 128: 41 return _Mode_name_4 42 case i == 192: 43 return _Mode_name_5 44 case i == 255: 45 return _Mode_name_6 46 default: 47 return "Mode(" + strconv.FormatInt(int64(i), 10) + ")" 48 } 49 } 50 func _() { 51 // An "invalid array index" compiler error signifies that the constant values have changed. 52 // Re-run the stringer command to generate them again. 53 var x [1]struct{} 54 _ = x[InvalidSize-255] 55 _ = x[DWord-24] 56 _ = x[Word-0] 57 _ = x[Half-8] 58 _ = x[Byte-16] 59 } 60 61 const ( 62 _Size_name_0 = "Word" 63 _Size_name_1 = "Half" 64 _Size_name_2 = "Byte" 65 _Size_name_3 = "DWord" 66 _Size_name_4 = "InvalidSize" 67 ) 68 69 func (i Size) String() string { 70 switch { 71 case i == 0: 72 return _Size_name_0 73 case i == 8: 74 return _Size_name_1 75 case i == 16: 76 return _Size_name_2 77 case i == 24: 78 return _Size_name_3 79 case i == 255: 80 return _Size_name_4 81 default: 82 return "Size(" + strconv.FormatInt(int64(i), 10) + ")" 83 } 84 }