gtsocial-umbx

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

alu_string.go (2375B)


      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-255]
     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 == 255:
     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-255]
     66 	_ = x[Add-0]
     67 	_ = x[Sub-16]
     68 	_ = x[Mul-32]
     69 	_ = x[Div-48]
     70 	_ = x[Or-64]
     71 	_ = x[And-80]
     72 	_ = x[LSh-96]
     73 	_ = x[RSh-112]
     74 	_ = x[Neg-128]
     75 	_ = x[Mod-144]
     76 	_ = x[Xor-160]
     77 	_ = x[Mov-176]
     78 	_ = x[ArSh-192]
     79 	_ = x[Swap-208]
     80 }
     81 
     82 const _ALUOp_name = "AddSubMulDivOrAndLShRShNegModXorMovArShSwapInvalidALUOp"
     83 
     84 var _ALUOp_map = map[ALUOp]string{
     85 	0:   _ALUOp_name[0:3],
     86 	16:  _ALUOp_name[3:6],
     87 	32:  _ALUOp_name[6:9],
     88 	48:  _ALUOp_name[9:12],
     89 	64:  _ALUOp_name[12:14],
     90 	80:  _ALUOp_name[14:17],
     91 	96:  _ALUOp_name[17:20],
     92 	112: _ALUOp_name[20:23],
     93 	128: _ALUOp_name[23:26],
     94 	144: _ALUOp_name[26:29],
     95 	160: _ALUOp_name[29:32],
     96 	176: _ALUOp_name[32:35],
     97 	192: _ALUOp_name[35:39],
     98 	208: _ALUOp_name[39:43],
     99 	255: _ALUOp_name[43:55],
    100 }
    101 
    102 func (i ALUOp) String() string {
    103 	if str, ok := _ALUOp_map[i]; ok {
    104 		return str
    105 	}
    106 	return "ALUOp(" + strconv.FormatInt(int64(i), 10) + ")"
    107 }