mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-11-04 05:39:29 +01:00 
			
		
		
		
	+ fix RegReadByInstruction for the x86 MOVSD instruction
git-svn-id: trunk@35968 -
This commit is contained in:
		
							parent
							
								
									7ea0429d40
								
							
						
					
					
						commit
						ff1ee6836d
					
				@ -197,6 +197,17 @@ unit aoptcpu;
 | 
			
		||||
                  RegReadByInstruction := true;
 | 
			
		||||
                  exit
 | 
			
		||||
                end;
 | 
			
		||||
            { special handling for SSE MOVSD }
 | 
			
		||||
            if (p.opcode=A_MOVSD) and (p.ops>0) then
 | 
			
		||||
              begin
 | 
			
		||||
                if p.ops<>2 then
 | 
			
		||||
                  internalerror(2017042702);
 | 
			
		||||
                regReadByInstruction := reginop(reg,p.oper[1]^) or
 | 
			
		||||
                  (
 | 
			
		||||
                   (p.oper[0]^.typ=top_reg) and (p.oper[1]^.typ=top_reg) and reginop(reg, p.oper[0]^)
 | 
			
		||||
                  );
 | 
			
		||||
                exit;
 | 
			
		||||
              end;
 | 
			
		||||
            with insprop[p.opcode] do
 | 
			
		||||
              begin
 | 
			
		||||
                if getregtype(reg)=R_INTREGISTER then
 | 
			
		||||
 | 
			
		||||
@ -197,7 +197,7 @@
 | 
			
		||||
(Ch: [Ch_Rop1, Ch_Wop2]),
 | 
			
		||||
(Ch: [Ch_Rop1, Ch_Wop2]),
 | 
			
		||||
(Ch: [Ch_RWESI, Ch_WMemEDI, Ch_RWEDI, Ch_RDirFlag]),
 | 
			
		||||
(Ch: [Ch_All, Ch_RDirFlag]),
 | 
			
		||||
(Ch: [Ch_RWESI, Ch_WMemEDI, Ch_RWEDI, Ch_RDirFlag]),
 | 
			
		||||
(Ch: [Ch_RWESI, Ch_WMemEDI, Ch_RWEDI, Ch_RDirFlag]),
 | 
			
		||||
(Ch: [Ch_Wop2, Ch_Rop1]),
 | 
			
		||||
(Ch: [Ch_Wop2, Ch_Rop1]),
 | 
			
		||||
 | 
			
		||||
@ -197,7 +197,7 @@
 | 
			
		||||
(Ch: [Ch_Rop1, Ch_Wop2]),
 | 
			
		||||
(Ch: [Ch_Rop1, Ch_Wop2]),
 | 
			
		||||
(Ch: [Ch_RWESI, Ch_WMemEDI, Ch_RWEDI, Ch_RDirFlag]),
 | 
			
		||||
(Ch: [Ch_All, Ch_RDirFlag]),
 | 
			
		||||
(Ch: [Ch_RWESI, Ch_WMemEDI, Ch_RWEDI, Ch_RDirFlag]),
 | 
			
		||||
(Ch: [Ch_RWESI, Ch_WMemEDI, Ch_RWEDI, Ch_RDirFlag]),
 | 
			
		||||
(Ch: [Ch_Wop2, Ch_Rop1]),
 | 
			
		||||
(Ch: [Ch_Wop2, Ch_Rop1]),
 | 
			
		||||
 | 
			
		||||
@ -1108,8 +1108,8 @@ reg64,xmmreg          \361\326\2\x0F\x7E\101          WILLAMETTE,SSE2,X86_64
 | 
			
		||||
void                  \1\xA4                          8086
 | 
			
		||||
 | 
			
		||||
[MOVSD,movsl]
 | 
			
		||||
; Ch_All and Ch_RDirFlag aren't correct for the sse move, but how can it be solved? (FK)
 | 
			
		||||
(Ch_All, Ch_RDirFlag)
 | 
			
		||||
; Change flags aren't correct for the sse move, so it is handled as a special case in the compiler code
 | 
			
		||||
(Ch_RWESI, Ch_WMemEDI, Ch_RWEDI, Ch_RDirFlag)
 | 
			
		||||
void                  \325\1\xA5                      386
 | 
			
		||||
xmmreg,xmmrm          \334\2\x0F\x10\110              WILLAMETTE,SSE2
 | 
			
		||||
xmmrm,xmmreg          \334\2\x0F\x11\101              WILLAMETTE,SSE2
 | 
			
		||||
 | 
			
		||||
@ -187,7 +187,7 @@
 | 
			
		||||
(Ch: [Ch_Rop1, Ch_Wop2]),
 | 
			
		||||
(Ch: [Ch_Rop1, Ch_Wop2]),
 | 
			
		||||
(Ch: [Ch_RWESI, Ch_WMemEDI, Ch_RWEDI, Ch_RDirFlag]),
 | 
			
		||||
(Ch: [Ch_All, Ch_RDirFlag]),
 | 
			
		||||
(Ch: [Ch_RWESI, Ch_WMemEDI, Ch_RWEDI, Ch_RDirFlag]),
 | 
			
		||||
(Ch: [Ch_RWRSI, Ch_WMemEDI, Ch_RWRDI, Ch_RDirFlag]),
 | 
			
		||||
(Ch: [Ch_RWESI, Ch_WMemEDI, Ch_RWEDI, Ch_RDirFlag]),
 | 
			
		||||
(Ch: [Ch_Wop2, Ch_Rop1]),
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user