...
1
2
3 package ssa
4
5 import "internal/buildcfg"
6
7 func rewriteValueAMD64latelower(v *Value) bool {
8 switch v.Op {
9 case OpAMD64MOVBQZX:
10 return rewriteValueAMD64latelower_OpAMD64MOVBQZX(v)
11 case OpAMD64MOVLQZX:
12 return rewriteValueAMD64latelower_OpAMD64MOVLQZX(v)
13 case OpAMD64MOVWQZX:
14 return rewriteValueAMD64latelower_OpAMD64MOVWQZX(v)
15 case OpAMD64SARL:
16 return rewriteValueAMD64latelower_OpAMD64SARL(v)
17 case OpAMD64SARQ:
18 return rewriteValueAMD64latelower_OpAMD64SARQ(v)
19 case OpAMD64SHLL:
20 return rewriteValueAMD64latelower_OpAMD64SHLL(v)
21 case OpAMD64SHLQ:
22 return rewriteValueAMD64latelower_OpAMD64SHLQ(v)
23 case OpAMD64SHRL:
24 return rewriteValueAMD64latelower_OpAMD64SHRL(v)
25 case OpAMD64SHRQ:
26 return rewriteValueAMD64latelower_OpAMD64SHRQ(v)
27 }
28 return false
29 }
30 func rewriteValueAMD64latelower_OpAMD64MOVBQZX(v *Value) bool {
31 v_0 := v.Args[0]
32
33
34
35 for {
36 x := v_0
37 if !(zeroUpper56Bits(x, 3)) {
38 break
39 }
40 v.copyOf(x)
41 return true
42 }
43 return false
44 }
45 func rewriteValueAMD64latelower_OpAMD64MOVLQZX(v *Value) bool {
46 v_0 := v.Args[0]
47
48
49
50 for {
51 x := v_0
52 if !(zeroUpper32Bits(x, 3)) {
53 break
54 }
55 v.copyOf(x)
56 return true
57 }
58 return false
59 }
60 func rewriteValueAMD64latelower_OpAMD64MOVWQZX(v *Value) bool {
61 v_0 := v.Args[0]
62
63
64
65 for {
66 x := v_0
67 if !(zeroUpper48Bits(x, 3)) {
68 break
69 }
70 v.copyOf(x)
71 return true
72 }
73 return false
74 }
75 func rewriteValueAMD64latelower_OpAMD64SARL(v *Value) bool {
76 v_1 := v.Args[1]
77 v_0 := v.Args[0]
78
79
80
81 for {
82 x := v_0
83 y := v_1
84 if !(buildcfg.GOAMD64 >= 3) {
85 break
86 }
87 v.reset(OpAMD64SARXL)
88 v.AddArg2(x, y)
89 return true
90 }
91 return false
92 }
93 func rewriteValueAMD64latelower_OpAMD64SARQ(v *Value) bool {
94 v_1 := v.Args[1]
95 v_0 := v.Args[0]
96
97
98
99 for {
100 x := v_0
101 y := v_1
102 if !(buildcfg.GOAMD64 >= 3) {
103 break
104 }
105 v.reset(OpAMD64SARXQ)
106 v.AddArg2(x, y)
107 return true
108 }
109 return false
110 }
111 func rewriteValueAMD64latelower_OpAMD64SHLL(v *Value) bool {
112 v_1 := v.Args[1]
113 v_0 := v.Args[0]
114
115
116
117 for {
118 x := v_0
119 y := v_1
120 if !(buildcfg.GOAMD64 >= 3) {
121 break
122 }
123 v.reset(OpAMD64SHLXL)
124 v.AddArg2(x, y)
125 return true
126 }
127 return false
128 }
129 func rewriteValueAMD64latelower_OpAMD64SHLQ(v *Value) bool {
130 v_1 := v.Args[1]
131 v_0 := v.Args[0]
132
133
134
135 for {
136 x := v_0
137 y := v_1
138 if !(buildcfg.GOAMD64 >= 3) {
139 break
140 }
141 v.reset(OpAMD64SHLXQ)
142 v.AddArg2(x, y)
143 return true
144 }
145 return false
146 }
147 func rewriteValueAMD64latelower_OpAMD64SHRL(v *Value) bool {
148 v_1 := v.Args[1]
149 v_0 := v.Args[0]
150
151
152
153 for {
154 x := v_0
155 y := v_1
156 if !(buildcfg.GOAMD64 >= 3) {
157 break
158 }
159 v.reset(OpAMD64SHRXL)
160 v.AddArg2(x, y)
161 return true
162 }
163 return false
164 }
165 func rewriteValueAMD64latelower_OpAMD64SHRQ(v *Value) bool {
166 v_1 := v.Args[1]
167 v_0 := v.Args[0]
168
169
170
171 for {
172 x := v_0
173 y := v_1
174 if !(buildcfg.GOAMD64 >= 3) {
175 break
176 }
177 v.reset(OpAMD64SHRXQ)
178 v.AddArg2(x, y)
179 return true
180 }
181 return false
182 }
183 func rewriteBlockAMD64latelower(b *Block) bool {
184 return false
185 }
186
View as plain text