mirror of
https://github.com/autc04/Retro68.git
synced 2024-11-23 00:34:22 +00:00
update samples for powerpc
This commit is contained in:
parent
e2cb927c65
commit
a65704d4fa
@ -35,16 +35,15 @@ link_directories(${CMAKE_CURRENT_BINARY_DIR}/libretro)
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/libretro)
|
||||
set(REZ_INCLUDE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/libretro:${CMAKE_INSTALL_PREFIX}/RIncludes" )
|
||||
|
||||
if(CMAKE_SYSTEM_NAME MATCHES Retro68)
|
||||
add_subdirectory(Console)
|
||||
add_subdirectory(TestApps)
|
||||
add_subdirectory(Samples/HelloWorld)
|
||||
add_subdirectory(Samples/Raytracer)
|
||||
add_subdirectory(Samples/Dialog)
|
||||
|
||||
if(CMAKE_SYSTEM_NAME MATCHES Retro68)
|
||||
add_subdirectory(Samples/Launcher)
|
||||
add_subdirectory(Samples/Dialog)
|
||||
add_subdirectory(Samples/SystemExtension)
|
||||
else()
|
||||
add_subdirectory(Samples/Dialog)
|
||||
endif()
|
||||
|
||||
else()
|
||||
|
@ -27,6 +27,3 @@ add_application(Dialog
|
||||
dialog.c
|
||||
dialog.r
|
||||
)
|
||||
if(CMAKE_SYSTEM_NAME MATCHES RetroPPC)
|
||||
target_link_libraries(Dialog InterfaceLib)
|
||||
endif()
|
||||
|
@ -29,20 +29,26 @@ inline std::int32_t muls(std::int16_t x, std::int16_t y)
|
||||
|
||||
inline std::uint32_t mulu(std::uint16_t x, std::uint16_t y)
|
||||
{
|
||||
//return (std::uint32_t)x * y;
|
||||
#if TARGET_CPU_M68K
|
||||
std::uint32_t res;
|
||||
__asm("mulu %1, %0" : "=d"(res) : "d"(x), "0"(y));
|
||||
return res;
|
||||
#else
|
||||
return (std::uint32_t)x * y;
|
||||
#endif
|
||||
}
|
||||
|
||||
inline std::int32_t mulsu(std::int16_t x, std::uint16_t y)
|
||||
{
|
||||
//return (std::int32_t)a * (std::uint32_t)b;
|
||||
#if TARGET_CPU_M68K
|
||||
std::int32_t res;
|
||||
__asm("mulu %1, %0" : "=d"(res) : "d"(x), "0"(y));
|
||||
if(x < 0)
|
||||
res -= ((std::uint32_t)y) << 16;
|
||||
return res;
|
||||
#else
|
||||
return (std::int32_t)x * (std::uint32_t)y;
|
||||
#endif
|
||||
}
|
||||
|
||||
#define COUNT_OP(var) ++var
|
||||
|
Loading…
Reference in New Issue
Block a user