...

Source file src/cmd/compile/internal/ssa/rewrite386splitload.go

Documentation: cmd/compile/internal/ssa

     1  // Code generated from _gen/386splitload.rules using 'go generate'; DO NOT EDIT.
     2  
     3  package ssa
     4  
     5  func rewriteValue386splitload(v *Value) bool {
     6  	switch v.Op {
     7  	case Op386CMPBconstload:
     8  		return rewriteValue386splitload_Op386CMPBconstload(v)
     9  	case Op386CMPBload:
    10  		return rewriteValue386splitload_Op386CMPBload(v)
    11  	case Op386CMPLconstload:
    12  		return rewriteValue386splitload_Op386CMPLconstload(v)
    13  	case Op386CMPLload:
    14  		return rewriteValue386splitload_Op386CMPLload(v)
    15  	case Op386CMPWconstload:
    16  		return rewriteValue386splitload_Op386CMPWconstload(v)
    17  	case Op386CMPWload:
    18  		return rewriteValue386splitload_Op386CMPWload(v)
    19  	}
    20  	return false
    21  }
    22  func rewriteValue386splitload_Op386CMPBconstload(v *Value) bool {
    23  	v_1 := v.Args[1]
    24  	v_0 := v.Args[0]
    25  	b := v.Block
    26  	typ := &b.Func.Config.Types
    27  	// match: (CMPBconstload {sym} [vo] ptr mem)
    28  	// result: (CMPBconst (MOVBload {sym} [vo.Off()] ptr mem) [vo.Val8()])
    29  	for {
    30  		vo := auxIntToValAndOff(v.AuxInt)
    31  		sym := auxToSym(v.Aux)
    32  		ptr := v_0
    33  		mem := v_1
    34  		v.reset(Op386CMPBconst)
    35  		v.AuxInt = int8ToAuxInt(vo.Val8())
    36  		v0 := b.NewValue0(v.Pos, Op386MOVBload, typ.UInt8)
    37  		v0.AuxInt = int32ToAuxInt(vo.Off())
    38  		v0.Aux = symToAux(sym)
    39  		v0.AddArg2(ptr, mem)
    40  		v.AddArg(v0)
    41  		return true
    42  	}
    43  }
    44  func rewriteValue386splitload_Op386CMPBload(v *Value) bool {
    45  	v_2 := v.Args[2]
    46  	v_1 := v.Args[1]
    47  	v_0 := v.Args[0]
    48  	b := v.Block
    49  	typ := &b.Func.Config.Types
    50  	// match: (CMPBload {sym} [off] ptr x mem)
    51  	// result: (CMPB (MOVBload {sym} [off] ptr mem) x)
    52  	for {
    53  		off := auxIntToInt32(v.AuxInt)
    54  		sym := auxToSym(v.Aux)
    55  		ptr := v_0
    56  		x := v_1
    57  		mem := v_2
    58  		v.reset(Op386CMPB)
    59  		v0 := b.NewValue0(v.Pos, Op386MOVBload, typ.UInt8)
    60  		v0.AuxInt = int32ToAuxInt(off)
    61  		v0.Aux = symToAux(sym)
    62  		v0.AddArg2(ptr, mem)
    63  		v.AddArg2(v0, x)
    64  		return true
    65  	}
    66  }
    67  func rewriteValue386splitload_Op386CMPLconstload(v *Value) bool {
    68  	v_1 := v.Args[1]
    69  	v_0 := v.Args[0]
    70  	b := v.Block
    71  	typ := &b.Func.Config.Types
    72  	// match: (CMPLconstload {sym} [vo] ptr mem)
    73  	// result: (CMPLconst (MOVLload {sym} [vo.Off()] ptr mem) [vo.Val()])
    74  	for {
    75  		vo := auxIntToValAndOff(v.AuxInt)
    76  		sym := auxToSym(v.Aux)
    77  		ptr := v_0
    78  		mem := v_1
    79  		v.reset(Op386CMPLconst)
    80  		v.AuxInt = int32ToAuxInt(vo.Val())
    81  		v0 := b.NewValue0(v.Pos, Op386MOVLload, typ.UInt32)
    82  		v0.AuxInt = int32ToAuxInt(vo.Off())
    83  		v0.Aux = symToAux(sym)
    84  		v0.AddArg2(ptr, mem)
    85  		v.AddArg(v0)
    86  		return true
    87  	}
    88  }
    89  func rewriteValue386splitload_Op386CMPLload(v *Value) bool {
    90  	v_2 := v.Args[2]
    91  	v_1 := v.Args[1]
    92  	v_0 := v.Args[0]
    93  	b := v.Block
    94  	typ := &b.Func.Config.Types
    95  	// match: (CMPLload {sym} [off] ptr x mem)
    96  	// result: (CMPL (MOVLload {sym} [off] ptr mem) x)
    97  	for {
    98  		off := auxIntToInt32(v.AuxInt)
    99  		sym := auxToSym(v.Aux)
   100  		ptr := v_0
   101  		x := v_1
   102  		mem := v_2
   103  		v.reset(Op386CMPL)
   104  		v0 := b.NewValue0(v.Pos, Op386MOVLload, typ.UInt32)
   105  		v0.AuxInt = int32ToAuxInt(off)
   106  		v0.Aux = symToAux(sym)
   107  		v0.AddArg2(ptr, mem)
   108  		v.AddArg2(v0, x)
   109  		return true
   110  	}
   111  }
   112  func rewriteValue386splitload_Op386CMPWconstload(v *Value) bool {
   113  	v_1 := v.Args[1]
   114  	v_0 := v.Args[0]
   115  	b := v.Block
   116  	typ := &b.Func.Config.Types
   117  	// match: (CMPWconstload {sym} [vo] ptr mem)
   118  	// result: (CMPWconst (MOVWload {sym} [vo.Off()] ptr mem) [vo.Val16()])
   119  	for {
   120  		vo := auxIntToValAndOff(v.AuxInt)
   121  		sym := auxToSym(v.Aux)
   122  		ptr := v_0
   123  		mem := v_1
   124  		v.reset(Op386CMPWconst)
   125  		v.AuxInt = int16ToAuxInt(vo.Val16())
   126  		v0 := b.NewValue0(v.Pos, Op386MOVWload, typ.UInt16)
   127  		v0.AuxInt = int32ToAuxInt(vo.Off())
   128  		v0.Aux = symToAux(sym)
   129  		v0.AddArg2(ptr, mem)
   130  		v.AddArg(v0)
   131  		return true
   132  	}
   133  }
   134  func rewriteValue386splitload_Op386CMPWload(v *Value) bool {
   135  	v_2 := v.Args[2]
   136  	v_1 := v.Args[1]
   137  	v_0 := v.Args[0]
   138  	b := v.Block
   139  	typ := &b.Func.Config.Types
   140  	// match: (CMPWload {sym} [off] ptr x mem)
   141  	// result: (CMPW (MOVWload {sym} [off] ptr mem) x)
   142  	for {
   143  		off := auxIntToInt32(v.AuxInt)
   144  		sym := auxToSym(v.Aux)
   145  		ptr := v_0
   146  		x := v_1
   147  		mem := v_2
   148  		v.reset(Op386CMPW)
   149  		v0 := b.NewValue0(v.Pos, Op386MOVWload, typ.UInt16)
   150  		v0.AuxInt = int32ToAuxInt(off)
   151  		v0.Aux = symToAux(sym)
   152  		v0.AddArg2(ptr, mem)
   153  		v.AddArg2(v0, x)
   154  		return true
   155  	}
   156  }
   157  func rewriteBlock386splitload(b *Block) bool {
   158  	return false
   159  }
   160  

View as plain text