mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-23 14:39:34 +02:00
* manually fix unwanted stripping of exception frame info based on a patch by Gareth J. Moreton
This commit is contained in:
parent
08bb8c8dfc
commit
5cd1c4f5bc
@ -1506,7 +1506,15 @@ Unit AoptObj;
|
|||||||
var
|
var
|
||||||
p,hp1,hp2 : tai;
|
p,hp1,hp2 : tai;
|
||||||
stoploop:boolean;
|
stoploop:boolean;
|
||||||
begin
|
const
|
||||||
|
{$ifdef JVM}
|
||||||
|
TaiFence = SkipInstr + [ait_const, ait_realconst, ait_typedconst, ait_label, ait_jcatch];
|
||||||
|
{$else JVM}
|
||||||
|
{ Stop if it reaches SEH directive information in the form of
|
||||||
|
consts, which may occur if RemoveDeadCodeAfterJump is called on
|
||||||
|
the final RET instruction on x86, for example }
|
||||||
|
TaiFence = SkipInstr + [ait_const, ait_realconst, ait_typedconst, ait_label, ait_align];
|
||||||
|
{$endif JVM} begin
|
||||||
repeat
|
repeat
|
||||||
stoploop:=true;
|
stoploop:=true;
|
||||||
p := BlockStart;
|
p := BlockStart;
|
||||||
@ -1545,7 +1553,7 @@ Unit AoptObj;
|
|||||||
and (hp1.typ <> ait_jcatch)
|
and (hp1.typ <> ait_jcatch)
|
||||||
{$endif}
|
{$endif}
|
||||||
do
|
do
|
||||||
if not(hp1.typ in ([ait_label,ait_align]+skipinstr)) then
|
if not(hp1.typ in TaiFence) then
|
||||||
begin
|
begin
|
||||||
if (hp1.typ = ait_instruction) and
|
if (hp1.typ = ait_instruction) and
|
||||||
taicpu(hp1).is_jmp and
|
taicpu(hp1).is_jmp and
|
||||||
|
Loading…
Reference in New Issue
Block a user