github.com/gagliardetto/golang-go@v0.0.0-20201020153340-53909ea70814/cmd/compile/internal/ssa/rewrite386splitload.go (about)

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