Skip to content
Snippets Groups Projects
Commit 83697981 authored by sof's avatar sof
Browse files

[project @ 1998-03-16 20:23:24 by sof]

x86: Catch fast entry points fallthroughs via %esi and %edi
parent 398284dc
No related merge requests found
......@@ -994,9 +994,14 @@ sub mangle_asm {
} elsif ( $TargetPlatform =~ /^hppa/ ) {
$c =~ s/^\s+ldil.*\n\s+ldo.*\n\s+bv.*\n(.*\n)?\s+\.EXIT/$1\t.EXIT/;
} elsif ( $TargetPlatform =~ /^i386-/ ) {
# Reg alloc depending, gcc generated code may jump to the fast entry point via
# a number of registers.
$c =~ s/^\tmovl \$${T_US}${symb}_fast\d+,\%edx\n\tjmp \*\%edx\n//;
$c =~ s/^\tmovl \$${T_US}${symb}_fast\d+,\%ecx\n\tjmp \*\%ecx\n//;
$c =~ s/^\tmovl \$${T_US}${symb}_fast\d+,\%eax\n\tjmp \*\%eax\n//;
# The next two only apply if we're not stealing %esi or %edi.
$c =~ s/^\tmovl \$${T_US}${symb}_fast\d+,\%esi\n\tjmp \*\%esi\n// if ($StolenX86Regs < 3);
$c =~ s/^\tmovl \$${T_US}${symb}_fast\d+,\%edi\n\tjmp \*\%edi\n// if ($StolenX86Regs < 4);
} elsif ( $TargetPlatform =~ /^mips-/ ) {
$c =~ s/^\tjmp \$31,\(\$27\),0\n\t\.align 4\n\t\.end/\t.align 4\n\t.end/;
} elsif ( $TargetPlatform =~ /^m68k-/ ) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment