Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TLMSP OpenSSL
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CYBER - Cyber Security
TS 103 523 MSP
TLMSP
TLMSP OpenSSL
Commits
4b450519
Commit
4b450519
authored
19 years ago
by
Andy Polyakov
Browse files
Options
Downloads
Patches
Plain Diff
x86_64 assembler translator update.
parent
9e5790ce
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
crypto/perlasm/x86_64-xlate.pl
+19
-10
19 additions, 10 deletions
crypto/perlasm/x86_64-xlate.pl
with
19 additions
and
10 deletions
crypto/perlasm/x86_64-xlate.pl
+
19
−
10
View file @
4b450519
...
...
@@ -30,15 +30,18 @@
# stack frame allocation. If volatile storage is actually required
# that is. If not, just leave the stack as is.
# 3. Functions tagged with ".type name,@function" get crafted with
# unified Win
dows
prologue and epilogue automatically. If you want
# unified Win
64
prologue and epilogue automatically. If you want
# to take care of ABI differences yourself, tag functions as
# ".type name,@abi-omnipotent."
# 4. As minor optimization you can specify number of input arguments
# as ".type name,@function,N." Keep in mind that if N is larger
# than 6, then you *have to* write "abi-omnipotent" code, because
# it can't be resolved with unified prologue.
# 5. Name local labels as .L*.
# 6. Don't use repret, it's generated automatically.
# ".type name,@abi-omnipotent" instead.
# 4. To optimize the Win64 prologue you can specify number of input
# arguments as ".type name,@function,N." Keep in mind that if N is
# larger than 6, then you *have to* write "abi-omnipotent" code,
# because >6 cases can't be addressed with unified prologue.
# 5. Name local labels as .L*, do *not* use dynamic labels such as 1:
# (sorry about latter).
# 6. Don't use [or hand-code with .byte] "rep ret." "ret" mnemonic is
# required to identify the spots, where to inject Win64 epilogue!
# But on the pros, it's then prefixed with rep automatically:-)
my
$output
=
shift
;
open
STDOUT
,"
>
$output
"
||
die
"
can't open
$output
: $!
";
...
...
@@ -143,6 +146,11 @@ my $current_function;
my
$sz
=
shift
;
if
(
!
$masm
)
{
# elder GNU assembler insists on 64-bit EAs:-(
# on pros side, this results in more compact code:-)
$self
->
{
index
}
=~
s/^[er](.?[0-9xp])[d]?$/r\1/
;
$self
->
{
base
}
=~
s/^[er](.?[0-9xp])[d]?$/r\1/
;
if
(
defined
(
$self
->
{
index
}))
{
sprintf
"
%s(%%%s,%%%s,%d)
",
$self
->
{
label
},
$self
->
{
base
},
$self
->
{
index
},
$self
->
{
scale
};
...
...
@@ -340,8 +348,9 @@ while($line=<>) {
chomp
(
$line
);
$line
=~
s/\[#!].*$//
;
# get rid of comments...
$line
=~
s/^\s+//
;
# ... and skip white spaces
$line
=~
s|[#!].*$||
;
# get rid of asm-style comments...
$line
=~
s|/\*.*\*/||
;
# ... and C-style comments...
$line
=~
s|^\s+||
;
# ... and skip white spaces in beginning
undef
$label
;
undef
$opcode
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment