mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 13:39:26 +02:00
Fix the generation of alignment instructions for m68k. This not only fixes quite some tests, but most importantly the native m68k compiler!
* aggas.pas, TGNUAssembler.WriteTree.doalign: instead of strangely checking for the previous instruction always use .balignw if the previous code was code and we should not use a specific instruction git-svn-id: trunk@26839 -
This commit is contained in:
parent
c00d752813
commit
0321a77d72
@ -652,28 +652,18 @@ implementation
|
|||||||
if not(target_info.system in (systems_darwin+systems_aix)) then
|
if not(target_info.system in (systems_darwin+systems_aix)) then
|
||||||
begin
|
begin
|
||||||
{$ifdef m68k}
|
{$ifdef m68k}
|
||||||
if assigned(lasthp) and
|
if not use_op and (lastsectype=sec_code) then
|
||||||
(
|
|
||||||
(lasthp.typ=ait_instruction) and
|
|
||||||
(taicpu(lasthp).opcode<>A_JMP)
|
|
||||||
) or
|
|
||||||
(
|
|
||||||
(lasthp.typ=ait_label)
|
|
||||||
) then
|
|
||||||
begin
|
begin
|
||||||
if ispowerof2(alignment,i) then
|
if not ispowerof2(alignment,i) then
|
||||||
begin
|
internalerror(2014022201);
|
||||||
{ the Coldfire manual suggests the TBF instruction for
|
{ the Coldfire manual suggests the TBF instruction for
|
||||||
alignments, but somehow QEMU does not interpret that
|
alignments, but somehow QEMU does not interpret that
|
||||||
correctly... }
|
correctly... }
|
||||||
{if current_settings.cputype in cpu_coldfire then
|
{if current_settings.cputype in cpu_coldfire then
|
||||||
instr:='0x51fc'
|
instr:='0x51fc'
|
||||||
else}
|
else}
|
||||||
instr:='0x4e71';
|
instr:='0x4e71';
|
||||||
AsmWrite(#9'.balignw '+tostr(alignment)+','+instr);
|
AsmWrite(#9'.balignw '+tostr(alignment)+','+instr);
|
||||||
end
|
|
||||||
else
|
|
||||||
internalerror(2012102101);
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user