OXIESEC PANEL
- Current Dir:
/
/
opt
/
golang
/
1.22.0
/
test
/
codegen
Server IP: 191.96.63.230
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
02/02/2024 06:09:55 PM
rwxr-xr-x
📄
README
5.21 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
addrcalc.go
324 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
alloc.go
902 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
arithmetic.go
14.15 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
bitfield.go
9.64 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
bits.go
7.71 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
bmi.go
4.21 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
bool.go
6.73 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
clobberdead.go
1.31 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
clobberdeadreg.go
1.29 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
compare_and_branch.go
4.5 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
comparisons.go
14.74 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
condmove.go
6.24 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
constants.go
1.11 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
copy.go
3.14 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
floats.go
3.27 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
fuse.go
4.79 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
ifaces.go
621 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
issue22703.go
5.43 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
issue25378.go
445 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
issue31618.go
504 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
issue33580.go
459 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
issue38554.go
355 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
issue42610.go
623 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
issue48054.go
464 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
issue52635.go
816 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
issue54467.go
949 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
issue56440.go
689 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
issue58166.go
554 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
issue60324.go
805 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
issue60673.go
360 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
issue61356.go
1.1 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
issue63332.go
264 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
logic.go
1.06 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
mapaccess.go
9.11 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
maps.go
3.64 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
math.go
6.14 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
mathbits.go
19.34 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
memcombine.go
29.38 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
memops.go
12.48 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
memops_bigoffset.go
2.5 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
noextend.go
5.39 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
race.go
651 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
regabi_regalloc.go
494 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
retpoline.go
580 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
rotate.go
5.29 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
select.go
373 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
shift.go
11.1 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
shortcircuit.go
368 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
slices.go
9.81 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
smallintiface.go
500 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
spectre.go
734 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
stack.go
2.83 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
strings.go
2.4 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
structs.go
923 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
switch.go
3.6 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
writebarrier.go
1.5 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
zerosize.go
650 bytes
02/02/2024 06:09:55 PM
rw-r--r--
Editing: condmove.go
Close
// asmcheck // Copyright 2018 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package codegen func cmovint(c int) int { x := c + 4 if x < 0 { x = 182 } // amd64:"CMOVQLT" // arm64:"CSEL\tLT" // ppc64x:"ISEL\t[$]0" // wasm:"Select" return x } func cmovchan(x, y chan int) chan int { if x != y { x = y } // amd64:"CMOVQNE" // arm64:"CSEL\tNE" // ppc64x:"ISEL\t[$]2" // wasm:"Select" return x } func cmovuintptr(x, y uintptr) uintptr { if x < y { x = -y } // amd64:"CMOVQ(HI|CS)" // arm64:"CSNEG\tLS" // ppc64x:"ISEL\t[$]1" // wasm:"Select" return x } func cmov32bit(x, y uint32) uint32 { if x < y { x = -y } // amd64:"CMOVL(HI|CS)" // arm64:"CSNEG\t(LS|HS)" // ppc64x:"ISEL\t[$]1" // wasm:"Select" return x } func cmov16bit(x, y uint16) uint16 { if x < y { x = -y } // amd64:"CMOVW(HI|CS)" // arm64:"CSNEG\t(LS|HS)" // ppc64x:"ISEL\t[$][01]" // wasm:"Select" return x } // Floating point comparison. For EQ/NE, we must // generate special code to handle NaNs. func cmovfloateq(x, y float64) int { a := 128 if x == y { a = 256 } // amd64:"CMOVQNE","CMOVQPC" // arm64:"CSEL\tEQ" // ppc64x:"ISEL\t[$]2" // wasm:"Select" return a } func cmovfloatne(x, y float64) int { a := 128 if x != y { a = 256 } // amd64:"CMOVQNE","CMOVQPS" // arm64:"CSEL\tNE" // ppc64x:"ISEL\t[$]2" // wasm:"Select" return a } //go:noinline func frexp(f float64) (frac float64, exp int) { return 1.0, 4 } //go:noinline func ldexp(frac float64, exp int) float64 { return 1.0 } // Generate a CMOV with a floating comparison and integer move. func cmovfloatint2(x, y float64) float64 { yfr, yexp := 4.0, 5 r := x for r >= y { rfr, rexp := frexp(r) if rfr < yfr { rexp = rexp - 1 } // amd64:"CMOVQHI" // arm64:"CSEL\tMI" // ppc64x:"ISEL\t[$]0" // wasm:"Select" r = r - ldexp(y, rexp-yexp) } return r } func cmovloaded(x [4]int, y int) int { if x[2] != 0 { y = x[2] } else { y = y >> 2 } // amd64:"CMOVQNE" // arm64:"CSEL\tNE" // ppc64x:"ISEL\t[$]2" // wasm:"Select" return y } func cmovuintptr2(x, y uintptr) uintptr { a := x * 2 if a == 0 { a = 256 } // amd64:"CMOVQEQ" // arm64:"CSEL\tEQ" // ppc64x:"ISEL\t[$]2" // wasm:"Select" return a } // Floating point CMOVs are not supported by amd64/arm64/ppc64x func cmovfloatmove(x, y int) float64 { a := 1.0 if x <= y { a = 2.0 } // amd64:-"CMOV" // arm64:-"CSEL" // ppc64x:-"ISEL" // wasm:-"Select" return a } // On amd64, the following patterns trigger comparison inversion. // Test that we correctly invert the CMOV condition var gsink int64 var gusink uint64 func cmovinvert1(x, y int64) int64 { if x < gsink { y = -y } // amd64:"CMOVQGT" return y } func cmovinvert2(x, y int64) int64 { if x <= gsink { y = -y } // amd64:"CMOVQGE" return y } func cmovinvert3(x, y int64) int64 { if x == gsink { y = -y } // amd64:"CMOVQEQ" return y } func cmovinvert4(x, y int64) int64 { if x != gsink { y = -y } // amd64:"CMOVQNE" return y } func cmovinvert5(x, y uint64) uint64 { if x > gusink { y = -y } // amd64:"CMOVQCS" return y } func cmovinvert6(x, y uint64) uint64 { if x >= gusink { y = -y } // amd64:"CMOVQLS" return y } func cmovload(a []int, i int, b bool) int { if b { i++ } // See issue 26306 // amd64:-"CMOVQNE" return a[i] } func cmovstore(a []int, i int, b bool) { if b { i++ } // amd64:"CMOVQNE" a[i] = 7 } var r0, r1, r2, r3, r4, r5 int func cmovinc(cond bool, a, b, c int) { var x0, x1 int if cond { x0 = a } else { x0 = b + 1 } // arm64:"CSINC\tNE", -"CSEL" r0 = x0 if cond { x1 = b + 1 } else { x1 = a } // arm64:"CSINC\tEQ", -"CSEL" r1 = x1 if cond { c++ } // arm64:"CSINC\tEQ", -"CSEL" r2 = c } func cmovinv(cond bool, a, b int) { var x0, x1 int if cond { x0 = a } else { x0 = ^b } // arm64:"CSINV\tNE", -"CSEL" r0 = x0 if cond { x1 = ^b } else { x1 = a } // arm64:"CSINV\tEQ", -"CSEL" r1 = x1 } func cmovneg(cond bool, a, b, c int) { var x0, x1 int if cond { x0 = a } else { x0 = -b } // arm64:"CSNEG\tNE", -"CSEL" r0 = x0 if cond { x1 = -b } else { x1 = a } // arm64:"CSNEG\tEQ", -"CSEL" r1 = x1 } func cmovsetm(cond bool, x int) { var x0, x1 int if cond { x0 = -1 } else { x0 = 0 } // arm64:"CSETM\tNE", -"CSEL" r0 = x0 if cond { x1 = 0 } else { x1 = -1 } // arm64:"CSETM\tEQ", -"CSEL" r1 = x1 } func cmovFcmp0(s, t float64, a, b int) { var x0, x1, x2, x3, x4, x5 int if s < t { x0 = a } else { x0 = b + 1 } // arm64:"CSINC\tMI", -"CSEL" r0 = x0 if s <= t { x1 = a } else { x1 = ^b } // arm64:"CSINV\tLS", -"CSEL" r1 = x1 if s > t { x2 = a } else { x2 = -b } // arm64:"CSNEG\tMI", -"CSEL" r2 = x2 if s >= t { x3 = -1 } else { x3 = 0 } // arm64:"CSETM\tLS", -"CSEL" r3 = x3 if s == t { x4 = a } else { x4 = b + 1 } // arm64:"CSINC\tEQ", -"CSEL" r4 = x4 if s != t { x5 = a } else { x5 = b + 1 } // arm64:"CSINC\tNE", -"CSEL" r5 = x5 } func cmovFcmp1(s, t float64, a, b int) { var x0, x1, x2, x3, x4, x5 int if s < t { x0 = b + 1 } else { x0 = a } // arm64:"CSINC\tPL", -"CSEL" r0 = x0 if s <= t { x1 = ^b } else { x1 = a } // arm64:"CSINV\tHI", -"CSEL" r1 = x1 if s > t { x2 = -b } else { x2 = a } // arm64:"CSNEG\tPL", -"CSEL" r2 = x2 if s >= t { x3 = 0 } else { x3 = -1 } // arm64:"CSETM\tHI", -"CSEL" r3 = x3 if s == t { x4 = b + 1 } else { x4 = a } // arm64:"CSINC\tNE", -"CSEL" r4 = x4 if s != t { x5 = b + 1 } else { x5 = a } // arm64:"CSINC\tEQ", -"CSEL" r5 = x5 } func cmovzero1(c bool) int { var x int if c { x = 182 } // loong64:"MASKEQZ", -"MASKNEZ" return x } func cmovzero2(c bool) int { var x int if !c { x = 182 } // loong64:"MASKNEZ", -"MASKEQZ" return x } // Conditionally selecting between a value or 0 can be done without // an extra load of 0 to a register on PPC64 by using R0 (which always // holds the value $0) instead. Verify both cases where either arg1 // or arg2 is zero. func cmovzeroreg0(a, b int) int { x := 0 if a == b { x = a } // ppc64x:"ISEL\t[$]2, R[0-9]+, R0, R[0-9]+" return x } func cmovzeroreg1(a, b int) int { x := a if a == b { x = 0 } // ppc64x:"ISEL\t[$]2, R0, R[0-9]+, R[0-9]+" return x }