Latest update.

This commit is contained in:
2020-02-11 23:20:44 +09:00
parent 047a30700b
commit 9dfeec3942
639 changed files with 14024 additions and 31198 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ Functions of interest are:
&function_begin_B(name,extra) Same as normal function_begin but no pushing.
&function_end(name) Call at end of function.
&function_end_A(name) Standard pop and ret, for use inside functions
&function_end_B(name) Call at end but with poping or 'ret'.
&function_end_B(name) Call at end but with pop or ret.
&swtmp(num) Address on stack temp word.
&wparam(num) Parameter number num, that was push
in C convention. This all works over pushes
+1 -1
View File
@@ -191,4 +191,4 @@ while(my $line=<>) {
print "\n";
}
close STDOUT;
close STDOUT or die "error closing STDOUT";
+7
View File
@@ -165,21 +165,28 @@ sub cbc
&jmp_ptr($count);
&set_label("ej7");
&endbranch()
&movb(&HB("edx"), &BP(6,$in,"",0));
&shl("edx",8);
&set_label("ej6");
&endbranch()
&movb(&HB("edx"), &BP(5,$in,"",0));
&set_label("ej5");
&endbranch()
&movb(&LB("edx"), &BP(4,$in,"",0));
&set_label("ej4");
&endbranch()
&mov("ecx", &DWP(0,$in,"",0));
&jmp(&label("ejend"));
&set_label("ej3");
&endbranch()
&movb(&HB("ecx"), &BP(2,$in,"",0));
&shl("ecx",8);
&set_label("ej2");
&endbranch()
&movb(&HB("ecx"), &BP(1,$in,"",0));
&set_label("ej1");
&endbranch()
&movb(&LB("ecx"), &BP(0,$in,"",0));
&set_label("ejend");
+1 -1
View File
@@ -343,4 +343,4 @@ while($line=<>) {
print "\n";
}
close STDOUT;
close STDOUT or die "error closing STDOUT";
+21
View File
@@ -124,6 +124,7 @@ sub ::function_begin_B
push(@out,".align\t$align\n");
push(@out,"$func:\n");
push(@out,"$begin:\n") if ($global);
&::endbranch();
$::stack=4;
}
@@ -172,6 +173,26 @@ sub ::file_end
else { push (@out,"$tmp\n"); }
}
push(@out,$initseg) if ($initseg);
if ($::elf) {
push(@out,"
.section \".note.gnu.property\", \"a\"
.p2align 2
.long 1f - 0f
.long 4f - 1f
.long 5
0:
.asciz \"GNU\"
1:
.p2align 2
.long 0xc0000002
.long 3f - 2f
2:
.long 3
3:
.p2align 2
4:
");
}
}
sub ::data_byte { push(@out,".byte\t".join(',',@_)."\n"); }