PA-RISC assembler: missing symbol and typos.

This commit is contained in:
Andy Polyakov 2009-12-28 16:13:35 +00:00
parent 76774c5ea1
commit 3fc2efd241
3 changed files with 15 additions and 4 deletions

View file

@ -894,7 +894,7 @@ my $ldd = sub {
{ my $opcode=(0x03<<26)|($2<<21)|($1<<16)|(3<<6)|$3; { my $opcode=(0x03<<26)|($2<<21)|($1<<16)|(3<<6)|$3;
sprintf "\t.WORD\t0x%08x\t; %s",$opcode,$orig; sprintf "\t.WORD\t0x%08x\t; %s",$opcode,$orig;
} }
elsif ($args =~ /([\-0-9]+)\(%r([0-9]+)\),%r([0-9]+)/) # format 5 elsif ($args =~ /(\-?[0-9]+)\(%r([0-9]+)\),%r([0-9]+)/) # format 5
{ my $opcode=(0x03<<26)|($2<<21)|(1<<12)|(3<<6)|$3; { my $opcode=(0x03<<26)|($2<<21)|(1<<12)|(3<<6)|$3;
$opcode|=(($1&0xF)<<17)|(($1&0x10)<<12); # encode offset $opcode|=(($1&0xF)<<17)|(($1&0x10)<<12); # encode offset
$opcode|=(1<<5) if ($mod =~ /^,m/); $opcode|=(1<<5) if ($mod =~ /^,m/);
@ -908,7 +908,7 @@ my $std = sub {
my ($mod,$args) = @_; my ($mod,$args) = @_;
my $orig = "std$mod\t$args"; my $orig = "std$mod\t$args";
if ($args =~ /%r([0-9]+),([\-0-9]+)\(%r([0-9]+)\)/) # format 6 if ($args =~ /%r([0-9]+),(\-?[0-9]+)\(%r([0-9]+)\)/) # format 6
{ my $opcode=(0x03<<26)|($3<<21)|($1<<16)|(1<<12)|(0xB<<6); { my $opcode=(0x03<<26)|($3<<21)|($1<<16)|(1<<12)|(0xB<<6);
$opcode|=(($2&0xF)<<1)|(($2&0x10)>>4); # encode offset $opcode|=(($2&0xF)<<1)|(($2&0x10)>>4); # encode offset
$opcode|=(1<<5) if ($mod =~ /^,m/); $opcode|=(1<<5) if ($mod =~ /^,m/);

View file

@ -23,6 +23,17 @@ $code=<<___;
.SPACE \$TEXT\$ .SPACE \$TEXT\$
.SUBSPA \$CODE\$,QUAD=0,ALIGN=8,ACCESS=0x2C,CODE_ONLY .SUBSPA \$CODE\$,QUAD=0,ALIGN=8,ACCESS=0x2C,CODE_ONLY
.EXPORT OPENSSL_cpuid_setup,ENTRY
.ALIGN 8
OPENSSL_cpuid_setup
.PROC
.CALLINFO NO_CALLS
.ENTRY
bv ($rp)
.EXIT
nop
.PROCEND
.EXPORT OPENSSL_rdtsc,ENTRY .EXPORT OPENSSL_rdtsc,ENTRY
.ALIGN 8 .ALIGN 8
OPENSSL_rdtsc OPENSSL_rdtsc

View file

@ -694,7 +694,7 @@ my $ldd = sub {
my ($mod,$args) = @_; my ($mod,$args) = @_;
my $orig = "ldd$mod\t$args"; my $orig = "ldd$mod\t$args";
if ($args =~ /(\-[0-9]+)\(%r([0-9]+)\),%r([0-9]+)/) # format 3 suffices if ($args =~ /(\-?[0-9]+)\(%r([0-9]+)\),%r([0-9]+)/) # format 3 suffices
{ my $opcode=(0x14<<26)|($2<<21)|($3<<16)|(($1&0x1FF8)<<1)|(($1>>13)&1); { my $opcode=(0x14<<26)|($2<<21)|($3<<16)|(($1&0x1FF8)<<1)|(($1>>13)&1);
$opcode|=(1<<3) if ($mod =~ /^,m/); $opcode|=(1<<3) if ($mod =~ /^,m/);
$opcode|=(1<<2) if ($mod =~ /^,mb/); $opcode|=(1<<2) if ($mod =~ /^,mb/);
@ -707,7 +707,7 @@ my $std = sub {
my ($mod,$args) = @_; my ($mod,$args) = @_;
my $orig = "std$mod\t$args"; my $orig = "std$mod\t$args";
if ($args =~ /%r([0-9]+),(\-[0-9]+)\(%r([0-9]+)\)/) # format 3 suffices if ($args =~ /%r([0-9]+),(\-?[0-9]+)\(%r([0-9]+)\)/) # format 3 suffices
{ my $opcode=(0x1c<<26)|($3<<21)|($1<<16)|(($2&0x1FF8)<<1)|(($2>>13)&1); { my $opcode=(0x1c<<26)|($3<<21)|($1<<16)|(($2&0x1FF8)<<1)|(($2>>13)&1);
sprintf "\t.WORD\t0x%08x\t; %s",$opcode,$orig; sprintf "\t.WORD\t0x%08x\t; %s",$opcode,$orig;
} }