chore: migrate to gitea
This commit is contained in:
30
vendor/github.com/cloudwego/base64x/.gitignore
generated
vendored
Normal file
30
vendor/github.com/cloudwego/base64x/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
# Binaries for programs and plugins
|
||||
*.exe
|
||||
*.exe~
|
||||
*.dll
|
||||
*.so
|
||||
*.dylib
|
||||
|
||||
# Test binary, built with `go test -c`
|
||||
*.test
|
||||
|
||||
# Output of the go coverage tool, specifically when used with LiteIDE
|
||||
*.out
|
||||
|
||||
# Dependency directories (remove the comment below to include it)
|
||||
# vendor/
|
||||
|
||||
# the result of the go build
|
||||
output*
|
||||
output/*
|
||||
|
||||
# Files generated by IDEs
|
||||
.idea/
|
||||
*.iml
|
||||
|
||||
# Vim swap files
|
||||
*.swp
|
||||
|
||||
# Vscode files
|
||||
.vscode
|
||||
|
||||
3
vendor/github.com/cloudwego/base64x/.gitmodules
generated
vendored
Normal file
3
vendor/github.com/cloudwego/base64x/.gitmodules
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
[submodule "tools/asm2asm"]
|
||||
path = tools/asm2asm
|
||||
url = https://github.com/cloudwego/asm2asm
|
||||
37
vendor/github.com/cloudwego/base64x/.golangci.yaml
generated
vendored
Normal file
37
vendor/github.com/cloudwego/base64x/.golangci.yaml
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
# Options for analysis running.
|
||||
run:
|
||||
# include `vendor` `third_party` `testdata` `examples` `Godeps` `builtin`
|
||||
skip-dirs-use-default: true
|
||||
skip-dirs:
|
||||
- kitex_gen
|
||||
skip-files:
|
||||
- ".*\\.mock\\.go$"
|
||||
# output configuration options
|
||||
output:
|
||||
# Format: colored-line-number|line-number|json|tab|checkstyle|code-climate|junit-xml|github-actions
|
||||
format: colored-line-number
|
||||
# All available settings of specific linters.
|
||||
# Refer to https://golangci-lint.run/usage/linters
|
||||
linters-settings:
|
||||
gofumpt:
|
||||
# Choose whether to use the extra rules.
|
||||
# Default: false
|
||||
extra-rules: true
|
||||
govet:
|
||||
# Disable analyzers by name.
|
||||
# Run `go tool vet help` to see all analyzers.
|
||||
disable:
|
||||
- stdmethods
|
||||
linters:
|
||||
enable:
|
||||
- gofumpt
|
||||
- goimports
|
||||
- gofmt
|
||||
disable:
|
||||
- errcheck
|
||||
- typecheck
|
||||
- deadcode
|
||||
- varcheck
|
||||
- staticcheck
|
||||
issues:
|
||||
exclude-use-default: true
|
||||
14
vendor/github.com/cloudwego/base64x/.licenserc.yaml
generated
vendored
Normal file
14
vendor/github.com/cloudwego/base64x/.licenserc.yaml
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
header:
|
||||
license:
|
||||
spdx-id: Apache-2.0
|
||||
copyright-owner: CloudWeGo Authors
|
||||
|
||||
paths:
|
||||
- '**/*.go'
|
||||
- '**/*.s'
|
||||
|
||||
paths-ignore:
|
||||
- 'internal/native/avx2/*.go'
|
||||
- 'internal/native/sse/*.go'
|
||||
|
||||
comment: on-failure
|
||||
128
vendor/github.com/cloudwego/base64x/CODE_OF_CONDUCT.md
generated
vendored
Normal file
128
vendor/github.com/cloudwego/base64x/CODE_OF_CONDUCT.md
generated
vendored
Normal file
@@ -0,0 +1,128 @@
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
We as members, contributors, and leaders pledge to make participation in our
|
||||
community a harassment-free experience for everyone, regardless of age, body
|
||||
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
||||
identity and expression, level of experience, education, socio-economic status,
|
||||
nationality, personal appearance, race, religion, or sexual identity
|
||||
and orientation.
|
||||
|
||||
We pledge to act and interact in ways that contribute to an open, welcoming,
|
||||
diverse, inclusive, and healthy community.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to a positive environment for our
|
||||
community include:
|
||||
|
||||
* Demonstrating empathy and kindness toward other people
|
||||
* Being respectful of differing opinions, viewpoints, and experiences
|
||||
* Giving and gracefully accepting constructive feedback
|
||||
* Accepting responsibility and apologizing to those affected by our mistakes,
|
||||
and learning from the experience
|
||||
* Focusing on what is best not just for us as individuals, but for the
|
||||
overall community
|
||||
|
||||
Examples of unacceptable behavior include:
|
||||
|
||||
* The use of sexualized language or imagery, and sexual attention or
|
||||
advances of any kind
|
||||
* Trolling, insulting or derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or email
|
||||
address, without their explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Enforcement Responsibilities
|
||||
|
||||
Community leaders are responsible for clarifying and enforcing our standards of
|
||||
acceptable behavior and will take appropriate and fair corrective action in
|
||||
response to any behavior that they deem inappropriate, threatening, offensive,
|
||||
or harmful.
|
||||
|
||||
Community leaders have the right and responsibility to remove, edit, or reject
|
||||
comments, commits, code, wiki edits, issues, and other contributions that are
|
||||
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
||||
decisions when appropriate.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies within all community spaces, and also applies when
|
||||
an individual is officially representing the community in public spaces.
|
||||
Examples of representing our community include using an official e-mail address,
|
||||
posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported to the community leaders responsible for enforcement at
|
||||
conduct@cloudwego.io.
|
||||
All complaints will be reviewed and investigated promptly and fairly.
|
||||
|
||||
All community leaders are obligated to respect the privacy and security of the
|
||||
reporter of any incident.
|
||||
|
||||
## Enforcement Guidelines
|
||||
|
||||
Community leaders will follow these Community Impact Guidelines in determining
|
||||
the consequences for any action they deem in violation of this Code of Conduct:
|
||||
|
||||
### 1. Correction
|
||||
|
||||
**Community Impact**: Use of inappropriate language or other behavior deemed
|
||||
unprofessional or unwelcome in the community.
|
||||
|
||||
**Consequence**: A private, written warning from community leaders, providing
|
||||
clarity around the nature of the violation and an explanation of why the
|
||||
behavior was inappropriate. A public apology may be requested.
|
||||
|
||||
### 2. Warning
|
||||
|
||||
**Community Impact**: A violation through a single incident or series
|
||||
of actions.
|
||||
|
||||
**Consequence**: A warning with consequences for continued behavior. No
|
||||
interaction with the people involved, including unsolicited interaction with
|
||||
those enforcing the Code of Conduct, for a specified period of time. This
|
||||
includes avoiding interactions in community spaces as well as external channels
|
||||
like social media. Violating these terms may lead to a temporary or
|
||||
permanent ban.
|
||||
|
||||
### 3. Temporary Ban
|
||||
|
||||
**Community Impact**: A serious violation of community standards, including
|
||||
sustained inappropriate behavior.
|
||||
|
||||
**Consequence**: A temporary ban from any sort of interaction or public
|
||||
communication with the community for a specified period of time. No public or
|
||||
private interaction with the people involved, including unsolicited interaction
|
||||
with those enforcing the Code of Conduct, is allowed during this period.
|
||||
Violating these terms may lead to a permanent ban.
|
||||
|
||||
### 4. Permanent Ban
|
||||
|
||||
**Community Impact**: Demonstrating a pattern of violation of community
|
||||
standards, including sustained inappropriate behavior, harassment of an
|
||||
individual, or aggression toward or disparagement of classes of individuals.
|
||||
|
||||
**Consequence**: A permanent ban from any sort of public interaction within
|
||||
the community.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
||||
version 2.0, available at
|
||||
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
||||
|
||||
Community Impact Guidelines were inspired by [Mozilla's code of conduct
|
||||
enforcement ladder](https://github.com/mozilla/diversity).
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
||||
|
||||
For answers to common questions about this code of conduct, see the FAQ at
|
||||
https://www.contributor-covenant.org/faq. Translations are available at
|
||||
https://www.contributor-covenant.org/translations.
|
||||
55
vendor/github.com/cloudwego/base64x/CONTRIBUTING.md
generated
vendored
Normal file
55
vendor/github.com/cloudwego/base64x/CONTRIBUTING.md
generated
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
# How to Contribute
|
||||
|
||||
## Your First Pull Request
|
||||
We use github for our codebase. You can start by reading [How To Pull Request](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests).
|
||||
|
||||
## Branch Organization
|
||||
We use [git-flow](https://nvie.com/posts/a-successful-git-branching-model/) as our branch organization, as known as [FDD](https://en.wikipedia.org/wiki/Feature-driven_development)
|
||||
|
||||
## Bugs
|
||||
### 1. How to Find Known Issues
|
||||
We are using [Github Issues](https://github.com/cloudwego/kitex/issues) for our public bugs. We keep a close eye on this and try to make it clear when we have an internal fix in progress. Before filing a new task, try to make sure your problem doesn’t already exist.
|
||||
|
||||
### 2. Reporting New Issues
|
||||
Providing a reduced test code is a recommended way for reporting issues. Then can placed in:
|
||||
- Just in issues
|
||||
- [Golang Playground](https://play.golang.org/)
|
||||
|
||||
### 3. Security Bugs
|
||||
Please do not report the safe disclosure of bugs to public issues. Contact us by [Support Email](mailto:conduct@cloudwego.io)
|
||||
|
||||
## How to Get in Touch
|
||||
- [Email](mailto:conduct@cloudwego.io)
|
||||
|
||||
## Submit a Pull Request
|
||||
Before you submit your Pull Request (PR) consider the following guidelines:
|
||||
1. Search [GitHub](https://github.com/cloudwego/kitex/pulls) for an open or closed PR that relates to your submission. You don't want to duplicate existing efforts.
|
||||
2. Be sure that an issue describes the problem you're fixing, or documents the design for the feature you'd like to add. Discussing the design upfront helps to ensure that we're ready to accept your work.
|
||||
3. [Fork](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo) the cloudwego/kitex repo.
|
||||
4. In your forked repository, make your changes in a new git branch:
|
||||
```
|
||||
git checkout -b my-fix-branch develop
|
||||
```
|
||||
5. Create your patch, including appropriate test cases.
|
||||
6. Follow our [Style Guides](#code-style-guides).
|
||||
7. Commit your changes using a descriptive commit message that follows [AngularJS Git Commit Message Conventions](https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit).
|
||||
Adherence to these conventions is necessary because release notes are automatically generated from these messages.
|
||||
8. Push your branch to GitHub:
|
||||
```
|
||||
git push origin my-fix-branch
|
||||
```
|
||||
9. In GitHub, send a pull request to `kitex:develop`
|
||||
|
||||
## Contribution Prerequisites
|
||||
- Our development environment keeps up with [Go Official](https://golang.org/project/).
|
||||
- You need fully checking with lint tools before submit your pull request. [gofmt](https://golang.org/pkg/cmd/gofmt/) and [golangci-lint](https://github.com/golangci/golangci-lint)
|
||||
- You are familiar with [Github](https://github.com)
|
||||
- Maybe you need familiar with [Actions](https://github.com/features/actions)(our default workflow tool).
|
||||
|
||||
## Code Style Guides
|
||||
Also see [Pingcap General advice](https://pingcap.github.io/style-guide/general.html).
|
||||
|
||||
Good resources:
|
||||
- [Effective Go](https://golang.org/doc/effective_go)
|
||||
- [Go Code Review Comments](https://github.com/golang/go/wiki/CodeReviewComments)
|
||||
- [Uber Go Style Guide](https://github.com/uber-go/guide/blob/master/style.md)
|
||||
201
vendor/github.com/cloudwego/base64x/LICENSE
generated
vendored
Normal file
201
vendor/github.com/cloudwego/base64x/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
177
vendor/github.com/cloudwego/base64x/LICENSE-APACHE
generated
vendored
Normal file
177
vendor/github.com/cloudwego/base64x/LICENSE-APACHE
generated
vendored
Normal file
@@ -0,0 +1,177 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
29
vendor/github.com/cloudwego/base64x/Makefile
generated
vendored
Normal file
29
vendor/github.com/cloudwego/base64x/Makefile
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
.PHONY: all clean
|
||||
|
||||
CFLAGS := -mavx
|
||||
CFLAGS += -mavx2
|
||||
CFLAGS += -mno-bmi
|
||||
CFLAGS += -mno-red-zone
|
||||
CFLAGS += -fno-asynchronous-unwind-tables
|
||||
CFLAGS += -fno-stack-protector
|
||||
CFLAGS += -fno-exceptions
|
||||
CFLAGS += -fno-builtin
|
||||
CFLAGS += -fno-rtti
|
||||
CFLAGS += -nostdlib
|
||||
CFLAGS += -O3
|
||||
|
||||
NATIVE_ASM := $(wildcard native/*.S)
|
||||
NATIVE_SRC := $(wildcard native/*.h)
|
||||
NATIVE_SRC += $(wildcard native/*.c)
|
||||
|
||||
all: native_amd64.s
|
||||
|
||||
clean:
|
||||
rm -vf native_text_amd64.go native_subr_amd64.go output/*.s
|
||||
|
||||
native_amd64.s: ${NATIVE_SRC} ${NATIVE_ASM} native_amd64.go
|
||||
mkdir -p output
|
||||
clang ${CFLAGS} -S -o output/native.s native/native.c
|
||||
python3 tools/asm2asm/asm2asm.py -r native_amd64.go output/native.s ${NATIVE_ASM}
|
||||
awk '{gsub(/Text__native_entry__/, "text__native_entry__")}1' native_text_amd64.go > native_text_amd64.go.tmp && mv native_text_amd64.go.tmp native_text_amd64.go
|
||||
awk '{gsub(/Funcs/, "funcs")}1' native_subr_amd64.go > native_subr_amd64.go.tmp && mv native_subr_amd64.go.tmp native_subr_amd64.go
|
||||
4
vendor/github.com/cloudwego/base64x/README.md
generated
vendored
Normal file
4
vendor/github.com/cloudwego/base64x/README.md
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
# base64x
|
||||
|
||||
High performance drop-in replacement of the `encoding/base64` library.
|
||||
|
||||
4
vendor/github.com/cloudwego/base64x/_typos.toml
generated
vendored
Normal file
4
vendor/github.com/cloudwego/base64x/_typos.toml
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
# Typo check: https://github.com/crate-ci/typos
|
||||
|
||||
[files]
|
||||
extend-exclude = ["go.mod", "go.sum", "check_branch_name.sh"]
|
||||
169
vendor/github.com/cloudwego/base64x/base64x.go
generated
vendored
Normal file
169
vendor/github.com/cloudwego/base64x/base64x.go
generated
vendored
Normal file
@@ -0,0 +1,169 @@
|
||||
/*
|
||||
* Copyright 2024 CloudWeGo Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package base64x
|
||||
|
||||
import (
|
||||
`encoding/base64`
|
||||
|
||||
"github.com/cloudwego/base64x/internal/native"
|
||||
)
|
||||
|
||||
// An Encoding is a radix 64 encoding/decoding scheme, defined by a
|
||||
// 64-character alphabet. The most common encoding is the "base64"
|
||||
// encoding defined in RFC 4648 and used in MIME (RFC 2045) and PEM
|
||||
// (RFC 1421). RFC 4648 also defines an alternate encoding, which is
|
||||
// the standard encoding with - and _ substituted for + and /.
|
||||
type Encoding int
|
||||
|
||||
const (
|
||||
_MODE_URL = 1 << 0
|
||||
_MODE_RAW = 1 << 1
|
||||
_MODE_AVX2 = 1 << 2
|
||||
_MODE_JSON = 1 << 3
|
||||
)
|
||||
|
||||
// StdEncoding is the standard base64 encoding, as defined in
|
||||
// RFC 4648.
|
||||
const StdEncoding Encoding = 0
|
||||
|
||||
// URLEncoding is the alternate base64 encoding defined in RFC 4648.
|
||||
// It is typically used in URLs and file names.
|
||||
const URLEncoding Encoding = _MODE_URL
|
||||
|
||||
// RawStdEncoding is the standard raw, unpadded base64 encoding,
|
||||
// as defined in RFC 4648 section 3.2.
|
||||
//
|
||||
// This is the same as StdEncoding but omits padding characters.
|
||||
const RawStdEncoding Encoding = _MODE_RAW
|
||||
|
||||
// RawURLEncoding is the unpadded alternate base64 encoding defined in RFC 4648.
|
||||
// It is typically used in URLs and file names.
|
||||
//
|
||||
// This is the same as URLEncoding but omits padding characters.
|
||||
const RawURLEncoding Encoding = _MODE_RAW | _MODE_URL
|
||||
|
||||
// JSONStdEncoding is the StdEncoding and encoded as JSON string as RFC 8259.
|
||||
const JSONStdEncoding Encoding = _MODE_JSON;
|
||||
|
||||
var (
|
||||
archFlags = 0
|
||||
)
|
||||
|
||||
/** Encoder Functions **/
|
||||
|
||||
// Encode encodes src using the specified encoding, writing
|
||||
// EncodedLen(len(src)) bytes to out.
|
||||
//
|
||||
// The encoding pads the output to a multiple of 4 bytes,
|
||||
// so Encode is not appropriate for use on individual blocks
|
||||
// of a large data stream.
|
||||
//
|
||||
// If out is not large enough to contain the encoded result,
|
||||
// it will panic.
|
||||
func (self Encoding) Encode(out []byte, src []byte) {
|
||||
if len(src) != 0 {
|
||||
if buf := out[:0:len(out)]; self.EncodedLen(len(src)) <= len(out) {
|
||||
self.EncodeUnsafe(&buf, src)
|
||||
} else {
|
||||
panic("encoder output buffer is too small")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// EncodeUnsafe behaves like Encode, except it does NOT check if
|
||||
// out is large enough to contain the encoded result.
|
||||
//
|
||||
// It will also update the length of out.
|
||||
func (self Encoding) EncodeUnsafe(out *[]byte, src []byte) {
|
||||
native.B64Encode(out, &src, int(self) | archFlags)
|
||||
}
|
||||
|
||||
// EncodeToString returns the base64 encoding of src.
|
||||
func (self Encoding) EncodeToString(src []byte) string {
|
||||
nbs := len(src)
|
||||
ret := make([]byte, 0, self.EncodedLen(nbs))
|
||||
|
||||
/* encode in native code */
|
||||
self.EncodeUnsafe(&ret, src)
|
||||
return mem2str(ret)
|
||||
}
|
||||
|
||||
// EncodedLen returns the length in bytes of the base64 encoding
|
||||
// of an input buffer of length n.
|
||||
func (self Encoding) EncodedLen(n int) int {
|
||||
if (self & _MODE_RAW) == 0 {
|
||||
return (n + 2) / 3 * 4
|
||||
} else {
|
||||
return (n * 8 + 5) / 6
|
||||
}
|
||||
}
|
||||
|
||||
/** Decoder Functions **/
|
||||
|
||||
// Decode decodes src using the encoding enc. It writes at most
|
||||
// DecodedLen(len(src)) bytes to out and returns the number of bytes
|
||||
// written. If src contains invalid base64 data, it will return the
|
||||
// number of bytes successfully written and base64.CorruptInputError.
|
||||
//
|
||||
// New line characters (\r and \n) are ignored.
|
||||
//
|
||||
// If out is not large enough to contain the encoded result,
|
||||
// it will panic.
|
||||
func (self Encoding) Decode(out []byte, src []byte) (int, error) {
|
||||
if len(src) == 0 {
|
||||
return 0, nil
|
||||
} else if buf := out[:0:len(out)]; self.DecodedLen(len(src)) <= len(out) {
|
||||
return self.DecodeUnsafe(&buf, src)
|
||||
} else {
|
||||
panic("decoder output buffer is too small")
|
||||
}
|
||||
}
|
||||
|
||||
// DecodeUnsafe behaves like Decode, except it does NOT check if
|
||||
// out is large enough to contain the decoded result.
|
||||
//
|
||||
// It will also update the length of out.
|
||||
func (self Encoding) DecodeUnsafe(out *[]byte, src []byte) (int, error) {
|
||||
if n := native.B64Decode(out, mem2addr(src), len(src), int(self) | archFlags); n >= 0 {
|
||||
return n, nil
|
||||
} else {
|
||||
return 0, base64.CorruptInputError(-n - 1)
|
||||
}
|
||||
}
|
||||
|
||||
// DecodeString returns the bytes represented by the base64 string s.
|
||||
func (self Encoding) DecodeString(s string) ([]byte, error) {
|
||||
src := str2mem(s)
|
||||
ret := make([]byte, 0, self.DecodedLen(len(s)))
|
||||
|
||||
/* decode into the allocated buffer */
|
||||
if _, err := self.DecodeUnsafe(&ret, src); err != nil {
|
||||
return nil, err
|
||||
} else {
|
||||
return ret, nil
|
||||
}
|
||||
}
|
||||
|
||||
// DecodedLen returns the maximum length in bytes of the decoded data
|
||||
// corresponding to n bytes of base64-encoded data.
|
||||
func (self Encoding) DecodedLen(n int) int {
|
||||
if (self & _MODE_RAW) == 0 {
|
||||
return n / 4 * 3
|
||||
} else {
|
||||
return n * 6 / 8
|
||||
}
|
||||
}
|
||||
18
vendor/github.com/cloudwego/base64x/base64x_subr_amd64.go
generated
vendored
Normal file
18
vendor/github.com/cloudwego/base64x/base64x_subr_amd64.go
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
|
||||
|
||||
package base64x
|
||||
|
||||
import (
|
||||
"github.com/cloudwego/base64x/internal/native"
|
||||
)
|
||||
|
||||
// HACK: maintain these only to prevent breakchange, because sonic-go linkname these
|
||||
var (
|
||||
_subr__b64decode uintptr
|
||||
_subr__b64encode uintptr
|
||||
)
|
||||
|
||||
func init() {
|
||||
_subr__b64decode = native.S_b64decode
|
||||
_subr__b64encode = native.S_b64encode
|
||||
}
|
||||
10
vendor/github.com/cloudwego/base64x/check_branch_name.sh
generated
vendored
Normal file
10
vendor/github.com/cloudwego/base64x/check_branch_name.sh
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
current=$(git status | head -n1 | sed 's/On branch //')
|
||||
name=${1:-$current}
|
||||
if [[ ! $name =~ ^(((opt(imize)?|feat(ure)?|(bug|hot)?fix|test|refact(or)?|ci)/.+)|(main|develop)|(release-v[0-9]+\.[0-9]+)|(release/v[0-9]+\.[0-9]+\.[0-9]+(-[a-z0-9.]+(\+[a-z0-9.]+)?)?)|revert-[a-z0-9]+)$ ]]; then
|
||||
echo "branch name '$name' is invalid"
|
||||
exit 1
|
||||
else
|
||||
echo "branch name '$name' is valid"
|
||||
fi
|
||||
51
vendor/github.com/cloudwego/base64x/faststr.go
generated
vendored
Normal file
51
vendor/github.com/cloudwego/base64x/faststr.go
generated
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2024 CloudWeGo Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package base64x
|
||||
|
||||
import (
|
||||
`reflect`
|
||||
`unsafe`
|
||||
)
|
||||
|
||||
func mem2str(v []byte) (s string) {
|
||||
(*reflect.StringHeader)(unsafe.Pointer(&s)).Len = (*reflect.SliceHeader)(unsafe.Pointer(&v)).Len
|
||||
(*reflect.StringHeader)(unsafe.Pointer(&s)).Data = (*reflect.SliceHeader)(unsafe.Pointer(&v)).Data
|
||||
return
|
||||
}
|
||||
|
||||
func str2mem(s string) (v []byte) {
|
||||
(*reflect.SliceHeader)(unsafe.Pointer(&v)).Cap = (*reflect.StringHeader)(unsafe.Pointer(&s)).Len
|
||||
(*reflect.SliceHeader)(unsafe.Pointer(&v)).Len = (*reflect.StringHeader)(unsafe.Pointer(&s)).Len
|
||||
(*reflect.SliceHeader)(unsafe.Pointer(&v)).Data = (*reflect.StringHeader)(unsafe.Pointer(&s)).Data
|
||||
return
|
||||
}
|
||||
|
||||
func mem2addr(v []byte) unsafe.Pointer {
|
||||
return *(*unsafe.Pointer)(unsafe.Pointer(&v))
|
||||
}
|
||||
|
||||
// NoEscape hides a pointer from escape analysis. NoEscape is
|
||||
// the identity function but escape analysis doesn't think the
|
||||
// output depends on the input. NoEscape is inlined and currently
|
||||
// compiles down to zero instructions.
|
||||
// USE CAREFULLY!
|
||||
//go:nosplit
|
||||
//goland:noinspection GoVetUnsafePointer
|
||||
func noEscape(p unsafe.Pointer) unsafe.Pointer {
|
||||
x := uintptr(p)
|
||||
return unsafe.Pointer(x ^ 0)
|
||||
}
|
||||
35
vendor/github.com/cloudwego/base64x/internal/native/avx2/b64decode.go
generated
vendored
Normal file
35
vendor/github.com/cloudwego/base64x/internal/native/avx2/b64decode.go
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
// Code generated by Bash, DO NOT EDIT.
|
||||
|
||||
/*
|
||||
* Copyright 2025 ByteDance Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package avx2
|
||||
|
||||
import (
|
||||
`unsafe`
|
||||
|
||||
`github.com/cloudwego/base64x/internal/rt`
|
||||
)
|
||||
|
||||
var F_b64decode func(out unsafe.Pointer, src unsafe.Pointer, len int, mod int) (ret int)
|
||||
|
||||
var S_b64decode uintptr
|
||||
|
||||
//go:nosplit
|
||||
func B64decode(out *[]byte, src unsafe.Pointer, len int, mode int) (ret int) {
|
||||
return F_b64decode(rt.NoEscape(unsafe.Pointer(out)), rt.NoEscape(unsafe.Pointer(src)), len, mode)
|
||||
}
|
||||
|
||||
45
vendor/github.com/cloudwego/base64x/internal/native/avx2/b64decode_subr.go
generated
vendored
Normal file
45
vendor/github.com/cloudwego/base64x/internal/native/avx2/b64decode_subr.go
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
// +build !noasm !appengine
|
||||
// Code generated by asm2asm, DO NOT EDIT.
|
||||
|
||||
package avx2
|
||||
|
||||
import (
|
||||
`github.com/bytedance/sonic/loader`
|
||||
)
|
||||
|
||||
const (
|
||||
_entry__b64decode = 464
|
||||
)
|
||||
|
||||
const (
|
||||
_stack__b64decode = 136
|
||||
)
|
||||
|
||||
const (
|
||||
_size__b64decode = 13488
|
||||
)
|
||||
|
||||
var (
|
||||
_pcsp__b64decode = [][2]uint32{
|
||||
{0x1, 0},
|
||||
{0x6, 8},
|
||||
{0x8, 16},
|
||||
{0xa, 24},
|
||||
{0xc, 32},
|
||||
{0xd, 40},
|
||||
{0x11, 48},
|
||||
{0x349e, 136},
|
||||
{0x349f, 48},
|
||||
{0x34a1, 40},
|
||||
{0x34a3, 32},
|
||||
{0x34a5, 24},
|
||||
{0x34a7, 16},
|
||||
{0x34a8, 8},
|
||||
{0x34b0, 0},
|
||||
}
|
||||
)
|
||||
|
||||
var _cfunc_b64decode = []loader.CFunc{
|
||||
{"_b64decode_entry", 0, _entry__b64decode, 0, nil},
|
||||
{"_b64decode", _entry__b64decode, _size__b64decode, _stack__b64decode, _pcsp__b64decode},
|
||||
}
|
||||
3981
vendor/github.com/cloudwego/base64x/internal/native/avx2/b64decode_text_amd64.go
generated
vendored
Normal file
3981
vendor/github.com/cloudwego/base64x/internal/native/avx2/b64decode_text_amd64.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
34
vendor/github.com/cloudwego/base64x/internal/native/avx2/b64encode.go
generated
vendored
Normal file
34
vendor/github.com/cloudwego/base64x/internal/native/avx2/b64encode.go
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
// Code generated by Bash, DO NOT EDIT.
|
||||
|
||||
/*
|
||||
* Copyright 2025 ByteDance Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package avx2
|
||||
|
||||
import (
|
||||
`unsafe`
|
||||
|
||||
`github.com/cloudwego/base64x/internal/rt`
|
||||
)
|
||||
|
||||
var F_b64encode func(out unsafe.Pointer, src unsafe.Pointer, mod int)
|
||||
|
||||
var S_b64encode uintptr
|
||||
|
||||
//go:nosplit
|
||||
func B64encode(out *[]byte, src *[]byte, mode int) {
|
||||
F_b64encode(rt.NoEscape(unsafe.Pointer(out)), rt.NoEscape(unsafe.Pointer(src)), mode)
|
||||
}
|
||||
41
vendor/github.com/cloudwego/base64x/internal/native/avx2/b64encode_subr.go
generated
vendored
Normal file
41
vendor/github.com/cloudwego/base64x/internal/native/avx2/b64encode_subr.go
generated
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
// +build !noasm !appengine
|
||||
// Code generated by asm2asm, DO NOT EDIT.
|
||||
|
||||
package avx2
|
||||
|
||||
import (
|
||||
`github.com/bytedance/sonic/loader`
|
||||
)
|
||||
|
||||
const (
|
||||
_entry__b64encode = 288
|
||||
)
|
||||
|
||||
const (
|
||||
_stack__b64encode = 40
|
||||
)
|
||||
|
||||
const (
|
||||
_size__b64encode = 832
|
||||
)
|
||||
|
||||
var (
|
||||
_pcsp__b64encode = [][2]uint32{
|
||||
{0x1, 0},
|
||||
{0x6, 8},
|
||||
{0x8, 16},
|
||||
{0xa, 24},
|
||||
{0xb, 32},
|
||||
{0x32a, 40},
|
||||
{0x32c, 32},
|
||||
{0x32e, 24},
|
||||
{0x330, 16},
|
||||
{0x331, 8},
|
||||
{0x340, 0},
|
||||
}
|
||||
)
|
||||
|
||||
var _cfunc_b64encode = []loader.CFunc{
|
||||
{"_b64encode_entry", 0, _entry__b64encode, 0, nil},
|
||||
{"_b64encode", _entry__b64encode, _size__b64encode, _stack__b64encode, _pcsp__b64encode},
|
||||
}
|
||||
387
vendor/github.com/cloudwego/base64x/internal/native/avx2/b64encode_text_amd64.go
generated
vendored
Normal file
387
vendor/github.com/cloudwego/base64x/internal/native/avx2/b64encode_text_amd64.go
generated
vendored
Normal file
@@ -0,0 +1,387 @@
|
||||
// +build amd64
|
||||
// Code generated by asm2asm, DO NOT EDIT.
|
||||
|
||||
package avx2
|
||||
|
||||
var _text_b64encode = []byte{
|
||||
// .p2align 5, 0x00
|
||||
// LCPI0_0
|
||||
0x47, // .byte 71
|
||||
0xfc, //0x00000001 .byte 252
|
||||
0xfc, //0x00000002 .byte 252
|
||||
0xfc, //0x00000003 .byte 252
|
||||
0xfc, //0x00000004 .byte 252
|
||||
0xfc, //0x00000005 .byte 252
|
||||
0xfc, //0x00000006 .byte 252
|
||||
0xfc, //0x00000007 .byte 252
|
||||
0xfc, //0x00000008 .byte 252
|
||||
0xfc, //0x00000009 .byte 252
|
||||
0xfc, //0x0000000a .byte 252
|
||||
0xed, //0x0000000b .byte 237
|
||||
0xf0, //0x0000000c .byte 240
|
||||
0x41, //0x0000000d .byte 65
|
||||
0x00, //0x0000000e .byte 0
|
||||
0x00, //0x0000000f .byte 0
|
||||
0x47, //0x00000010 .byte 71
|
||||
0xfc, //0x00000011 .byte 252
|
||||
0xfc, //0x00000012 .byte 252
|
||||
0xfc, //0x00000013 .byte 252
|
||||
0xfc, //0x00000014 .byte 252
|
||||
0xfc, //0x00000015 .byte 252
|
||||
0xfc, //0x00000016 .byte 252
|
||||
0xfc, //0x00000017 .byte 252
|
||||
0xfc, //0x00000018 .byte 252
|
||||
0xfc, //0x00000019 .byte 252
|
||||
0xfc, //0x0000001a .byte 252
|
||||
0xed, //0x0000001b .byte 237
|
||||
0xf0, //0x0000001c .byte 240
|
||||
0x41, //0x0000001d .byte 65
|
||||
0x00, //0x0000001e .byte 0
|
||||
0x00, //0x0000001f .byte 0
|
||||
//0x00000020 LCPI0_1
|
||||
0x47, //0x00000020 .byte 71
|
||||
0xfc, //0x00000021 .byte 252
|
||||
0xfc, //0x00000022 .byte 252
|
||||
0xfc, //0x00000023 .byte 252
|
||||
0xfc, //0x00000024 .byte 252
|
||||
0xfc, //0x00000025 .byte 252
|
||||
0xfc, //0x00000026 .byte 252
|
||||
0xfc, //0x00000027 .byte 252
|
||||
0xfc, //0x00000028 .byte 252
|
||||
0xfc, //0x00000029 .byte 252
|
||||
0xfc, //0x0000002a .byte 252
|
||||
0xef, //0x0000002b .byte 239
|
||||
0x20, //0x0000002c .byte 32
|
||||
0x41, //0x0000002d .byte 65
|
||||
0x00, //0x0000002e .byte 0
|
||||
0x00, //0x0000002f .byte 0
|
||||
0x47, //0x00000030 .byte 71
|
||||
0xfc, //0x00000031 .byte 252
|
||||
0xfc, //0x00000032 .byte 252
|
||||
0xfc, //0x00000033 .byte 252
|
||||
0xfc, //0x00000034 .byte 252
|
||||
0xfc, //0x00000035 .byte 252
|
||||
0xfc, //0x00000036 .byte 252
|
||||
0xfc, //0x00000037 .byte 252
|
||||
0xfc, //0x00000038 .byte 252
|
||||
0xfc, //0x00000039 .byte 252
|
||||
0xfc, //0x0000003a .byte 252
|
||||
0xef, //0x0000003b .byte 239
|
||||
0x20, //0x0000003c .byte 32
|
||||
0x41, //0x0000003d .byte 65
|
||||
0x00, //0x0000003e .byte 0
|
||||
0x00, //0x0000003f .byte 0
|
||||
//0x00000040 LCPI0_2
|
||||
0x01, //0x00000040 .byte 1
|
||||
0x00, //0x00000041 .byte 0
|
||||
0x02, //0x00000042 .byte 2
|
||||
0x01, //0x00000043 .byte 1
|
||||
0x04, //0x00000044 .byte 4
|
||||
0x03, //0x00000045 .byte 3
|
||||
0x05, //0x00000046 .byte 5
|
||||
0x04, //0x00000047 .byte 4
|
||||
0x07, //0x00000048 .byte 7
|
||||
0x06, //0x00000049 .byte 6
|
||||
0x08, //0x0000004a .byte 8
|
||||
0x07, //0x0000004b .byte 7
|
||||
0x0a, //0x0000004c .byte 10
|
||||
0x09, //0x0000004d .byte 9
|
||||
0x0b, //0x0000004e .byte 11
|
||||
0x0a, //0x0000004f .byte 10
|
||||
0x01, //0x00000050 .byte 1
|
||||
0x00, //0x00000051 .byte 0
|
||||
0x02, //0x00000052 .byte 2
|
||||
0x01, //0x00000053 .byte 1
|
||||
0x04, //0x00000054 .byte 4
|
||||
0x03, //0x00000055 .byte 3
|
||||
0x05, //0x00000056 .byte 5
|
||||
0x04, //0x00000057 .byte 4
|
||||
0x07, //0x00000058 .byte 7
|
||||
0x06, //0x00000059 .byte 6
|
||||
0x08, //0x0000005a .byte 8
|
||||
0x07, //0x0000005b .byte 7
|
||||
0x0a, //0x0000005c .byte 10
|
||||
0x09, //0x0000005d .byte 9
|
||||
0x0b, //0x0000005e .byte 11
|
||||
0x0a, //0x0000005f .byte 10
|
||||
//0x00000060 LCPI0_3
|
||||
0x00, 0xfc, //0x00000060 .word 64512
|
||||
0xc0, 0x0f, //0x00000062 .word 4032
|
||||
0x00, 0xfc, //0x00000064 .word 64512
|
||||
0xc0, 0x0f, //0x00000066 .word 4032
|
||||
0x00, 0xfc, //0x00000068 .word 64512
|
||||
0xc0, 0x0f, //0x0000006a .word 4032
|
||||
0x00, 0xfc, //0x0000006c .word 64512
|
||||
0xc0, 0x0f, //0x0000006e .word 4032
|
||||
0x00, 0xfc, //0x00000070 .word 64512
|
||||
0xc0, 0x0f, //0x00000072 .word 4032
|
||||
0x00, 0xfc, //0x00000074 .word 64512
|
||||
0xc0, 0x0f, //0x00000076 .word 4032
|
||||
0x00, 0xfc, //0x00000078 .word 64512
|
||||
0xc0, 0x0f, //0x0000007a .word 4032
|
||||
0x00, 0xfc, //0x0000007c .word 64512
|
||||
0xc0, 0x0f, //0x0000007e .word 4032
|
||||
//0x00000080 LCPI0_4
|
||||
0x40, 0x00, //0x00000080 .word 64
|
||||
0x00, 0x04, //0x00000082 .word 1024
|
||||
0x40, 0x00, //0x00000084 .word 64
|
||||
0x00, 0x04, //0x00000086 .word 1024
|
||||
0x40, 0x00, //0x00000088 .word 64
|
||||
0x00, 0x04, //0x0000008a .word 1024
|
||||
0x40, 0x00, //0x0000008c .word 64
|
||||
0x00, 0x04, //0x0000008e .word 1024
|
||||
0x40, 0x00, //0x00000090 .word 64
|
||||
0x00, 0x04, //0x00000092 .word 1024
|
||||
0x40, 0x00, //0x00000094 .word 64
|
||||
0x00, 0x04, //0x00000096 .word 1024
|
||||
0x40, 0x00, //0x00000098 .word 64
|
||||
0x00, 0x04, //0x0000009a .word 1024
|
||||
0x40, 0x00, //0x0000009c .word 64
|
||||
0x00, 0x04, //0x0000009e .word 1024
|
||||
//0x000000a0 LCPI0_5
|
||||
0xf0, 0x03, //0x000000a0 .word 1008
|
||||
0x3f, 0x00, //0x000000a2 .word 63
|
||||
0xf0, 0x03, //0x000000a4 .word 1008
|
||||
0x3f, 0x00, //0x000000a6 .word 63
|
||||
0xf0, 0x03, //0x000000a8 .word 1008
|
||||
0x3f, 0x00, //0x000000aa .word 63
|
||||
0xf0, 0x03, //0x000000ac .word 1008
|
||||
0x3f, 0x00, //0x000000ae .word 63
|
||||
0xf0, 0x03, //0x000000b0 .word 1008
|
||||
0x3f, 0x00, //0x000000b2 .word 63
|
||||
0xf0, 0x03, //0x000000b4 .word 1008
|
||||
0x3f, 0x00, //0x000000b6 .word 63
|
||||
0xf0, 0x03, //0x000000b8 .word 1008
|
||||
0x3f, 0x00, //0x000000ba .word 63
|
||||
0xf0, 0x03, //0x000000bc .word 1008
|
||||
0x3f, 0x00, //0x000000be .word 63
|
||||
//0x000000c0 LCPI0_6
|
||||
0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, //0x000000c0 QUAD $0x1a1a1a1a1a1a1a1a; QUAD $0x1a1a1a1a1a1a1a1a // .space 16, '\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a'
|
||||
0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, //0x000000d0 QUAD $0x1a1a1a1a1a1a1a1a; QUAD $0x1a1a1a1a1a1a1a1a // .space 16, '\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a\x1a'
|
||||
//0x000000e0 LCPI0_7
|
||||
0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, //0x000000e0 QUAD $0x3333333333333333; QUAD $0x3333333333333333 // .space 16, '3333333333333333'
|
||||
0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, //0x000000f0 QUAD $0x3333333333333333; QUAD $0x3333333333333333 // .space 16, '3333333333333333'
|
||||
//0x00000100 LCPI0_8
|
||||
0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, //0x00000100 QUAD $0x0d0d0d0d0d0d0d0d; QUAD $0x0d0d0d0d0d0d0d0d // .space 16, '\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r'
|
||||
0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, //0x00000110 QUAD $0x0d0d0d0d0d0d0d0d; QUAD $0x0d0d0d0d0d0d0d0d // .space 16, '\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r'
|
||||
//0x00000120 .p2align 4, 0x90
|
||||
//0x00000120 _b64encode
|
||||
0x55, //0x00000120 pushq %rbp
|
||||
0x48, 0x89, 0xe5, //0x00000121 movq %rsp, %rbp
|
||||
0x41, 0x57, //0x00000124 pushq %r15
|
||||
0x41, 0x56, //0x00000126 pushq %r14
|
||||
0x41, 0x54, //0x00000128 pushq %r12
|
||||
0x53, //0x0000012a pushq %rbx
|
||||
0x4c, 0x8b, 0x4e, 0x08, //0x0000012b movq $8(%rsi), %r9
|
||||
0x4d, 0x85, 0xc9, //0x0000012f testq %r9, %r9
|
||||
0x0f, 0x84, 0x11, 0x03, 0x00, 0x00, //0x00000132 je LBB0_26
|
||||
0x4c, 0x8b, 0x26, //0x00000138 movq (%rsi), %r12
|
||||
0x4c, 0x8b, 0x07, //0x0000013b movq (%rdi), %r8
|
||||
0x4d, 0x01, 0xe1, //0x0000013e addq %r12, %r9
|
||||
0x49, 0x8d, 0x71, 0xe4, //0x00000141 leaq $-28(%r9), %rsi
|
||||
0x48, 0x8d, 0x0d, 0x14, 0x03, 0x00, 0x00, //0x00000145 leaq $788(%rip), %rcx /* _TabEncodeCharsetStd+0(%rip) */
|
||||
0x4c, 0x8d, 0x15, 0x4d, 0x03, 0x00, 0x00, //0x0000014c leaq $845(%rip), %r10 /* _TabEncodeCharsetURL+0(%rip) */
|
||||
0xf6, 0xc2, 0x01, //0x00000153 testb $1, %dl
|
||||
0x4c, 0x0f, 0x44, 0xd1, //0x00000156 cmoveq %rcx, %r10
|
||||
0x0f, 0x84, 0x30, 0x02, 0x00, 0x00, //0x0000015a je LBB0_2
|
||||
0xc5, 0xfe, 0x6f, 0x05, 0xb8, 0xfe, 0xff, 0xff, //0x00000160 vmovdqu $-328(%rip), %ymm0 /* LCPI0_1+0(%rip) */
|
||||
0x4c, 0x03, 0x47, 0x08, //0x00000168 addq $8(%rdi), %r8
|
||||
0x4c, 0x39, 0xe6, //0x0000016c cmpq %r12, %rsi
|
||||
0x0f, 0x82, 0x30, 0x02, 0x00, 0x00, //0x0000016f jb LBB0_5
|
||||
//0x00000175 LBB0_6
|
||||
0xc5, 0xfe, 0x6f, 0x0d, 0xc3, 0xfe, 0xff, 0xff, //0x00000175 vmovdqu $-317(%rip), %ymm1 /* LCPI0_2+0(%rip) */
|
||||
0xc5, 0xfe, 0x6f, 0x15, 0xdb, 0xfe, 0xff, 0xff, //0x0000017d vmovdqu $-293(%rip), %ymm2 /* LCPI0_3+0(%rip) */
|
||||
0xc5, 0xfe, 0x6f, 0x1d, 0xf3, 0xfe, 0xff, 0xff, //0x00000185 vmovdqu $-269(%rip), %ymm3 /* LCPI0_4+0(%rip) */
|
||||
0xc5, 0xfe, 0x6f, 0x25, 0x0b, 0xff, 0xff, 0xff, //0x0000018d vmovdqu $-245(%rip), %ymm4 /* LCPI0_5+0(%rip) */
|
||||
0xc5, 0xfe, 0x6f, 0x2d, 0x23, 0xff, 0xff, 0xff, //0x00000195 vmovdqu $-221(%rip), %ymm5 /* LCPI0_6+0(%rip) */
|
||||
0xc5, 0xfe, 0x6f, 0x35, 0x3b, 0xff, 0xff, 0xff, //0x0000019d vmovdqu $-197(%rip), %ymm6 /* LCPI0_7+0(%rip) */
|
||||
0xc5, 0xfe, 0x6f, 0x3d, 0x53, 0xff, 0xff, 0xff, //0x000001a5 vmovdqu $-173(%rip), %ymm7 /* LCPI0_8+0(%rip) */
|
||||
0x4d, 0x89, 0xc6, //0x000001ad movq %r8, %r14
|
||||
//0x000001b0 .p2align 4, 0x90
|
||||
//0x000001b0 LBB0_7
|
||||
0xc4, 0x41, 0x7a, 0x6f, 0x04, 0x24, //0x000001b0 vmovdqu (%r12), %xmm8
|
||||
0xc4, 0x43, 0x3d, 0x38, 0x44, 0x24, 0x0c, 0x01, //0x000001b6 vinserti128 $1, $12(%r12), %ymm8, %ymm8
|
||||
0xc4, 0x62, 0x3d, 0x00, 0xc1, //0x000001be vpshufb %ymm1, %ymm8, %ymm8
|
||||
0xc5, 0x3d, 0xdb, 0xca, //0x000001c3 vpand %ymm2, %ymm8, %ymm9
|
||||
0xc5, 0x35, 0xe4, 0xcb, //0x000001c7 vpmulhuw %ymm3, %ymm9, %ymm9
|
||||
0xc5, 0x3d, 0xdb, 0xc4, //0x000001cb vpand %ymm4, %ymm8, %ymm8
|
||||
0xc4, 0xc1, 0x2d, 0x71, 0xf0, 0x08, //0x000001cf vpsllw $8, %ymm8, %ymm10
|
||||
0xc4, 0xc1, 0x3d, 0x71, 0xf0, 0x04, //0x000001d5 vpsllw $4, %ymm8, %ymm8
|
||||
0xc4, 0x43, 0x3d, 0x0e, 0xc2, 0xaa, //0x000001db vpblendw $170, %ymm10, %ymm8, %ymm8
|
||||
0xc4, 0x41, 0x3d, 0xeb, 0xc1, //0x000001e1 vpor %ymm9, %ymm8, %ymm8
|
||||
0xc4, 0x41, 0x55, 0x64, 0xc8, //0x000001e6 vpcmpgtb %ymm8, %ymm5, %ymm9
|
||||
0xc5, 0x35, 0xdb, 0xcf, //0x000001eb vpand %ymm7, %ymm9, %ymm9
|
||||
0xc5, 0x3d, 0xd8, 0xd6, //0x000001ef vpsubusb %ymm6, %ymm8, %ymm10
|
||||
0xc4, 0x41, 0x35, 0xeb, 0xca, //0x000001f3 vpor %ymm10, %ymm9, %ymm9
|
||||
0xc4, 0x42, 0x7d, 0x00, 0xc9, //0x000001f8 vpshufb %ymm9, %ymm0, %ymm9
|
||||
0xc4, 0x41, 0x35, 0xfc, 0xc0, //0x000001fd vpaddb %ymm8, %ymm9, %ymm8
|
||||
0xc4, 0x41, 0x7e, 0x7f, 0x06, //0x00000202 vmovdqu %ymm8, (%r14)
|
||||
0x49, 0x83, 0xc6, 0x20, //0x00000207 addq $32, %r14
|
||||
0x49, 0x83, 0xc4, 0x18, //0x0000020b addq $24, %r12
|
||||
0x49, 0x39, 0xf4, //0x0000020f cmpq %rsi, %r12
|
||||
0x0f, 0x86, 0x98, 0xff, 0xff, 0xff, //0x00000212 jbe LBB0_7
|
||||
0x49, 0x8d, 0x71, 0xe8, //0x00000218 leaq $-24(%r9), %rsi
|
||||
0x49, 0x39, 0xf4, //0x0000021c cmpq %rsi, %r12
|
||||
0x0f, 0x87, 0x83, 0x00, 0x00, 0x00, //0x0000021f ja LBB0_10
|
||||
//0x00000225 LBB0_9
|
||||
0xc4, 0xc1, 0x7a, 0x6f, 0x0c, 0x24, //0x00000225 vmovdqu (%r12), %xmm1
|
||||
0xc4, 0xc1, 0x7a, 0x6f, 0x54, 0x24, 0x08, //0x0000022b vmovdqu $8(%r12), %xmm2
|
||||
0xc5, 0xe9, 0x73, 0xda, 0x04, //0x00000232 vpsrldq $4, %xmm2, %xmm2
|
||||
0xc4, 0xe3, 0x75, 0x38, 0xca, 0x01, //0x00000237 vinserti128 $1, %xmm2, %ymm1, %ymm1
|
||||
0xc4, 0xe2, 0x75, 0x00, 0x0d, 0xfa, 0xfd, 0xff, 0xff, //0x0000023d vpshufb $-518(%rip), %ymm1, %ymm1 /* LCPI0_2+0(%rip) */
|
||||
0xc5, 0xf5, 0xdb, 0x15, 0x12, 0xfe, 0xff, 0xff, //0x00000246 vpand $-494(%rip), %ymm1, %ymm2 /* LCPI0_3+0(%rip) */
|
||||
0xc5, 0xed, 0xe4, 0x15, 0x2a, 0xfe, 0xff, 0xff, //0x0000024e vpmulhuw $-470(%rip), %ymm2, %ymm2 /* LCPI0_4+0(%rip) */
|
||||
0xc5, 0xf5, 0xdb, 0x0d, 0x42, 0xfe, 0xff, 0xff, //0x00000256 vpand $-446(%rip), %ymm1, %ymm1 /* LCPI0_5+0(%rip) */
|
||||
0xc5, 0xe5, 0x71, 0xf1, 0x08, //0x0000025e vpsllw $8, %ymm1, %ymm3
|
||||
0xc5, 0xf5, 0x71, 0xf1, 0x04, //0x00000263 vpsllw $4, %ymm1, %ymm1
|
||||
0xc4, 0xe3, 0x75, 0x0e, 0xcb, 0xaa, //0x00000268 vpblendw $170, %ymm3, %ymm1, %ymm1
|
||||
0xc5, 0xf5, 0xeb, 0xca, //0x0000026e vpor %ymm2, %ymm1, %ymm1
|
||||
0xc5, 0xfe, 0x6f, 0x15, 0x46, 0xfe, 0xff, 0xff, //0x00000272 vmovdqu $-442(%rip), %ymm2 /* LCPI0_6+0(%rip) */
|
||||
0xc5, 0xed, 0x64, 0xd1, //0x0000027a vpcmpgtb %ymm1, %ymm2, %ymm2
|
||||
0xc5, 0xf5, 0xd8, 0x1d, 0x5a, 0xfe, 0xff, 0xff, //0x0000027e vpsubusb $-422(%rip), %ymm1, %ymm3 /* LCPI0_7+0(%rip) */
|
||||
0xc5, 0xed, 0xdb, 0x15, 0x72, 0xfe, 0xff, 0xff, //0x00000286 vpand $-398(%rip), %ymm2, %ymm2 /* LCPI0_8+0(%rip) */
|
||||
0xc5, 0xed, 0xeb, 0xd3, //0x0000028e vpor %ymm3, %ymm2, %ymm2
|
||||
0xc4, 0xe2, 0x7d, 0x00, 0xc2, //0x00000292 vpshufb %ymm2, %ymm0, %ymm0
|
||||
0xc5, 0xfd, 0xfc, 0xc1, //0x00000297 vpaddb %ymm1, %ymm0, %ymm0
|
||||
0xc4, 0xc1, 0x7e, 0x7f, 0x06, //0x0000029b vmovdqu %ymm0, (%r14)
|
||||
0x49, 0x83, 0xc6, 0x20, //0x000002a0 addq $32, %r14
|
||||
0x49, 0x83, 0xc4, 0x18, //0x000002a4 addq $24, %r12
|
||||
//0x000002a8 LBB0_10
|
||||
0x4d, 0x39, 0xcc, //0x000002a8 cmpq %r9, %r12
|
||||
0x0f, 0x84, 0x91, 0x01, 0x00, 0x00, //0x000002ab je LBB0_25
|
||||
0x4d, 0x8d, 0x59, 0xfc, //0x000002b1 leaq $-4(%r9), %r11
|
||||
0x4d, 0x39, 0xdc, //0x000002b5 cmpq %r11, %r12
|
||||
0x0f, 0x87, 0x59, 0x00, 0x00, 0x00, //0x000002b8 ja LBB0_14
|
||||
0x90, 0x90, //0x000002be .p2align 4, 0x90
|
||||
//0x000002c0 LBB0_12
|
||||
0x41, 0x8b, 0x34, 0x24, //0x000002c0 movl (%r12), %esi
|
||||
0x0f, 0xce, //0x000002c4 bswapl %esi
|
||||
0x49, 0x89, 0xf7, //0x000002c6 movq %rsi, %r15
|
||||
0x49, 0xc1, 0xef, 0x1a, //0x000002c9 shrq $26, %r15
|
||||
0x89, 0xf1, //0x000002cd movl %esi, %ecx
|
||||
0xc1, 0xe9, 0x14, //0x000002cf shrl $20, %ecx
|
||||
0x83, 0xe1, 0x3f, //0x000002d2 andl $63, %ecx
|
||||
0x89, 0xf3, //0x000002d5 movl %esi, %ebx
|
||||
0xc1, 0xeb, 0x0e, //0x000002d7 shrl $14, %ebx
|
||||
0x83, 0xe3, 0x3f, //0x000002da andl $63, %ebx
|
||||
0xc1, 0xee, 0x08, //0x000002dd shrl $8, %esi
|
||||
0x83, 0xe6, 0x3f, //0x000002e0 andl $63, %esi
|
||||
0x49, 0x83, 0xc4, 0x03, //0x000002e3 addq $3, %r12
|
||||
0x43, 0x0f, 0xb6, 0x04, 0x3a, //0x000002e7 movzbl (%r10,%r15), %eax
|
||||
0x41, 0x88, 0x06, //0x000002ec movb %al, (%r14)
|
||||
0x41, 0x0f, 0xb6, 0x04, 0x0a, //0x000002ef movzbl (%r10,%rcx), %eax
|
||||
0x41, 0x88, 0x46, 0x01, //0x000002f4 movb %al, $1(%r14)
|
||||
0x41, 0x0f, 0xb6, 0x04, 0x1a, //0x000002f8 movzbl (%r10,%rbx), %eax
|
||||
0x41, 0x88, 0x46, 0x02, //0x000002fd movb %al, $2(%r14)
|
||||
0x41, 0x0f, 0xb6, 0x04, 0x32, //0x00000301 movzbl (%r10,%rsi), %eax
|
||||
0x41, 0x88, 0x46, 0x03, //0x00000306 movb %al, $3(%r14)
|
||||
0x49, 0x83, 0xc6, 0x04, //0x0000030a addq $4, %r14
|
||||
0x4d, 0x39, 0xdc, //0x0000030e cmpq %r11, %r12
|
||||
0x0f, 0x86, 0xa9, 0xff, 0xff, 0xff, //0x00000311 jbe LBB0_12
|
||||
//0x00000317 LBB0_14
|
||||
0x4d, 0x29, 0xe1, //0x00000317 subq %r12, %r9
|
||||
0x45, 0x0f, 0xb6, 0x1c, 0x24, //0x0000031a movzbl (%r12), %r11d
|
||||
0x49, 0x83, 0xf9, 0x01, //0x0000031f cmpq $1, %r9
|
||||
0x0f, 0x84, 0xd5, 0x00, 0x00, 0x00, //0x00000323 je LBB0_21
|
||||
0x4c, 0x89, 0xde, //0x00000329 movq %r11, %rsi
|
||||
0x48, 0xc1, 0xe6, 0x10, //0x0000032c shlq $16, %rsi
|
||||
0x49, 0x83, 0xf9, 0x02, //0x00000330 cmpq $2, %r9
|
||||
0x0f, 0x84, 0x80, 0x00, 0x00, 0x00, //0x00000334 je LBB0_18
|
||||
0x49, 0x83, 0xf9, 0x03, //0x0000033a cmpq $3, %r9
|
||||
0x0f, 0x85, 0xfe, 0x00, 0x00, 0x00, //0x0000033e jne LBB0_25
|
||||
0x41, 0x0f, 0xb6, 0x54, 0x24, 0x02, //0x00000344 movzbl $2(%r12), %edx
|
||||
0x09, 0xd6, //0x0000034a orl %edx, %esi
|
||||
0x41, 0x0f, 0xb6, 0x44, 0x24, 0x01, //0x0000034c movzbl $1(%r12), %eax
|
||||
0xc1, 0xe0, 0x08, //0x00000352 shll $8, %eax
|
||||
0x09, 0xf0, //0x00000355 orl %esi, %eax
|
||||
0x49, 0xc1, 0xeb, 0x02, //0x00000357 shrq $2, %r11
|
||||
0x43, 0x8a, 0x0c, 0x1a, //0x0000035b movb (%r10,%r11), %cl
|
||||
0x41, 0x88, 0x0e, //0x0000035f movb %cl, (%r14)
|
||||
0x89, 0xc1, //0x00000362 movl %eax, %ecx
|
||||
0xc1, 0xe9, 0x0c, //0x00000364 shrl $12, %ecx
|
||||
0x83, 0xe1, 0x3f, //0x00000367 andl $63, %ecx
|
||||
0x41, 0x8a, 0x0c, 0x0a, //0x0000036a movb (%r10,%rcx), %cl
|
||||
0x41, 0x88, 0x4e, 0x01, //0x0000036e movb %cl, $1(%r14)
|
||||
0xc1, 0xe8, 0x06, //0x00000372 shrl $6, %eax
|
||||
0x83, 0xe0, 0x3f, //0x00000375 andl $63, %eax
|
||||
0x41, 0x8a, 0x04, 0x02, //0x00000378 movb (%r10,%rax), %al
|
||||
0x41, 0x88, 0x46, 0x02, //0x0000037c movb %al, $2(%r14)
|
||||
0x83, 0xe2, 0x3f, //0x00000380 andl $63, %edx
|
||||
0x41, 0x8a, 0x04, 0x12, //0x00000383 movb (%r10,%rdx), %al
|
||||
0x41, 0x88, 0x46, 0x03, //0x00000387 movb %al, $3(%r14)
|
||||
0xe9, 0x9c, 0x00, 0x00, 0x00, //0x0000038b jmp LBB0_24
|
||||
//0x00000390 LBB0_2
|
||||
0xc5, 0xfe, 0x6f, 0x05, 0x68, 0xfc, 0xff, 0xff, //0x00000390 vmovdqu $-920(%rip), %ymm0 /* LCPI0_0+0(%rip) */
|
||||
0x4c, 0x03, 0x47, 0x08, //0x00000398 addq $8(%rdi), %r8
|
||||
0x4c, 0x39, 0xe6, //0x0000039c cmpq %r12, %rsi
|
||||
0x0f, 0x83, 0xd0, 0xfd, 0xff, 0xff, //0x0000039f jae LBB0_6
|
||||
//0x000003a5 LBB0_5
|
||||
0x4d, 0x89, 0xc6, //0x000003a5 movq %r8, %r14
|
||||
0x49, 0x8d, 0x71, 0xe8, //0x000003a8 leaq $-24(%r9), %rsi
|
||||
0x49, 0x39, 0xf4, //0x000003ac cmpq %rsi, %r12
|
||||
0x0f, 0x86, 0x70, 0xfe, 0xff, 0xff, //0x000003af jbe LBB0_9
|
||||
0xe9, 0xee, 0xfe, 0xff, 0xff, //0x000003b5 jmp LBB0_10
|
||||
//0x000003ba LBB0_18
|
||||
0x41, 0x0f, 0xb6, 0x44, 0x24, 0x01, //0x000003ba movzbl $1(%r12), %eax
|
||||
0x89, 0xc1, //0x000003c0 movl %eax, %ecx
|
||||
0xc1, 0xe1, 0x08, //0x000003c2 shll $8, %ecx
|
||||
0x09, 0xf1, //0x000003c5 orl %esi, %ecx
|
||||
0x49, 0xc1, 0xeb, 0x02, //0x000003c7 shrq $2, %r11
|
||||
0x43, 0x8a, 0x1c, 0x1a, //0x000003cb movb (%r10,%r11), %bl
|
||||
0x41, 0x88, 0x1e, //0x000003cf movb %bl, (%r14)
|
||||
0xc1, 0xe9, 0x0c, //0x000003d2 shrl $12, %ecx
|
||||
0x83, 0xe1, 0x3f, //0x000003d5 andl $63, %ecx
|
||||
0x41, 0x8a, 0x0c, 0x0a, //0x000003d8 movb (%r10,%rcx), %cl
|
||||
0x41, 0x88, 0x4e, 0x01, //0x000003dc movb %cl, $1(%r14)
|
||||
0x83, 0xe0, 0x0f, //0x000003e0 andl $15, %eax
|
||||
0x41, 0x8a, 0x04, 0x82, //0x000003e3 movb (%r10,%rax,4), %al
|
||||
0x41, 0x88, 0x46, 0x02, //0x000003e7 movb %al, $2(%r14)
|
||||
0xf6, 0xc2, 0x02, //0x000003eb testb $2, %dl
|
||||
0x0f, 0x85, 0x41, 0x00, 0x00, 0x00, //0x000003ee jne LBB0_19
|
||||
0x41, 0xc6, 0x46, 0x03, 0x3d, //0x000003f4 movb $61, $3(%r14)
|
||||
0xe9, 0x2e, 0x00, 0x00, 0x00, //0x000003f9 jmp LBB0_24
|
||||
//0x000003fe LBB0_21
|
||||
0x4c, 0x89, 0xd8, //0x000003fe movq %r11, %rax
|
||||
0x48, 0xc1, 0xe8, 0x02, //0x00000401 shrq $2, %rax
|
||||
0x41, 0x8a, 0x04, 0x02, //0x00000405 movb (%r10,%rax), %al
|
||||
0x41, 0x88, 0x06, //0x00000409 movb %al, (%r14)
|
||||
0x41, 0xc1, 0xe3, 0x04, //0x0000040c shll $4, %r11d
|
||||
0x41, 0x83, 0xe3, 0x30, //0x00000410 andl $48, %r11d
|
||||
0x43, 0x8a, 0x04, 0x1a, //0x00000414 movb (%r10,%r11), %al
|
||||
0x41, 0x88, 0x46, 0x01, //0x00000418 movb %al, $1(%r14)
|
||||
0xf6, 0xc2, 0x02, //0x0000041c testb $2, %dl
|
||||
0x0f, 0x85, 0x19, 0x00, 0x00, 0x00, //0x0000041f jne LBB0_22
|
||||
0x66, 0x41, 0xc7, 0x46, 0x02, 0x3d, 0x3d, //0x00000425 movw $15677, $2(%r14)
|
||||
//0x0000042c LBB0_24
|
||||
0x49, 0x83, 0xc6, 0x04, //0x0000042c addq $4, %r14
|
||||
0xe9, 0x0d, 0x00, 0x00, 0x00, //0x00000430 jmp LBB0_25
|
||||
//0x00000435 LBB0_19
|
||||
0x49, 0x83, 0xc6, 0x03, //0x00000435 addq $3, %r14
|
||||
0xe9, 0x04, 0x00, 0x00, 0x00, //0x00000439 jmp LBB0_25
|
||||
//0x0000043e LBB0_22
|
||||
0x49, 0x83, 0xc6, 0x02, //0x0000043e addq $2, %r14
|
||||
//0x00000442 LBB0_25
|
||||
0x4d, 0x29, 0xc6, //0x00000442 subq %r8, %r14
|
||||
0x4c, 0x01, 0x77, 0x08, //0x00000445 addq %r14, $8(%rdi)
|
||||
//0x00000449 LBB0_26
|
||||
0x5b, //0x00000449 popq %rbx
|
||||
0x41, 0x5c, //0x0000044a popq %r12
|
||||
0x41, 0x5e, //0x0000044c popq %r14
|
||||
0x41, 0x5f, //0x0000044e popq %r15
|
||||
0x5d, //0x00000450 popq %rbp
|
||||
0xc5, 0xf8, 0x77, //0x00000451 vzeroupper
|
||||
0xc3, //0x00000454 retq
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //0x00000455 .p2align 4, 0x00
|
||||
//0x00000460 _TabEncodeCharsetStd
|
||||
0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, //0x00000460 QUAD $0x4847464544434241; QUAD $0x504f4e4d4c4b4a49 // .ascii 16, 'ABCDEFGHIJKLMNOP'
|
||||
0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, //0x00000470 QUAD $0x5857565554535251; QUAD $0x6665646362615a59 // .ascii 16, 'QRSTUVWXYZabcdef'
|
||||
0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, //0x00000480 QUAD $0x6e6d6c6b6a696867; QUAD $0x767574737271706f // .ascii 16, 'ghijklmnopqrstuv'
|
||||
0x77, 0x78, 0x79, 0x7a, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x2b, 0x2f, //0x00000490 QUAD $0x333231307a797877; QUAD $0x2f2b393837363534 // .ascii 16, 'wxyz0123456789+/'
|
||||
//0x000004a0 .p2align 4, 0x00
|
||||
//0x000004a0 _TabEncodeCharsetURL
|
||||
0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, //0x000004a0 QUAD $0x4847464544434241; QUAD $0x504f4e4d4c4b4a49 // .ascii 16, 'ABCDEFGHIJKLMNOP'
|
||||
0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, //0x000004b0 QUAD $0x5857565554535251; QUAD $0x6665646362615a59 // .ascii 16, 'QRSTUVWXYZabcdef'
|
||||
0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, //0x000004c0 QUAD $0x6e6d6c6b6a696867; QUAD $0x767574737271706f // .ascii 16, 'ghijklmnopqrstuv'
|
||||
0x77, 0x78, 0x79, 0x7a, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x2d, 0x5f, //0x000004d0 QUAD $0x333231307a797877; QUAD $0x5f2d393837363534 // .ascii 16, 'wxyz0123456789-_'
|
||||
}
|
||||
|
||||
29
vendor/github.com/cloudwego/base64x/internal/native/avx2/native_export.go
generated
vendored
Normal file
29
vendor/github.com/cloudwego/base64x/internal/native/avx2/native_export.go
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
|
||||
// Code generated by Bash, DO NOT EDIT.
|
||||
|
||||
/*
|
||||
* Copyright 2025 ByteDance Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package avx2
|
||||
|
||||
import (
|
||||
`github.com/bytedance/sonic/loader`
|
||||
)
|
||||
|
||||
func Use() {
|
||||
loader.WrapGoC(_text_b64encode, _cfunc_b64encode, []loader.GoC{{"_b64encode", &S_b64encode, &F_b64encode}}, "avx2", "avx2/b64encode.c")
|
||||
loader.WrapGoC(_text_b64decode, _cfunc_b64decode, []loader.GoC{{"_b64decode", &S_b64decode, &F_b64decode}}, "avx2", "avx2/b64decode.c")
|
||||
}
|
||||
35
vendor/github.com/cloudwego/base64x/internal/native/b64decode.tmpl
generated
vendored
Normal file
35
vendor/github.com/cloudwego/base64x/internal/native/b64decode.tmpl
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
// Code generated by Bash, DO NOT EDIT.
|
||||
|
||||
/*
|
||||
* Copyright 2025 ByteDance Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package {{PACKAGE}}
|
||||
|
||||
import (
|
||||
`unsafe`
|
||||
|
||||
`github.com/cloudwego/base64x/internal/rt`
|
||||
)
|
||||
|
||||
var F_b64decode func(out unsafe.Pointer, src unsafe.Pointer, len int, mod int) (ret int)
|
||||
|
||||
var S_b64decode uintptr
|
||||
|
||||
//go:nosplit
|
||||
func B64decode(out *[]byte, src unsafe.Pointer, len int, mode int) (ret int) {
|
||||
return F_b64decode(rt.NoEscape(unsafe.Pointer(out)), rt.NoEscape(unsafe.Pointer(src)), len, mode)
|
||||
}
|
||||
|
||||
34
vendor/github.com/cloudwego/base64x/internal/native/b64encode.tmpl
generated
vendored
Normal file
34
vendor/github.com/cloudwego/base64x/internal/native/b64encode.tmpl
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
// Code generated by Bash, DO NOT EDIT.
|
||||
|
||||
/*
|
||||
* Copyright 2025 ByteDance Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package {{PACKAGE}}
|
||||
|
||||
import (
|
||||
`unsafe`
|
||||
|
||||
`github.com/cloudwego/base64x/internal/rt`
|
||||
)
|
||||
|
||||
var F_b64encode func(out unsafe.Pointer, src unsafe.Pointer, mod int)
|
||||
|
||||
var S_b64encode uintptr
|
||||
|
||||
//go:nosplit
|
||||
func B64encode(out *[]byte, src *[]byte, mode int) {
|
||||
F_b64encode(rt.NoEscape(unsafe.Pointer(out)), rt.NoEscape(unsafe.Pointer(src)), mode)
|
||||
}
|
||||
63
vendor/github.com/cloudwego/base64x/internal/native/dispatch.go
generated
vendored
Normal file
63
vendor/github.com/cloudwego/base64x/internal/native/dispatch.go
generated
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
package native
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
|
||||
`github.com/klauspost/cpuid/v2`
|
||||
"github.com/cloudwego/base64x/internal/rt"
|
||||
"github.com/cloudwego/base64x/internal/native/avx2"
|
||||
"github.com/cloudwego/base64x/internal/native/sse"
|
||||
)
|
||||
|
||||
var (
|
||||
hasAVX2 = cpuid.CPU.Has(cpuid.AVX2)
|
||||
hasSSE = cpuid.CPU.Has(cpuid.SSE)
|
||||
)
|
||||
|
||||
var (
|
||||
S_b64decode uintptr
|
||||
S_b64encode uintptr
|
||||
)
|
||||
|
||||
var (
|
||||
F_b64decode func(out unsafe.Pointer, src unsafe.Pointer, len int, mod int) (ret int)
|
||||
F_b64encode func(out unsafe.Pointer, src unsafe.Pointer, mod int)
|
||||
)
|
||||
|
||||
func useAVX2() {
|
||||
avx2.Use()
|
||||
S_b64decode = avx2.S_b64decode
|
||||
S_b64encode = avx2.S_b64encode
|
||||
|
||||
F_b64decode = avx2.F_b64decode
|
||||
F_b64encode = avx2.F_b64encode
|
||||
}
|
||||
|
||||
func useSSE() {
|
||||
sse.Use()
|
||||
S_b64decode = sse.S_b64decode
|
||||
S_b64encode = sse.S_b64encode
|
||||
|
||||
F_b64decode = sse.F_b64decode
|
||||
F_b64encode = sse.F_b64encode
|
||||
}
|
||||
|
||||
//go:nosplit
|
||||
func B64Decode(out *[]byte, src unsafe.Pointer, len int, mod int) (ret int) {
|
||||
return F_b64decode(rt.NoEscape(unsafe.Pointer(out)), rt.NoEscape(unsafe.Pointer(src)), len, mod)
|
||||
}
|
||||
|
||||
//go:nosplit
|
||||
func B64Encode(out *[]byte, src *[]byte, mod int) {
|
||||
F_b64encode(rt.NoEscape(unsafe.Pointer(out)), rt.NoEscape(unsafe.Pointer(src)), mod)
|
||||
}
|
||||
|
||||
func init() {
|
||||
if hasAVX2 {
|
||||
useAVX2()
|
||||
} else if hasSSE {
|
||||
useSSE()
|
||||
} else {
|
||||
panic("Unsupported CPU, lacks of AVX2 or SSE CPUID Flag. maybe it's too old to run Sonic.")
|
||||
}
|
||||
}
|
||||
29
vendor/github.com/cloudwego/base64x/internal/native/native_export.tmpl
generated
vendored
Normal file
29
vendor/github.com/cloudwego/base64x/internal/native/native_export.tmpl
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
|
||||
// Code generated by Bash, DO NOT EDIT.
|
||||
|
||||
/*
|
||||
* Copyright 2025 ByteDance Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package {{PACKAGE}}
|
||||
|
||||
import (
|
||||
`github.com/bytedance/sonic/loader`
|
||||
)
|
||||
|
||||
func Use() {
|
||||
loader.WrapGoC(_text_b64encode, _cfunc_b64encode, []loader.GoC{{"_b64encode", &S_b64encode, &F_b64encode}}, "{{PACKAGE}}", "{{PACKAGE}}/b64encode.c")
|
||||
loader.WrapGoC(_text_b64decode, _cfunc_b64decode, []loader.GoC{{"_b64decode", &S_b64decode, &F_b64decode}}, "{{PACKAGE}}", "{{PACKAGE}}/b64decode.c")
|
||||
}
|
||||
35
vendor/github.com/cloudwego/base64x/internal/native/sse/b64decode.go
generated
vendored
Normal file
35
vendor/github.com/cloudwego/base64x/internal/native/sse/b64decode.go
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
// Code generated by Bash, DO NOT EDIT.
|
||||
|
||||
/*
|
||||
* Copyright 2025 ByteDance Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package sse
|
||||
|
||||
import (
|
||||
`unsafe`
|
||||
|
||||
`github.com/cloudwego/base64x/internal/rt`
|
||||
)
|
||||
|
||||
var F_b64decode func(out unsafe.Pointer, src unsafe.Pointer, len int, mod int) (ret int)
|
||||
|
||||
var S_b64decode uintptr
|
||||
|
||||
//go:nosplit
|
||||
func B64decode(out *[]byte, src unsafe.Pointer, len int, mode int) (ret int) {
|
||||
return F_b64decode(rt.NoEscape(unsafe.Pointer(out)), rt.NoEscape(unsafe.Pointer(src)), len, mode)
|
||||
}
|
||||
|
||||
45
vendor/github.com/cloudwego/base64x/internal/native/sse/b64decode_subr.go
generated
vendored
Normal file
45
vendor/github.com/cloudwego/base64x/internal/native/sse/b64decode_subr.go
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
// +build !noasm !appengine
|
||||
// Code generated by asm2asm, DO NOT EDIT.
|
||||
|
||||
package sse
|
||||
|
||||
import (
|
||||
`github.com/bytedance/sonic/loader`
|
||||
)
|
||||
|
||||
const (
|
||||
_entry__b64decode = 0
|
||||
)
|
||||
|
||||
const (
|
||||
_stack__b64decode = 144
|
||||
)
|
||||
|
||||
const (
|
||||
_size__b64decode = 9968
|
||||
)
|
||||
|
||||
var (
|
||||
_pcsp__b64decode = [][2]uint32{
|
||||
{0x1, 0},
|
||||
{0x6, 8},
|
||||
{0x8, 16},
|
||||
{0xa, 24},
|
||||
{0xc, 32},
|
||||
{0xd, 40},
|
||||
{0x11, 48},
|
||||
{0x26e1, 144},
|
||||
{0x26e2, 48},
|
||||
{0x26e4, 40},
|
||||
{0x26e6, 32},
|
||||
{0x26e8, 24},
|
||||
{0x26ea, 16},
|
||||
{0x26eb, 8},
|
||||
{0x26f0, 0},
|
||||
}
|
||||
)
|
||||
|
||||
var _cfunc_b64decode = []loader.CFunc{
|
||||
{"_b64decode_entry", 0, _entry__b64decode, 0, nil},
|
||||
{"_b64decode", _entry__b64decode, _size__b64decode, _stack__b64decode, _pcsp__b64decode},
|
||||
}
|
||||
2791
vendor/github.com/cloudwego/base64x/internal/native/sse/b64decode_text_amd64.go
generated
vendored
Normal file
2791
vendor/github.com/cloudwego/base64x/internal/native/sse/b64decode_text_amd64.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
34
vendor/github.com/cloudwego/base64x/internal/native/sse/b64encode.go
generated
vendored
Normal file
34
vendor/github.com/cloudwego/base64x/internal/native/sse/b64encode.go
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
// Code generated by Bash, DO NOT EDIT.
|
||||
|
||||
/*
|
||||
* Copyright 2025 ByteDance Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package sse
|
||||
|
||||
import (
|
||||
`unsafe`
|
||||
|
||||
`github.com/cloudwego/base64x/internal/rt`
|
||||
)
|
||||
|
||||
var F_b64encode func(out unsafe.Pointer, src unsafe.Pointer, mod int)
|
||||
|
||||
var S_b64encode uintptr
|
||||
|
||||
//go:nosplit
|
||||
func B64encode(out *[]byte, src *[]byte, mode int) {
|
||||
F_b64encode(rt.NoEscape(unsafe.Pointer(out)), rt.NoEscape(unsafe.Pointer(src)), mode)
|
||||
}
|
||||
39
vendor/github.com/cloudwego/base64x/internal/native/sse/b64encode_subr.go
generated
vendored
Normal file
39
vendor/github.com/cloudwego/base64x/internal/native/sse/b64encode_subr.go
generated
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
// +build !noasm !appengine
|
||||
// Code generated by asm2asm, DO NOT EDIT.
|
||||
|
||||
package sse
|
||||
|
||||
import (
|
||||
`github.com/bytedance/sonic/loader`
|
||||
)
|
||||
|
||||
const (
|
||||
_entry__b64encode = 0
|
||||
)
|
||||
|
||||
const (
|
||||
_stack__b64encode = 32
|
||||
)
|
||||
|
||||
const (
|
||||
_size__b64encode = 448
|
||||
)
|
||||
|
||||
var (
|
||||
_pcsp__b64encode = [][2]uint32{
|
||||
{0x1, 0},
|
||||
{0x6, 8},
|
||||
{0x8, 16},
|
||||
{0x9, 24},
|
||||
{0x1ab, 32},
|
||||
{0x1ad, 24},
|
||||
{0x1af, 16},
|
||||
{0x1b0, 8},
|
||||
{0x1c0, 0},
|
||||
}
|
||||
)
|
||||
|
||||
var _cfunc_b64encode = []loader.CFunc{
|
||||
{"_b64encode_entry", 0, _entry__b64encode, 0, nil},
|
||||
{"_b64encode", _entry__b64encode, _size__b64encode, _stack__b64encode, _pcsp__b64encode},
|
||||
}
|
||||
148
vendor/github.com/cloudwego/base64x/internal/native/sse/b64encode_text_amd64.go
generated
vendored
Normal file
148
vendor/github.com/cloudwego/base64x/internal/native/sse/b64encode_text_amd64.go
generated
vendored
Normal file
@@ -0,0 +1,148 @@
|
||||
// +build amd64
|
||||
// Code generated by asm2asm, DO NOT EDIT.
|
||||
|
||||
package sse
|
||||
|
||||
var _text_b64encode = []byte{
|
||||
// .p2align 4, 0x90
|
||||
// _b64encode
|
||||
0x55, // pushq %rbp
|
||||
0x48, 0x89, 0xe5, //0x00000001 movq %rsp, %rbp
|
||||
0x41, 0x57, //0x00000004 pushq %r15
|
||||
0x41, 0x56, //0x00000006 pushq %r14
|
||||
0x53, //0x00000008 pushq %rbx
|
||||
0x4c, 0x8b, 0x4e, 0x08, //0x00000009 movq $8(%rsi), %r9
|
||||
0x4d, 0x85, 0xc9, //0x0000000d testq %r9, %r9
|
||||
0x0f, 0x84, 0x94, 0x01, 0x00, 0x00, //0x00000010 je LBB0_15
|
||||
0x4c, 0x8b, 0x3e, //0x00000016 movq (%rsi), %r15
|
||||
0x4c, 0x8b, 0x07, //0x00000019 movq (%rdi), %r8
|
||||
0x4c, 0x03, 0x47, 0x08, //0x0000001c addq $8(%rdi), %r8
|
||||
0x4d, 0x01, 0xf9, //0x00000020 addq %r15, %r9
|
||||
0xf6, 0xc2, 0x01, //0x00000023 testb $1, %dl
|
||||
0x48, 0x8d, 0x0d, 0x93, 0x01, 0x00, 0x00, //0x00000026 leaq $403(%rip), %rcx /* _TabEncodeCharsetStd+0(%rip) */
|
||||
0x4c, 0x8d, 0x1d, 0xcc, 0x01, 0x00, 0x00, //0x0000002d leaq $460(%rip), %r11 /* _TabEncodeCharsetURL+0(%rip) */
|
||||
0x4c, 0x0f, 0x44, 0xd9, //0x00000034 cmoveq %rcx, %r11
|
||||
0x4d, 0x8d, 0x51, 0xfc, //0x00000038 leaq $-4(%r9), %r10
|
||||
0x4d, 0x89, 0xc6, //0x0000003c movq %r8, %r14
|
||||
0x4d, 0x39, 0xfa, //0x0000003f cmpq %r15, %r10
|
||||
0x0f, 0x82, 0x5e, 0x00, 0x00, 0x00, //0x00000042 jb LBB0_3
|
||||
0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, //0x00000048 .p2align 4, 0x90
|
||||
//0x00000050 LBB0_2
|
||||
0x41, 0x8b, 0x37, //0x00000050 movl (%r15), %esi
|
||||
0x0f, 0xce, //0x00000053 bswapl %esi
|
||||
0x48, 0x89, 0xf3, //0x00000055 movq %rsi, %rbx
|
||||
0x48, 0xc1, 0xeb, 0x1a, //0x00000058 shrq $26, %rbx
|
||||
0x89, 0xf1, //0x0000005c movl %esi, %ecx
|
||||
0xc1, 0xe9, 0x14, //0x0000005e shrl $20, %ecx
|
||||
0x83, 0xe1, 0x3f, //0x00000061 andl $63, %ecx
|
||||
0x89, 0xf0, //0x00000064 movl %esi, %eax
|
||||
0xc1, 0xe8, 0x0e, //0x00000066 shrl $14, %eax
|
||||
0x83, 0xe0, 0x3f, //0x00000069 andl $63, %eax
|
||||
0xc1, 0xee, 0x08, //0x0000006c shrl $8, %esi
|
||||
0x83, 0xe6, 0x3f, //0x0000006f andl $63, %esi
|
||||
0x49, 0x83, 0xc7, 0x03, //0x00000072 addq $3, %r15
|
||||
0x41, 0x0f, 0xb6, 0x1c, 0x1b, //0x00000076 movzbl (%r11,%rbx), %ebx
|
||||
0x41, 0x88, 0x1e, //0x0000007b movb %bl, (%r14)
|
||||
0x41, 0x0f, 0xb6, 0x0c, 0x0b, //0x0000007e movzbl (%r11,%rcx), %ecx
|
||||
0x41, 0x88, 0x4e, 0x01, //0x00000083 movb %cl, $1(%r14)
|
||||
0x41, 0x0f, 0xb6, 0x04, 0x03, //0x00000087 movzbl (%r11,%rax), %eax
|
||||
0x41, 0x88, 0x46, 0x02, //0x0000008c movb %al, $2(%r14)
|
||||
0x41, 0x0f, 0xb6, 0x04, 0x33, //0x00000090 movzbl (%r11,%rsi), %eax
|
||||
0x41, 0x88, 0x46, 0x03, //0x00000095 movb %al, $3(%r14)
|
||||
0x49, 0x83, 0xc6, 0x04, //0x00000099 addq $4, %r14
|
||||
0x4d, 0x39, 0xd7, //0x0000009d cmpq %r10, %r15
|
||||
0x0f, 0x86, 0xaa, 0xff, 0xff, 0xff, //0x000000a0 jbe LBB0_2
|
||||
//0x000000a6 LBB0_3
|
||||
0x4d, 0x29, 0xf9, //0x000000a6 subq %r15, %r9
|
||||
0x45, 0x0f, 0xb6, 0x17, //0x000000a9 movzbl (%r15), %r10d
|
||||
0x49, 0x83, 0xf9, 0x01, //0x000000ad cmpq $1, %r9
|
||||
0x0f, 0x84, 0xa8, 0x00, 0x00, 0x00, //0x000000b1 je LBB0_10
|
||||
0x4c, 0x89, 0xd6, //0x000000b7 movq %r10, %rsi
|
||||
0x48, 0xc1, 0xe6, 0x10, //0x000000ba shlq $16, %rsi
|
||||
0x49, 0x83, 0xf9, 0x02, //0x000000be cmpq $2, %r9
|
||||
0x0f, 0x84, 0x54, 0x00, 0x00, 0x00, //0x000000c2 je LBB0_7
|
||||
0x49, 0x83, 0xf9, 0x03, //0x000000c8 cmpq $3, %r9
|
||||
0x0f, 0x85, 0xd1, 0x00, 0x00, 0x00, //0x000000cc jne LBB0_14
|
||||
0x41, 0x0f, 0xb6, 0x57, 0x02, //0x000000d2 movzbl $2(%r15), %edx
|
||||
0x09, 0xd6, //0x000000d7 orl %edx, %esi
|
||||
0x41, 0x0f, 0xb6, 0x47, 0x01, //0x000000d9 movzbl $1(%r15), %eax
|
||||
0xc1, 0xe0, 0x08, //0x000000de shll $8, %eax
|
||||
0x09, 0xf0, //0x000000e1 orl %esi, %eax
|
||||
0x49, 0xc1, 0xea, 0x02, //0x000000e3 shrq $2, %r10
|
||||
0x43, 0x8a, 0x0c, 0x13, //0x000000e7 movb (%r11,%r10), %cl
|
||||
0x41, 0x88, 0x0e, //0x000000eb movb %cl, (%r14)
|
||||
0x89, 0xc1, //0x000000ee movl %eax, %ecx
|
||||
0xc1, 0xe9, 0x0c, //0x000000f0 shrl $12, %ecx
|
||||
0x83, 0xe1, 0x3f, //0x000000f3 andl $63, %ecx
|
||||
0x41, 0x8a, 0x0c, 0x0b, //0x000000f6 movb (%r11,%rcx), %cl
|
||||
0x41, 0x88, 0x4e, 0x01, //0x000000fa movb %cl, $1(%r14)
|
||||
0xc1, 0xe8, 0x06, //0x000000fe shrl $6, %eax
|
||||
0x83, 0xe0, 0x3f, //0x00000101 andl $63, %eax
|
||||
0x41, 0x8a, 0x04, 0x03, //0x00000104 movb (%r11,%rax), %al
|
||||
0x41, 0x88, 0x46, 0x02, //0x00000108 movb %al, $2(%r14)
|
||||
0x83, 0xe2, 0x3f, //0x0000010c andl $63, %edx
|
||||
0x41, 0x8a, 0x04, 0x13, //0x0000010f movb (%r11,%rdx), %al
|
||||
0x41, 0x88, 0x46, 0x03, //0x00000113 movb %al, $3(%r14)
|
||||
0xe9, 0x71, 0x00, 0x00, 0x00, //0x00000117 jmp LBB0_13
|
||||
//0x0000011c LBB0_7
|
||||
0x41, 0x0f, 0xb6, 0x47, 0x01, //0x0000011c movzbl $1(%r15), %eax
|
||||
0x89, 0xc1, //0x00000121 movl %eax, %ecx
|
||||
0xc1, 0xe1, 0x08, //0x00000123 shll $8, %ecx
|
||||
0x09, 0xf1, //0x00000126 orl %esi, %ecx
|
||||
0x49, 0xc1, 0xea, 0x02, //0x00000128 shrq $2, %r10
|
||||
0x43, 0x8a, 0x1c, 0x13, //0x0000012c movb (%r11,%r10), %bl
|
||||
0x41, 0x88, 0x1e, //0x00000130 movb %bl, (%r14)
|
||||
0xc1, 0xe9, 0x0c, //0x00000133 shrl $12, %ecx
|
||||
0x83, 0xe1, 0x3f, //0x00000136 andl $63, %ecx
|
||||
0x41, 0x8a, 0x0c, 0x0b, //0x00000139 movb (%r11,%rcx), %cl
|
||||
0x41, 0x88, 0x4e, 0x01, //0x0000013d movb %cl, $1(%r14)
|
||||
0x83, 0xe0, 0x0f, //0x00000141 andl $15, %eax
|
||||
0x41, 0x8a, 0x04, 0x83, //0x00000144 movb (%r11,%rax,4), %al
|
||||
0x41, 0x88, 0x46, 0x02, //0x00000148 movb %al, $2(%r14)
|
||||
0xf6, 0xc2, 0x02, //0x0000014c testb $2, %dl
|
||||
0x0f, 0x85, 0x41, 0x00, 0x00, 0x00, //0x0000014f jne LBB0_8
|
||||
0x41, 0xc6, 0x46, 0x03, 0x3d, //0x00000155 movb $61, $3(%r14)
|
||||
0xe9, 0x2e, 0x00, 0x00, 0x00, //0x0000015a jmp LBB0_13
|
||||
//0x0000015f LBB0_10
|
||||
0x4c, 0x89, 0xd0, //0x0000015f movq %r10, %rax
|
||||
0x48, 0xc1, 0xe8, 0x02, //0x00000162 shrq $2, %rax
|
||||
0x41, 0x8a, 0x04, 0x03, //0x00000166 movb (%r11,%rax), %al
|
||||
0x41, 0x88, 0x06, //0x0000016a movb %al, (%r14)
|
||||
0x41, 0xc1, 0xe2, 0x04, //0x0000016d shll $4, %r10d
|
||||
0x41, 0x83, 0xe2, 0x30, //0x00000171 andl $48, %r10d
|
||||
0x43, 0x8a, 0x04, 0x13, //0x00000175 movb (%r11,%r10), %al
|
||||
0x41, 0x88, 0x46, 0x01, //0x00000179 movb %al, $1(%r14)
|
||||
0xf6, 0xc2, 0x02, //0x0000017d testb $2, %dl
|
||||
0x0f, 0x85, 0x19, 0x00, 0x00, 0x00, //0x00000180 jne LBB0_11
|
||||
0x66, 0x41, 0xc7, 0x46, 0x02, 0x3d, 0x3d, //0x00000186 movw $15677, $2(%r14)
|
||||
//0x0000018d LBB0_13
|
||||
0x49, 0x83, 0xc6, 0x04, //0x0000018d addq $4, %r14
|
||||
0xe9, 0x0d, 0x00, 0x00, 0x00, //0x00000191 jmp LBB0_14
|
||||
//0x00000196 LBB0_8
|
||||
0x49, 0x83, 0xc6, 0x03, //0x00000196 addq $3, %r14
|
||||
0xe9, 0x04, 0x00, 0x00, 0x00, //0x0000019a jmp LBB0_14
|
||||
//0x0000019f LBB0_11
|
||||
0x49, 0x83, 0xc6, 0x02, //0x0000019f addq $2, %r14
|
||||
//0x000001a3 LBB0_14
|
||||
0x4d, 0x29, 0xc6, //0x000001a3 subq %r8, %r14
|
||||
0x4c, 0x01, 0x77, 0x08, //0x000001a6 addq %r14, $8(%rdi)
|
||||
//0x000001aa LBB0_15
|
||||
0x5b, //0x000001aa popq %rbx
|
||||
0x41, 0x5e, //0x000001ab popq %r14
|
||||
0x41, 0x5f, //0x000001ad popq %r15
|
||||
0x5d, //0x000001af popq %rbp
|
||||
0xc3, //0x000001b0 retq
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //0x000001b1 .p2align 4, 0x00
|
||||
//0x000001c0 _TabEncodeCharsetStd
|
||||
0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, //0x000001c0 QUAD $0x4847464544434241; QUAD $0x504f4e4d4c4b4a49 // .ascii 16, 'ABCDEFGHIJKLMNOP'
|
||||
0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, //0x000001d0 QUAD $0x5857565554535251; QUAD $0x6665646362615a59 // .ascii 16, 'QRSTUVWXYZabcdef'
|
||||
0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, //0x000001e0 QUAD $0x6e6d6c6b6a696867; QUAD $0x767574737271706f // .ascii 16, 'ghijklmnopqrstuv'
|
||||
0x77, 0x78, 0x79, 0x7a, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x2b, 0x2f, //0x000001f0 QUAD $0x333231307a797877; QUAD $0x2f2b393837363534 // .ascii 16, 'wxyz0123456789+/'
|
||||
//0x00000200 .p2align 4, 0x00
|
||||
//0x00000200 _TabEncodeCharsetURL
|
||||
0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, //0x00000200 QUAD $0x4847464544434241; QUAD $0x504f4e4d4c4b4a49 // .ascii 16, 'ABCDEFGHIJKLMNOP'
|
||||
0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, //0x00000210 QUAD $0x5857565554535251; QUAD $0x6665646362615a59 // .ascii 16, 'QRSTUVWXYZabcdef'
|
||||
0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, //0x00000220 QUAD $0x6e6d6c6b6a696867; QUAD $0x767574737271706f // .ascii 16, 'ghijklmnopqrstuv'
|
||||
0x77, 0x78, 0x79, 0x7a, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x2d, 0x5f, //0x00000230 QUAD $0x333231307a797877; QUAD $0x5f2d393837363534 // .ascii 16, 'wxyz0123456789-_'
|
||||
}
|
||||
|
||||
29
vendor/github.com/cloudwego/base64x/internal/native/sse/native_export.go
generated
vendored
Normal file
29
vendor/github.com/cloudwego/base64x/internal/native/sse/native_export.go
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
|
||||
// Code generated by Bash, DO NOT EDIT.
|
||||
|
||||
/*
|
||||
* Copyright 2025 ByteDance Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package sse
|
||||
|
||||
import (
|
||||
`github.com/bytedance/sonic/loader`
|
||||
)
|
||||
|
||||
func Use() {
|
||||
loader.WrapGoC(_text_b64encode, _cfunc_b64encode, []loader.GoC{{"_b64encode", &S_b64encode, &F_b64encode}}, "sse", "sse/b64encode.c")
|
||||
loader.WrapGoC(_text_b64decode, _cfunc_b64decode, []loader.GoC{{"_b64decode", &S_b64decode, &F_b64decode}}, "sse", "sse/b64decode.c")
|
||||
}
|
||||
20
vendor/github.com/cloudwego/base64x/internal/rt/asm_amd64.s
generated
vendored
Normal file
20
vendor/github.com/cloudwego/base64x/internal/rt/asm_amd64.s
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
// +build !noasm !appengine
|
||||
// Code generated by asm2asm, DO NOT EDIT·
|
||||
|
||||
#include "go_asm.h"
|
||||
#include "funcdata.h"
|
||||
#include "textflag.h"
|
||||
|
||||
TEXT ·MoreStack(SB), NOSPLIT, $0 - 8
|
||||
NO_LOCAL_POINTERS
|
||||
_entry:
|
||||
MOVQ (TLS), R14
|
||||
MOVQ size+0(FP), R12
|
||||
NOTQ R12
|
||||
LEAQ (SP)(R12*1), R12
|
||||
CMPQ R12, 16(R14)
|
||||
JBE _stack_grow
|
||||
RET
|
||||
_stack_grow:
|
||||
CALL runtime·morestack_noctxt<>(SB)
|
||||
JMP _entry
|
||||
10
vendor/github.com/cloudwego/base64x/internal/rt/asm_arm64.s
generated
vendored
Normal file
10
vendor/github.com/cloudwego/base64x/internal/rt/asm_arm64.s
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
// +build !noasm !appengine
|
||||
// Code generated by asm2asm, DO NOT EDIT.
|
||||
|
||||
#include "go_asm.h"
|
||||
#include "funcdata.h"
|
||||
#include "textflag.h"
|
||||
|
||||
TEXT ·MoreStack(SB), NOSPLIT, $0 - 8
|
||||
NO_LOCAL_POINTERS
|
||||
RET
|
||||
42
vendor/github.com/cloudwego/base64x/internal/rt/fastmem.go
generated
vendored
Normal file
42
vendor/github.com/cloudwego/base64x/internal/rt/fastmem.go
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Copyright 2021 ByteDance Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package rt
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
|
||||
// NoEscape hides a pointer from escape analysis. NoEscape is
|
||||
// the identity function but escape analysis doesn't think the
|
||||
// output depends on the input. NoEscape is inlined and currently
|
||||
// compiles down to zero instructions.
|
||||
// USE CAREFULLY!
|
||||
//go:nosplit
|
||||
//goland:noinspection GoVetUnsafePointer
|
||||
func NoEscape(p unsafe.Pointer) unsafe.Pointer {
|
||||
x := uintptr(p)
|
||||
return unsafe.Pointer(x ^ 0)
|
||||
}
|
||||
|
||||
//go:nosplit
|
||||
func MoreStack(size uintptr)
|
||||
|
||||
//go:nosplit
|
||||
func Add(ptr unsafe.Pointer, off uintptr) unsafe.Pointer {
|
||||
return unsafe.Pointer(uintptr(ptr) + off)
|
||||
}
|
||||
Reference in New Issue
Block a user