mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-11-04 09:19:39 +01:00 
			
		
		
		
	* support for the "RaisePending" parameter of RaiseExceptions on AArch64
git-svn-id: trunk@29951 -
This commit is contained in:
		
							parent
							
								
									3d01d4ceb1
								
							
						
					
					
						commit
						1edd3ac511
					
				@ -129,8 +129,29 @@ function SetExceptionMask(const Mask: TFPUExceptionMask): TFPUExceptionMask;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
procedure ClearExceptions(RaisePending: Boolean);
 | 
			
		||||
  var
 | 
			
		||||
    fpsr: dword;
 | 
			
		||||
    f: TFPUException;
 | 
			
		||||
  begin
 | 
			
		||||
    { todo: RaisePending = true }
 | 
			
		||||
    fpsr:=getfpsr;
 | 
			
		||||
    if raisepending then
 | 
			
		||||
      begin
 | 
			
		||||
        if (fpsr and (fpu_dze shr fpu_exception_mask_to_status_mask_shift)) <> 0 then
 | 
			
		||||
          float_raise(exZeroDivide);
 | 
			
		||||
        if (fpsr and (fpu_ofe shr fpu_exception_mask_to_status_mask_shift)) <> 0 then
 | 
			
		||||
          float_raise(exOverflow);
 | 
			
		||||
        if (fpsr and (fpu_ufe shr fpu_exception_mask_to_status_mask_shift)) <> 0 then
 | 
			
		||||
          float_raise(exUnderflow);
 | 
			
		||||
        if (fpsr and (fpu_ioe shr fpu_exception_mask_to_status_mask_shift)) <> 0 then
 | 
			
		||||
          float_raise(exInvalidOp);
 | 
			
		||||
        if (fpsr and (fpu_ixe shr fpu_exception_mask_to_status_mask_shift)) <> 0 then
 | 
			
		||||
          float_raise(exPrecision);
 | 
			
		||||
        if (fpsr and (fpu_ide shr fpu_exception_mask_to_status_mask_shift)) <> 0 then
 | 
			
		||||
          float_raise(exDenormalized);
 | 
			
		||||
        { now the soft float exceptions }
 | 
			
		||||
        for f in  softfloat_exception_flags do
 | 
			
		||||
          float_raise(f);
 | 
			
		||||
      end;
 | 
			
		||||
    softfloat_exception_flags:=[];
 | 
			
		||||
    setfpsr(getfpsr and not(fpu_exception_mask shr fpu_exception_mask_to_status_mask_shift));
 | 
			
		||||
    setfpsr(fpsr and not(fpu_exception_mask shr fpu_exception_mask_to_status_mask_shift));
 | 
			
		||||
  end;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user