Implement stacked filetest operators (-f -w -x $file).
[p5sagit/p5-mst-13.2.git] / ext / B / B / Assembler.pm
index afbd338..fce3753 100644 (file)
@@ -16,7 +16,7 @@ no warnings;                  # XXX
 
 @ISA = qw(Exporter);
 @EXPORT_OK = qw(assemble_fh newasm endasm assemble asm);
-$VERSION = 0.05;
+$VERSION = 0.06;
 
 use strict;
 my %opnumber;
@@ -142,6 +142,14 @@ sub B::Asmdata::PUT_IV {
     $Config{ivsize} == 4 ? &B::Asmdata::PUT_I32 : &B::Asmdata::PUT_IV64;
 }
 
+sub B::Asmdata::PUT_PADOFFSET {
+    $Config{ptrsize} == 8 ? &B::Asmdata::PUT_IV64 : &B::Asmdata::PUT_U32;
+}
+
+sub B::Asmdata::PUT_long {
+    $Config{longsize} == 8 ? &B::Asmdata::PUT_IV64 : &B::Asmdata::PUT_U32;
+}
+
 my %unesc = (n => "\n", r => "\r", t => "\t", a => "\a",
             b => "\b", f => "\f", v => "\013");
 
@@ -283,7 +291,8 @@ sub assemble {
 sub asm {
     return if $_[0] =~ /\s*\W/;
     if (defined $_[1]) {
-       return if $_[1] eq "0" and $_[0] !~ /^(?:newsvx?|av_pushx?|xav_flags)$/;
+       return if $_[1] eq "0" and
+           $_[0] !~ /^(?:newsvx?|av_pushx?|av_extend|xav_flags)$/;
        return if $_[1] eq "1" and $_[0] =~ /^(?:sv_refcnt)$/;
     }
     assemble "@_";