mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-02 13:10:28 +02:00
* Tighten rules for accepting ATT suffixes, no longer accept FPU suffixes for integer instructions and vice versa. Resolves #18900.
* tb0267.pp required patching due to 'fildw' instruction at line 72, which is rejected by GAS. Before this commit, FPC was silently converting it to 'filds', so it went unnoticed. Now FPC rejects 'fildw' like GAS does. git-svn-id: trunk@17363 -
This commit is contained in:
parent
3b53a1e933
commit
92adf34e3f
@ -60,10 +60,10 @@ interface
|
||||
'','BW','BL','WL','BQ','WQ',{'LQ',}'B','W','L','S','Q','T'
|
||||
);
|
||||
att_sizesuffix : array[0..11] of topsize = (
|
||||
S_NO,S_BW,S_BL,S_WL,S_BQ,S_WQ,{S_LQ,}S_B,S_W,S_L,S_FS,S_IQ,S_FX
|
||||
S_NO,S_BW,S_BL,S_WL,S_BQ,S_WQ,{S_LQ,}S_B,S_W,S_L,S_NO,S_Q,S_NO
|
||||
);
|
||||
att_sizefpusuffix : array[0..11] of topsize = (
|
||||
S_NO,S_NO,S_NO,S_NO,S_NO,S_NO,{S_NO,}S_NO,S_NO,S_FL,S_FS,S_IQ,S_FX
|
||||
S_NO,S_NO,S_NO,S_NO,S_NO,S_NO,{S_NO,}S_NO,S_NO,S_FL,S_FS,S_NO,S_FX
|
||||
);
|
||||
att_sizefpuintsuffix : array[0..11] of topsize = (
|
||||
S_NO,S_NO,S_NO,S_NO,S_NO,S_NO,{S_NO,}S_NO,S_NO,S_IL,S_IS,S_IQ,S_NO
|
||||
@ -83,10 +83,10 @@ interface
|
||||
'','BW','BL','WL','B','W','L','S','Q','T'
|
||||
);
|
||||
att_sizesuffix : array[0..9] of topsize = (
|
||||
S_NO,S_BW,S_BL,S_WL,S_B,S_W,S_L,S_FS,S_IQ,S_FX
|
||||
S_NO,S_BW,S_BL,S_WL,S_B,S_W,S_L,S_NO,S_NO,S_NO
|
||||
);
|
||||
att_sizefpusuffix : array[0..9] of topsize = (
|
||||
S_NO,S_NO,S_NO,S_NO,S_NO,S_NO,S_FL,S_FS,S_IQ,S_FX
|
||||
S_NO,S_NO,S_NO,S_NO,S_NO,S_NO,S_FL,S_FS,S_NO,S_FX
|
||||
);
|
||||
att_sizefpuintsuffix : array[0..9] of topsize = (
|
||||
S_NO,S_NO,S_NO,S_NO,S_NO,S_NO,S_IL,S_IS,S_IQ,S_NO
|
||||
|
@ -798,9 +798,13 @@ Implementation
|
||||
actopsize:=att_sizefpuintsuffix[sufidx]
|
||||
else
|
||||
actopsize:=att_sizesuffix[sufidx];
|
||||
actasmtoken:=AS_OPCODE;
|
||||
is_asmopcode:=TRUE;
|
||||
exit;
|
||||
{ only accept suffix from the same category that the opcode belongs to }
|
||||
if (actopsize<>S_NO) or (suflen=0) then
|
||||
begin
|
||||
actasmtoken:=AS_OPCODE;
|
||||
is_asmopcode:=TRUE;
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
{ not found, check condition opcodes }
|
||||
@ -822,10 +826,14 @@ Implementation
|
||||
actopsize:=att_sizefpuintsuffix[sufidx]
|
||||
else
|
||||
actopsize:=att_sizesuffix[sufidx];
|
||||
actcondition:=cnd;
|
||||
actasmtoken:=AS_OPCODE;
|
||||
is_asmopcode:=TRUE;
|
||||
exit;
|
||||
{ only accept suffix from the same category that the opcode belongs to }
|
||||
if (actopsize<>S_NO) or (suflen=0) then
|
||||
begin
|
||||
actcondition:=cnd;
|
||||
actasmtoken:=AS_OPCODE;
|
||||
is_asmopcode:=TRUE;
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
@ -69,7 +69,7 @@ begin
|
||||
aw:=-4;
|
||||
bw:=45;
|
||||
asm
|
||||
fildw aw
|
||||
filds aw
|
||||
fstpl a
|
||||
end;
|
||||
if a<>-4.0 then
|
||||
|
Loading…
Reference in New Issue
Block a user