File tree Expand file tree Collapse file tree 3 files changed +22
-3
lines changed Expand file tree Collapse file tree 3 files changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -35,5 +35,13 @@ build_script:
3535      ninja 
3636      cd.. 
3737      nmake -f makefile.msvc all 
38+       cp test.exe test-stock.exe 
39+       cp timing.exe timing-stock.exe 
40+       nmake -f makefile.msvc clean 
41+       nmake -f makefile.msvc all CFLAGS="/Ox /DUSE_LTM /DLTM_DESC /DLTC_AES_NI /I../libtommath" 
3842test_script :
39- - cmd : test.exe 
43+ - cmd : >- 
44+     test-stock.exe 
45+       test.exe 
46+       timing-stock.exe cipher_ecb 
47+       timing.exe cipher_ecb 
Original file line number Diff line number Diff line change @@ -294,13 +294,15 @@ test.exe: $(LIBMAIN_S) $(TOBJECTS)
294294	cl $(LTC_CFLAGS) $(TOBJECTS) $(LIBMAIN_S) $(LTC_LDFLAGS) /Fe$@
295295	@echo NOTICE: start the tests by launching test.exe
296296
297- all: $(LIBMAIN_S) hashsum.exe crypt.exe small.exe tv_gen.exe sizes.exe constants.exe timing.exe test.exe
297+ ALL_TEST=hashsum.exe crypt.exe small.exe tv_gen.exe sizes.exe constants.exe timing.exe test.exe
298+ 
299+ all: $(LIBMAIN_S) $(ALL_TEST)
298300
299301test: test.exe
300302
301303clean:
302304	@-cmd /c del /Q *_tv.txt 2>nul
303- 	@-cmd /c del /Q /S *.OBJ *.LIB *.EXE  *.DLL 2>nul
305+ 	@-cmd /c del /Q /S *.OBJ *.LIB $(ALL_TEST)  *.DLL 2>nul
304306
305307#Install the library + headers
306308install: $(LIBMAIN_S)
Original file line number Diff line number Diff line change @@ -63,10 +63,19 @@ static LTC_INLINE int s_aesni_is_supported(void)
6363      a  =  1 ;
6464      c  =  0 ;
6565
66+ #if  defined(_MSC_VER ) &&  !defined(__clang__ )
67+       int  arr [4 ];
68+       __cpuidex (arr , a , c );
69+       a  =  arr [0 ];
70+       b  =  arr [1 ];
71+       c  =  arr [2 ];
72+       d  =  arr [3 ];
73+ #else 
6674      __asm__ volatile  ("cpuid" 
6775           :"=a" (a ), "=b" (b ), "=c" (c ), "=d" (d )
6876           :"a" (a ), "c" (c )
6977          );
78+ #endif 
7079
7180      is_supported  =  ((c  >> 19 ) &  1 ) &&  ((c  >> 25 ) &  1 );
7281      initialized  =  1 ;
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments