OXIESEC PANEL
- Current Dir:
/
/
opt
/
golang
/
1.19.4
/
test
/
codegen
Server IP: 2a02:4780:11:1084:0:327f:3464:10
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
12/01/2022 06:13:56 PM
rwxr-xr-x
📄
README
5.21 KB
12/01/2022 06:13:01 PM
rw-r--r--
📄
addrcalc.go
324 bytes
12/01/2022 06:13:01 PM
rw-r--r--
📄
alloc.go
902 bytes
12/01/2022 06:13:01 PM
rw-r--r--
📄
arithmetic.go
14.63 KB
12/01/2022 06:13:01 PM
rw-r--r--
📄
bitfield.go
9.64 KB
12/01/2022 06:13:01 PM
rw-r--r--
📄
bits.go
5.95 KB
12/01/2022 06:13:01 PM
rw-r--r--
📄
bmi.go
2.19 KB
12/01/2022 06:13:01 PM
rw-r--r--
📄
bool.go
705 bytes
12/01/2022 06:13:01 PM
rw-r--r--
📄
clobberdead.go
1.31 KB
12/01/2022 06:13:01 PM
rw-r--r--
📄
clobberdeadreg.go
1.29 KB
12/01/2022 06:13:01 PM
rw-r--r--
📄
compare_and_branch.go
3.79 KB
12/01/2022 06:13:01 PM
rw-r--r--
📄
comparisons.go
11.79 KB
12/01/2022 06:13:01 PM
rw-r--r--
📄
condmove.go
5.3 KB
12/01/2022 06:13:01 PM
rw-r--r--
📄
copy.go
3.36 KB
12/01/2022 06:13:01 PM
rw-r--r--
📄
floats.go
3.21 KB
12/01/2022 06:13:01 PM
rw-r--r--
📄
fuse.go
4.79 KB
12/01/2022 06:13:01 PM
rw-r--r--
📄
issue22703.go
5.43 KB
12/01/2022 06:13:01 PM
rw-r--r--
📄
issue25378.go
445 bytes
12/01/2022 06:13:01 PM
rw-r--r--
📄
issue31618.go
504 bytes
12/01/2022 06:13:01 PM
rw-r--r--
📄
issue33580.go
459 bytes
12/01/2022 06:13:01 PM
rw-r--r--
📄
issue38554.go
355 bytes
12/01/2022 06:13:01 PM
rw-r--r--
📄
issue42610.go
673 bytes
12/01/2022 06:13:01 PM
rw-r--r--
📄
issue48054.go
464 bytes
12/01/2022 06:13:01 PM
rw-r--r--
📄
issue52635.go
655 bytes
12/01/2022 06:13:01 PM
rw-r--r--
📄
logic.go
815 bytes
12/01/2022 06:13:01 PM
rw-r--r--
📄
mapaccess.go
9.21 KB
12/01/2022 06:13:01 PM
rw-r--r--
📄
maps.go
3.1 KB
12/01/2022 06:13:01 PM
rw-r--r--
📄
math.go
6.12 KB
12/01/2022 06:13:01 PM
rw-r--r--
📄
mathbits.go
18.06 KB
12/01/2022 06:13:01 PM
rw-r--r--
📄
memcombine.go
24 KB
12/01/2022 06:13:01 PM
rw-r--r--
📄
memops.go
11.65 KB
12/01/2022 06:13:01 PM
rw-r--r--
📄
noextend.go
4.8 KB
12/01/2022 06:13:01 PM
rw-r--r--
📄
race.go
651 bytes
12/01/2022 06:13:01 PM
rw-r--r--
📄
regabi_regalloc.go
494 bytes
12/01/2022 06:13:01 PM
rw-r--r--
📄
retpoline.go
224 bytes
12/01/2022 06:13:01 PM
rw-r--r--
📄
rotate.go
5.43 KB
12/01/2022 06:13:01 PM
rw-r--r--
📄
select.go
373 bytes
12/01/2022 06:13:01 PM
rw-r--r--
📄
shift.go
9.15 KB
12/01/2022 06:13:01 PM
rw-r--r--
📄
shortcircuit.go
368 bytes
12/01/2022 06:13:01 PM
rw-r--r--
📄
slices.go
8.09 KB
12/01/2022 06:13:01 PM
rw-r--r--
📄
smallintiface.go
500 bytes
12/01/2022 06:13:01 PM
rw-r--r--
📄
spectre.go
722 bytes
12/01/2022 06:13:01 PM
rw-r--r--
📄
stack.go
2.96 KB
12/01/2022 06:13:01 PM
rw-r--r--
📄
strings.go
2.08 KB
12/01/2022 06:13:01 PM
rw-r--r--
📄
structs.go
887 bytes
12/01/2022 06:13:01 PM
rw-r--r--
📄
switch.go
1.13 KB
12/01/2022 06:13:01 PM
rw-r--r--
📄
zerosize.go
650 bytes
12/01/2022 06:13:01 PM
rw-r--r--
Editing: maps.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 // This file contains code generation tests related to the handling of // map types. // ------------------- // // Access Const // // ------------------- // // Direct use of constants in fast map access calls (Issue #19015). func AccessInt1(m map[int]int) int { // amd64:"MOV[LQ]\t[$]5" return m[5] } func AccessInt2(m map[int]int) bool { // amd64:"MOV[LQ]\t[$]5" _, ok := m[5] return ok } func AccessString1(m map[string]int) int { // amd64:`.*"abc"` return m["abc"] } func AccessString2(m map[string]int) bool { // amd64:`.*"abc"` _, ok := m["abc"] return ok } // ------------------- // // String Conversion // // ------------------- // func LookupStringConversionSimple(m map[string]int, bytes []byte) int { // amd64:-`.*runtime\.slicebytetostring\(` return m[string(bytes)] } func LookupStringConversionStructLit(m map[struct{ string }]int, bytes []byte) int { // amd64:-`.*runtime\.slicebytetostring\(` return m[struct{ string }{string(bytes)}] } func LookupStringConversionArrayLit(m map[[2]string]int, bytes []byte) int { // amd64:-`.*runtime\.slicebytetostring\(` return m[[2]string{string(bytes), string(bytes)}] } func LookupStringConversionNestedLit(m map[[1]struct{ s [1]string }]int, bytes []byte) int { // amd64:-`.*runtime\.slicebytetostring\(` return m[[1]struct{ s [1]string }{struct{ s [1]string }{s: [1]string{string(bytes)}}}] } func LookupStringConversionKeyedArrayLit(m map[[2]string]int, bytes []byte) int { // amd64:-`.*runtime\.slicebytetostring\(` return m[[2]string{0: string(bytes)}] } // ------------------- // // Map Clear // // ------------------- // // Optimization of map clear idiom (Issue #20138). func MapClearReflexive(m map[int]int) { // amd64:`.*runtime\.mapclear` // amd64:-`.*runtime\.mapiterinit` for k := range m { delete(m, k) } } func MapClearIndirect(m map[int]int) { s := struct{ m map[int]int }{m: m} // amd64:`.*runtime\.mapclear` // amd64:-`.*runtime\.mapiterinit` for k := range s.m { delete(s.m, k) } } func MapClearPointer(m map[*byte]int) { // amd64:`.*runtime\.mapclear` // amd64:-`.*runtime\.mapiterinit` for k := range m { delete(m, k) } } func MapClearNotReflexive(m map[float64]int) { // amd64:`.*runtime\.mapiterinit` // amd64:-`.*runtime\.mapclear` for k := range m { delete(m, k) } } func MapClearInterface(m map[interface{}]int) { // amd64:`.*runtime\.mapiterinit` // amd64:-`.*runtime\.mapclear` for k := range m { delete(m, k) } } func MapClearSideEffect(m map[int]int) int { k := 0 // amd64:`.*runtime\.mapiterinit` // amd64:-`.*runtime\.mapclear` for k = range m { delete(m, k) } return k } func MapLiteralSizing(x int) (map[int]int, map[int]int) { // amd64:"MOVL\t[$]10," m := map[int]int{ 0: 0, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, } // amd64:"MOVL\t[$]10," n := map[int]int{ 0: x, 1: x, 2: x, 3: x, 4: x, 5: x, 6: x, 7: x, 8: x, 9: x, } return m, n }