mirror of
				https://github.com/Ryujinx/SDL.git
				synced 2025-11-04 02:14:53 +00:00 
			
		
		
		
	Fix loongarch64 support
HAS_LSX/LASX is modified as HAVE_LSX/LASX. (cherry picked from commit 50af65a7ddf65fd685dc0e2658016f950360c473)
This commit is contained in:
		
							parent
							
								
									d09d0aaab6
								
							
						
					
					
						commit
						0b0d256a69
					
				| 
						 | 
					@ -847,33 +847,33 @@ if(SDL_ASSEMBLY)
 | 
				
			||||||
    if(SDL_LSX)
 | 
					    if(SDL_LSX)
 | 
				
			||||||
      cmake_push_check_state()
 | 
					      cmake_push_check_state()
 | 
				
			||||||
      list(APPEND CMAKE_REQUIRED_FLAGS "-mlsx")
 | 
					      list(APPEND CMAKE_REQUIRED_FLAGS "-mlsx")
 | 
				
			||||||
      check_c_source_compiles([[
 | 
					      check_c_source_compiles("
 | 
				
			||||||
          #ifndef __loongarch_sx
 | 
					          #ifndef __loongarch_sx
 | 
				
			||||||
          #error Assembler CPP flag not enabled
 | 
					          #error Assembler CPP flag not enabled
 | 
				
			||||||
          #endif
 | 
					          #endif
 | 
				
			||||||
        ]] CPU_HAS_LSX)
 | 
					          int main(int argc, char **argv) { return 0; }" CPU_SUPPORTS_LSX)
 | 
				
			||||||
      check_include_file("lsxintrin.h" HAVE_LSXINTRIN_H)
 | 
					      check_include_file("lsxintrin.h" HAVE_LSXINTRIN_H)
 | 
				
			||||||
      cmake_pop_check_state()
 | 
					      cmake_pop_check_state()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      if(CPU_HAS_LSX AND HAVE_LSXINTRIN_H)
 | 
					      if(CPU_SUPPORTS_LSX AND HAVE_LSXINTRIN_H)
 | 
				
			||||||
        list(APPEND EXTRA_CFLAGS "-mlsx")
 | 
					        list(APPEND EXTRA_CFLAGS "-mlsx")
 | 
				
			||||||
        set(HAS_LSX TRUE)
 | 
					        set(HAVE_LSX TRUE)
 | 
				
			||||||
      endif()
 | 
					      endif()
 | 
				
			||||||
    endif()
 | 
					    endif()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if(SDL_LASX)
 | 
					    if(SDL_LASX)
 | 
				
			||||||
      cmake_push_check_state()
 | 
					      cmake_push_check_state()
 | 
				
			||||||
      list(APPEND CMAKE_REQUIRED_FLAGS "-mlasx")
 | 
					      list(APPEND CMAKE_REQUIRED_FLAGS "-mlasx")
 | 
				
			||||||
      check_c_source_compiles([[
 | 
					      check_c_source_compiles("
 | 
				
			||||||
          #ifndef __loongarch_asx
 | 
					          #ifndef __loongarch_asx
 | 
				
			||||||
          #error Assembler CPP flag not enabled
 | 
					          #error Assembler CPP flag not enabled
 | 
				
			||||||
          #endif
 | 
					          #endif
 | 
				
			||||||
        ]] CPU_HAS_LASX)
 | 
					          int main(int argc, char **argv) { return 0; }" CPU_SUPPORTS_LASX)
 | 
				
			||||||
      check_include_file("lasxintrin.h" HAVE_LASXINTRIN_H)
 | 
					      check_include_file("lasxintrin.h" HAVE_LASXINTRIN_H)
 | 
				
			||||||
      cmake_pop_check_state()
 | 
					      cmake_pop_check_state()
 | 
				
			||||||
      if(CPU_HAS_LASX AND HAVE_LASXINTRIN_H)
 | 
					      if(CPU_SUPPORTS_LASX AND HAVE_LASXINTRIN_H)
 | 
				
			||||||
        list(APPEND EXTRA_CFLAGS "-mlasx")
 | 
					        list(APPEND EXTRA_CFLAGS "-mlasx")
 | 
				
			||||||
        set(HAS_LASX TRUE)
 | 
					        set(HAVE_LASX TRUE)
 | 
				
			||||||
      endif()
 | 
					      endif()
 | 
				
			||||||
    endif()
 | 
					    endif()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue