Lines Matching refs:line

29 # - can't use multiple ops per line;
160 my ($class, $line) = @_;
164 if ($$line =~ /^([a-z][a-z0-9]*)/i) {
168 $$line = substr($$line,@+[0]); $$line =~ s/^\s+//;
180 } elsif ($self->{op} =~ /mov[dq]/ && $$line =~ /%xmm/) {
238 my ($class, $line) = @_;
242 if ($$line =~ /^\$([^,]+)/) {
246 $$line = substr($$line,@+[0]); $$line =~ s/^\s+//;
280 my ($class, $line, $opcode) = @_;
285 if ($$line =~ /^(\*?)([^\(,]*)\(([%\w,]+)\)((?:{[^}]+})*)/) {
293 $$line = substr($$line,@+[0]); $$line =~ s/^\s+//;
384 my ($class, $line, $opcode) = @_;
389 if ($$line =~ /^(\*?)%(\w+)((?:{[^}]+})*)/) {
396 $$line = substr($$line,@+[0]); $$line =~ s/^\s+//;
426 my ($class, $line) = @_;
430 if ($$line =~ /(^[\.\w]+)\:/) {
434 $$line = substr($$line,@+[0]); $$line =~ s/^\s+//;
493 my ($class, $line, $opcode) = @_;
497 if ($$line =~ /(^[^,]+)/) {
501 $$line = substr($$line,@+[0]); $$line =~ s/^\s+//;
659 my $line = shift;
662 foreach my $token (split(/,\s*/,$line)) {
686 my ($class, $line) = @_;
690 if ($$line =~ s/^\s*\.cfi_(\w+)\s*//) {
710 && do { $cfa_reg = $$line; last; };
712 && do { $cfa_rsp = -1*eval($$line) if ($cfa_reg eq "%rsp");
716 && do { $cfa_rsp -= 1*eval($$line) if ($cfa_reg eq "%rsp");
719 /def_cfa/ && do { if ($$line =~ /(%r\w+)\s*,\s*(.+)/) {
730 $self->{value} .= ".cfi_offset\t$$line,$cfa_rsp";
738 $self->{value} .= ".cfi_restore\t$$line";
745 cfa_expression($$line)));
758 $self->{value} = ".cfi_$dir\t$$line" if ($dir);
760 $$line = "";
772 my ($class, $line) = @_;
778 $ret = cfi_directive->re($line) and return $ret;
780 if ($$line =~ /^\s*(\.\w+)/) {
785 $$line = substr($$line,@+[0]); $$line =~ s/^\s+//;
789 && do { $globals{$$line} = $prefix . $$line;
790 $$line = $globals{$$line} if ($prefix);
793 /\.type/ && do { my ($sym,$type,$narg) = split(',',$$line);
805 $$line =~ s/\@abi\-omnipotent/\@function/;
806 $$line =~ s/\@function.*/\@function/;
809 /\.asciz/ && do { if ($$line =~ /^"(.*)"$/) {
811 $$line = join(",",unpack("C*",$1),0);
816 && do { $$line =~ s/([_a-z][_a-z0-9]*)/$globals{$1} or $1/gei;
817 $$line =~ s/\.L/$decor/g;
823 $self->{value} = $dir . "\t" . $$line;
832 if ($win64 && $$line =~ /([^,]+),\@function/);
841 $self->{value} = ".p2align\t" . (log($$line)/log(2));
843 $current_segment=$$line;
851 if ($flavour eq "macosx") { $self->{value} = ".private_extern\t$prefix$$line"; }
854 $self->{value} = "$dir\t$prefix$$line";
857 $$line = "";
888 $$line =~ s/([^,]*).*/$1/;
889 $$line = ".CRT\$XCU" if ($$line eq ".init");
891 $v="section $$line";
892 if ($$line=~/\.([px])data/) {
895 } elsif ($$line=~/\.CRT\$/i) {
900 $v.="$$line\tSEGMENT";
901 if ($$line=~/\.([px])data/) {
904 } elsif ($$line=~/\.CRT\$/i) {
909 $current_segment = $$line;
913 /\.extern/ && do { $self->{value} = "EXTERN\t".$$line;
919 $self->{value} .= "\t".$$line;
934 $self->{value} = "ALIGN\t".($$line>$max?$max:$$line);
939 my @arr = split(/,\s*/,$$line);
955 /\.byte/ && do { my @str=split(/,\s*/,$$line);
967 /\.comm/ && do { my @str=split(/,\s*/,$$line);
981 $$line = "";
1198 while(defined(my $line=<>)) {
1200 $line =~ s|\R$||; # Better chomp
1202 $line =~ s|[#!].*$||; # get rid of asm-style comments...
1203 $line =~ s|/\*.*\*/||; # ... and C-style comments...
1204 $line =~ s|^\s+||; # ... and skip whitespaces in beginning
1205 $line =~ s|\s+$||; # ... and at the end
1207 if (my $label=label->re(\$line)) { print $label->out(); }
1209 if (my $directive=directive->re(\$line)) {
1211 } elsif (my $opcode=opcode->re(\$line)) {
1214 if ((ref($asm) eq 'CODE') && scalar(my @bytes=&$asm($line))) {
1223 ($arg=register->re(\$line, $opcode))||
1224 ($arg=const->re(\$line)) ||
1225 ($arg=ea->re(\$line, $opcode)) ||
1226 ($arg=expr->re(\$line, $opcode)) ||
1231 last ARGUMENT if ($line !~ /^,/);
1233 $line =~ s/^,\s*//;
1263 print $line,"\n";